SlideShare uma empresa Scribd logo
1 de 15
Raspberry Pi 3 + UART/Bluetooth Issues
By: Yeo Kheng Meng (yeokm1@gmail.com)Hackware v1.6 (30 Mar 2016)
1
Video of my presentation can be found here:
• https://engineers.sg/video/raspberry-pi-3-uart-bluetooth-issues--609
Whats new? (Features)
Specifications Raspberry Pi 2 Raspberry Pi 3
CPU BCM2836
Cortex-A7
900Mhz
ARMv7
BCM2837
Cortex-A53
1.2Ghz
ARMv8 (64-bit)
GPU 250Mhz Videocore IV
1080p,30FPS,H.264 video decoding
400Mhz Videocore IV
1080p,60FPS,H.264 video decoding
Wifi - 802.11n, 2.4Ghz only,
single stream 150Mbps
Bluetooth - Bluetooth 4.1 (Dual-mode)
Classic and BLE
2http://raspi.tv/2016/raspberry-pi-3-model-b-launches-today-64-bit-quad-a53-1-2-ghz-bcm2837
Whats new? (Board)
Specifications Raspberry Pi 2 Raspberry Pi 3
LED positions Top left Bottom left
microSD storage Spring No Spring
3
UART (Debug console) issues on RPi 3
4
UART Debug Console
+
USB-TTL cable
https://www.adafruit.com/product/954
• Universal asynchronous receiver/transmitter
5
UART (Serial Debug console) issue
Received output.
• Garbled or nothing
• Output is 72000 instead of 115200 baud
Expected output
6
Hardware architecture (≤ RPi 2)
System on Chip
BCM2835 (RPi 1 B/B+)
/ BCM2836 (RPi 2)
• BCM283x has 2 UARTs
• UART0: Full UART (/dev/ttyAMA0)
• Based on ARM Primecell PL011
• Larger FIFO buffers
• 16x8 transmit
• 16x12 receive
• High performance full feature serial port
• Older RPi models breaks out UART0 to the pin header
• Default use: Debug console
• UART1: “mini UART” (/dev/ttyS0)
UART0
UART1
BCM2835 datasheet: Page 10
https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
7
System on Chip
BCM2837 (RPi 3)
Hardware architecture (RPi 3)
SDIO
BCM43438 wireless chip
http://raspi.tv/2016/raspberry-pi-3-model-b-launches-today-64-bit-quad-a53-1-2-ghz-bcm2837
Bluetooth 4.1Wifi
8
• UART0: Full UART (/dev/ttyAMA0)
• UART1: “mini UART” (/dev/ttyS0)
UART1
UART0
Why is UART1 a problem?
BCM2835 datasheet: Page 10- 11
https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
9
Note:
I use BCM2835 datasheet as
datasheets of newer chips have not
been released by Broadcom.
Mini UART implementation should be
the same across BCM283x.
Problem Explanation
• 𝑏𝑎𝑢𝑑𝑟𝑎𝑡𝑒 =
𝑐𝑜𝑟𝑒𝐹𝑟𝑒𝑞
8 ∗(𝑏𝑎𝑢𝑑𝑅𝑎𝑡𝑒𝑅𝑒𝑔+1)
• RPi 3 boot time core frequency is 400Mhz
• RPI baud rate default 115200
• 115200 =
400 000 000
8 ∗ (𝑏𝑎𝑢𝑑𝑅𝑎𝑡𝑒𝑅𝑒𝑔+1)
• baudRateReg calculated on core
frequency retrieved at boot time
• Frequency scaling, may drop to 250Mhz to
save power under low load
• Fluctuating core frequency -> Fluctuating
baud rate
Who is affected?
Anyone who uses the TX/RX header pins
• People who use the serial debug console
• Headless systems
• RPi shields that uses the UART
• Eg. RS232, GPS/GSM
• Device-Device communication to other MCUs or MPUs
• Require high UART performance (aka full UART) and Bluetooth
10
How do we solve this? Part (1/2)
Lock a constant core frequency during boot time
• (For old firmware) Add “core_freq=250” XOR “force_turbo=1” to /boot/config.txt
• Lock core core_freq to minimum or maximum (400Mhz) respectively
• Minimum -> RPi 3 performance will be affected.
• Maximum -> Requires good cooling.
• Can still be throttled to 250 Mhz under low voltage or high temperature conditions
• (For new firmware) Add “enable_uart=1” to /boot/config.txt
• All RPi distributions will eventually support this option going forward
• Similar to “core_freq=250” with clearer intent
• Raspbian latest stable updates does not support this yet
• Need bleeding-edge firmware update: “sudo apt-get install rpi-update” & “sudo rpi-update”
• Arch Linux requires an update to use this option: Just use “pacman –Syu”
• Distros that support this option will disable debug console if “enable_uart=1” is not set
• “enable_uart=1” explanation Raspberry Pi Foundation Engineer Phil Elwell (pelwell)
• https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644
11
How do we solve this? Part (2/2)
Remap header pins to use Full UART with device
tree overlay (pin-crossbar)
• Add “dtoverlay=pi3-disable-bt” to /boot/config.txt
• Disables Bluetooth in the process as UART1 is unconnected
• Requires extra “sudo systemctl disable hciuart” for Raspbian
• Or add “dtoverlay=pi3-miniuart-bt” to /boot/config.txt
• Bluetooth now uses mini-UART
• Need to add “core_freq=250” or “force_turbo=1” to
/boot/config.txt so Bluetooth via mini UART is usable
• Edit “/lib/systemd/system/hciuart.service” and replace
“ttyAMA0” with “ttyS0” for Raspbian
• Bluetooth’s performance will be affected. Only low-
throughput BLE may be effectively usable.
• If any of these options are used, the serial console will
be enabled unless “enable_uart=0”
12
System on Chip
BCM2837 (RPi 3)
SDIO
BCM43438 wireless chip
Bluetooth 4.1Wifi
• UART0: Full UART (/dev/ttyAMA0)
• UART1: “mini UART” (/dev/ttyS0)
UART0
UART1
Solution summary
Set in /boot/config.txt
• Serial console and normal Bluetooth
• Lock frequency
• Old: “core_freq=250” XOR “force_turbo=1”
• New: ”enable_uart=1”. Add “force_turbo=1” to lock at high frequency.
• High performance Serial
• Switch UART0 and UART1 pins
• No Bluetooth
• “dtoverlay=pi3-disable-bt”
• (Raspbian) Run “sudo systemctl disable hciuart”
• Slow Bluetooth Classic or BLE
• “dtoverlay=pi3-miniuart-bt” AND (“core_freq=250” XOR “force_turbo=1”)
• (Raspbian) Edit “/lib/systemd/system/hciuart.service” and replace “ttyAMA0” with “ttyS0”
• Add “enable_uart=0” to disable debug console
• The use of the mini UART will always require locking of Core frequency
13
Arch Linux Bluetooth’s issues
• Raspbian uses “pi-bluetooth” to provide Bluetooth features
• “pi-bluetooth” has not been ported to Arch Linux
• Someone has posted a temporary package to AUR
• https://archlinuxarm.org/forum/viewtopic.php?f=67&t=10017s
• https://aur.archlinux.org/packages/pi-bluetooth/
• My setup instructions using that package
• https://gist.github.com/yeokm1/d6c3ca927919c61257cd
14
Useful links
1. BCM2835 datasheet: https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
2. Original Github issue: https://github.com/raspberrypi/firmware/issues/553
3. “enable_uart=1” explanation by Raspberry Pi Foundation Engineer Phil Elwell
https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644
4. UART DT overlays: http://www.briandorey.com/post/Raspberry-Pi-3-UART-Boot-Overlay-Part-Two
5. Detailed DT overlays: https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/README
6. Arch Linux ARM Bluetooth forum issue thread: https://archlinuxarm.org/forum/viewtopic.php?f=65&t=9961
7. Instructions to enable Arch Linux Bluetooth: https://gist.github.com/yeokm1/d6c3ca927919c61257cd
15

Mais conteúdo relacionado

Mais procurados

PART-3 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-3 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-3 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-3 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingFastBit Embedded Brain Academy
 
RISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a TimeRISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a TimeAtish Patra
 
Cisco router configuration tutorial
Cisco router configuration tutorialCisco router configuration tutorial
Cisco router configuration tutorialIT Tech
 
Using GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlUsing GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlKentaro Ebisawa
 
Insights on the Configuration and Performances of SOME/IP Service Discovery
Insights on the Configuration and Performances of SOME/IP Service DiscoveryInsights on the Configuration and Performances of SOME/IP Service Discovery
Insights on the Configuration and Performances of SOME/IP Service DiscoveryRealTime-at-Work (RTaW)
 
WALT vs PELT : Redux - SFO17-307
WALT vs PELT : Redux  - SFO17-307WALT vs PELT : Redux  - SFO17-307
WALT vs PELT : Redux - SFO17-307Linaro
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOSICS
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver艾鍗科技
 
UART Communication
UART CommunicationUART Communication
UART Communicationdattatraya1
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingMichelle Holley
 
Windows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareWindows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareyeokm1
 
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)gnkeshava
 
Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network InterfacesKernel TLV
 
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Michelle Holley
 

Mais procurados (20)

PART-3 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-3 : Mastering RTOS FreeRTOS and STM32Fx with DebuggingPART-3 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
PART-3 : Mastering RTOS FreeRTOS and STM32Fx with Debugging
 
RISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a TimeRISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a Time
 
Cisco router configuration tutorial
Cisco router configuration tutorialCisco router configuration tutorial
Cisco router configuration tutorial
 
Using GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlUsing GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnl
 
Free FreeRTOS Course-Task Management
Free FreeRTOS Course-Task ManagementFree FreeRTOS Course-Task Management
Free FreeRTOS Course-Task Management
 
Insights on the Configuration and Performances of SOME/IP Service Discovery
Insights on the Configuration and Performances of SOME/IP Service DiscoveryInsights on the Configuration and Performances of SOME/IP Service Discovery
Insights on the Configuration and Performances of SOME/IP Service Discovery
 
WALT vs PELT : Redux - SFO17-307
WALT vs PELT : Redux  - SFO17-307WALT vs PELT : Redux  - SFO17-307
WALT vs PELT : Redux - SFO17-307
 
I2C
I2CI2C
I2C
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver
 
UART Communication
UART CommunicationUART Communication
UART Communication
 
DPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet ProcessingDPDK & Layer 4 Packet Processing
DPDK & Layer 4 Packet Processing
 
I2C
I2CI2C
I2C
 
Windows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareWindows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardware
 
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
PCIe and PCIe driver in WEC7 (Windows Embedded compact 7)
 
I2 c protocol
I2 c protocolI2 c protocol
I2 c protocol
 
Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network Interfaces
 
MX960 Router
MX960 RouterMX960 Router
MX960 Router
 
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
Intel® QuickAssist Technology Introduction, Applications, and Lab, Including ...
 
USB 2.0 and 3.0
USB 2.0 and 3.0USB 2.0 and 3.0
USB 2.0 and 3.0
 

Destaque

PCB Business Card
PCB Business CardPCB Business Card
PCB Business Cardyeokm1
 
A Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech ThingA Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech Thingyeokm1
 
Repair Kopitiam Specialty Electrical Equipment
Repair Kopitiam Specialty Electrical EquipmentRepair Kopitiam Specialty Electrical Equipment
Repair Kopitiam Specialty Electrical Equipmentyeokm1
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introductionLTG Oxford
 
Introduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyIntroduction to Bluetooth Low Energy
Introduction to Bluetooth Low Energyyeokm1
 
Raspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRaspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRobomart
 
Repair Kopitiam Electrical Training
Repair Kopitiam Electrical TrainingRepair Kopitiam Electrical Training
Repair Kopitiam Electrical Trainingyeokm1
 
Repair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker TrainingRepair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker Trainingyeokm1
 
Raspberry Pi Presentation
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi PresentationGeekizer
 
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたいKenichiro MATOHARA
 
NUS SOC Print
NUS SOC PrintNUS SOC Print
NUS SOC Printyeokm1
 
Distance Machine Locker
Distance Machine LockerDistance Machine Locker
Distance Machine Lockeryeokm1
 
BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth Zach Dennis
 
Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3Lee Richardson
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chatyeokm1
 
Raspberry Pi Based GPS Tracking System and Face Recognition System.
Raspberry Pi Based GPS Tracking System and Face Recognition System.Raspberry Pi Based GPS Tracking System and Face Recognition System.
Raspberry Pi Based GPS Tracking System and Face Recognition System.Ruthvik Vaila
 
Reflections on Trusting Trust
Reflections on Trusting TrustReflections on Trusting Trust
Reflections on Trusting Trustyeokm1
 

Destaque (20)

PCB Business Card
PCB Business CardPCB Business Card
PCB Business Card
 
A Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech ThingA Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech Thing
 
Repair Kopitiam Specialty Electrical Equipment
Repair Kopitiam Specialty Electrical EquipmentRepair Kopitiam Specialty Electrical Equipment
Repair Kopitiam Specialty Electrical Equipment
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introduction
 
Introduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyIntroduction to Bluetooth Low Energy
Introduction to Bluetooth Low Energy
 
Raspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - RobomartRaspberry Pi 3 Latest PPT - Robomart
Raspberry Pi 3 Latest PPT - Robomart
 
Repair Kopitiam Electrical Training
Repair Kopitiam Electrical TrainingRepair Kopitiam Electrical Training
Repair Kopitiam Electrical Training
 
Repair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker TrainingRepair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker Training
 
Raspberry pi 3
Raspberry pi 3Raspberry pi 3
Raspberry pi 3
 
Raspberry Pi Presentation
Raspberry Pi PresentationRaspberry Pi Presentation
Raspberry Pi Presentation
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
技適なBluetooth GNSS/GPSレシーバーをRaspberryPiで作りたい
 
NUS SOC Print
NUS SOC PrintNUS SOC Print
NUS SOC Print
 
Distance Machine Locker
Distance Machine LockerDistance Machine Locker
Distance Machine Locker
 
BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth
 
Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3Introduction to Windows IoT via Raspberry Pi 3
Introduction to Windows IoT via Raspberry Pi 3
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chat
 
Raspberry Pi Based GPS Tracking System and Face Recognition System.
Raspberry Pi Based GPS Tracking System and Face Recognition System.Raspberry Pi Based GPS Tracking System and Face Recognition System.
Raspberry Pi Based GPS Tracking System and Face Recognition System.
 
Reflections on Trusting Trust
Reflections on Trusting TrustReflections on Trusting Trust
Reflections on Trusting Trust
 
IoT Design Deck
IoT Design DeckIoT Design Deck
IoT Design Deck
 

Semelhante a Raspberry Pi 3 + UART/Bluetooth issues

M series technical presentation-part 1
M series technical presentation-part 1M series technical presentation-part 1
M series technical presentation-part 1xKinAnx
 
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdfBRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdfssusercbaa33
 
Cyclone II FPGA Overview
Cyclone II FPGA OverviewCyclone II FPGA Overview
Cyclone II FPGA OverviewPremier Farnell
 
Product Selection Guide
Product Selection GuideProduct Selection Guide
Product Selection GuideRoozbeh Molavi
 
Cambium network ptp 810 series 01 00 system release note
Cambium network ptp 810 series 01 00 system release noteCambium network ptp 810 series 01 00 system release note
Cambium network ptp 810 series 01 00 system release noteAdvantec Distribution
 
SoM with Zynq UltraScale device
SoM with Zynq UltraScale deviceSoM with Zynq UltraScale device
SoM with Zynq UltraScale devicenie, jack
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-PrototypingLars Gregori
 
American Fibertek MX50FXSTPOEPLUS Data Sheet
American Fibertek MX50FXSTPOEPLUS Data SheetAmerican Fibertek MX50FXSTPOEPLUS Data Sheet
American Fibertek MX50FXSTPOEPLUS Data SheetJMAC Supply
 
American Fibertek MX50FX1FSTPOEPLUS Data Sheet
American Fibertek MX50FX1FSTPOEPLUS Data SheetAmerican Fibertek MX50FX1FSTPOEPLUS Data Sheet
American Fibertek MX50FX1FSTPOEPLUS Data SheetJMAC Supply
 
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriais
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriaisWebinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriais
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriaisEmbarcados
 
MPC8313E PowerQUICC II Pro Processor
MPC8313E PowerQUICC II Pro ProcessorMPC8313E PowerQUICC II Pro Processor
MPC8313E PowerQUICC II Pro ProcessorPremier Farnell
 
Hacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guideHacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guideHARRY CHAN PUTRA
 
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for ArduinoRaghav Shetty
 
Piccolo F2806x Microcontrollers
Piccolo F2806x MicrocontrollersPiccolo F2806x Microcontrollers
Piccolo F2806x MicrocontrollersPremier Farnell
 
American Fibertek MTX46FXSTPOEPLUS Data Sheet
American Fibertek MTX46FXSTPOEPLUS Data SheetAmerican Fibertek MTX46FXSTPOEPLUS Data Sheet
American Fibertek MTX46FXSTPOEPLUS Data SheetJMAC Supply
 

Semelhante a Raspberry Pi 3 + UART/Bluetooth issues (20)

M series technical presentation-part 1
M series technical presentation-part 1M series technical presentation-part 1
M series technical presentation-part 1
 
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdfBRKRST-3068  Troubleshooting Catalyst 2K and 3K.pdf
BRKRST-3068 Troubleshooting Catalyst 2K and 3K.pdf
 
Cyclone II FPGA Overview
Cyclone II FPGA OverviewCyclone II FPGA Overview
Cyclone II FPGA Overview
 
Product Selection Guide
Product Selection GuideProduct Selection Guide
Product Selection Guide
 
Cambium network ptp 810 series 01 00 system release note
Cambium network ptp 810 series 01 00 system release noteCambium network ptp 810 series 01 00 system release note
Cambium network ptp 810 series 01 00 system release note
 
Mother board
Mother boardMother board
Mother board
 
SoM with Zynq UltraScale device
SoM with Zynq UltraScale deviceSoM with Zynq UltraScale device
SoM with Zynq UltraScale device
 
U8638manual
U8638manualU8638manual
U8638manual
 
uCluster
uClusteruCluster
uCluster
 
Boards for the IoT-Prototyping
Boards for the IoT-PrototypingBoards for the IoT-Prototyping
Boards for the IoT-Prototyping
 
Soyo syd6iba
Soyo syd6ibaSoyo syd6iba
Soyo syd6iba
 
American Fibertek MX50FXSTPOEPLUS Data Sheet
American Fibertek MX50FXSTPOEPLUS Data SheetAmerican Fibertek MX50FXSTPOEPLUS Data Sheet
American Fibertek MX50FXSTPOEPLUS Data Sheet
 
American Fibertek MX50FX1FSTPOEPLUS Data Sheet
American Fibertek MX50FX1FSTPOEPLUS Data SheetAmerican Fibertek MX50FX1FSTPOEPLUS Data Sheet
American Fibertek MX50FX1FSTPOEPLUS Data Sheet
 
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriais
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriaisWebinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriais
Webinar: BlueNRG-LP - Bluetooth 5.2 de longo alcance para aplicações industriais
 
MPC8313E PowerQUICC II Pro Processor
MPC8313E PowerQUICC II Pro ProcessorMPC8313E PowerQUICC II Pro Processor
MPC8313E PowerQUICC II Pro Processor
 
Hacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guideHacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guide
 
Msp430
Msp430Msp430
Msp430
 
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
4 Channel Relay Board 5V-Bluetooth Compatible for Arduino
 
Piccolo F2806x Microcontrollers
Piccolo F2806x MicrocontrollersPiccolo F2806x Microcontrollers
Piccolo F2806x Microcontrollers
 
American Fibertek MTX46FXSTPOEPLUS Data Sheet
American Fibertek MTX46FXSTPOEPLUS Data SheetAmerican Fibertek MTX46FXSTPOEPLUS Data Sheet
American Fibertek MTX46FXSTPOEPLUS Data Sheet
 

Mais de yeokm1

I became a Private Pilot and this is my story
I became a Private Pilot and this is my storyI became a Private Pilot and this is my story
I became a Private Pilot and this is my storyyeokm1
 
What's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeWhat's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeyeokm1
 
Speaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior DevsSpeaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior Devsyeokm1
 
Reflections on Trusting Trust for Go
Reflections on Trusting Trust for GoReflections on Trusting Trust for Go
Reflections on Trusting Trust for Goyeokm1
 
Meltdown and Spectre
Meltdown and SpectreMeltdown and Spectre
Meltdown and Spectreyeokm1
 
Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486yeokm1
 
BLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev ScoutBLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev Scoutyeokm1
 
BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017yeokm1
 
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiteryeokm1
 
PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)yeokm1
 
SP Auto Door Unlocker
SP Auto Door UnlockerSP Auto Door Unlocker
SP Auto Door Unlockeryeokm1
 
SP IoT Doorbell
SP IoT DoorbellSP IoT Doorbell
SP IoT Doorbellyeokm1
 
The slide rule
The slide ruleThe slide rule
The slide ruleyeokm1
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardwareyeokm1
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Piyeokm1
 
My Life as a Maker
My Life as a MakerMy Life as a Maker
My Life as a Makeryeokm1
 
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huang
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' HuangTalk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huang
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huangyeokm1
 
Intel Edison: Beyond the Breadboard
Intel Edison: Beyond the BreadboardIntel Edison: Beyond the Breadboard
Intel Edison: Beyond the Breadboardyeokm1
 
The Linux Scheduler: a Decade of Wasted Cores
The Linux Scheduler: a Decade of Wasted CoresThe Linux Scheduler: a Decade of Wasted Cores
The Linux Scheduler: a Decade of Wasted Coresyeokm1
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduinoyeokm1
 

Mais de yeokm1 (20)

I became a Private Pilot and this is my story
I became a Private Pilot and this is my storyI became a Private Pilot and this is my story
I became a Private Pilot and this is my story
 
What's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeWhat's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light plane
 
Speaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior DevsSpeaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior Devs
 
Reflections on Trusting Trust for Go
Reflections on Trusting Trust for GoReflections on Trusting Trust for Go
Reflections on Trusting Trust for Go
 
Meltdown and Spectre
Meltdown and SpectreMeltdown and Spectre
Meltdown and Spectre
 
Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486
 
BLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev ScoutBLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev Scout
 
BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017
 
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 
PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)
 
SP Auto Door Unlocker
SP Auto Door UnlockerSP Auto Door Unlocker
SP Auto Door Unlocker
 
SP IoT Doorbell
SP IoT DoorbellSP IoT Doorbell
SP IoT Doorbell
 
The slide rule
The slide ruleThe slide rule
The slide rule
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardware
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Pi
 
My Life as a Maker
My Life as a MakerMy Life as a Maker
My Life as a Maker
 
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huang
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' HuangTalk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huang
Talk on The Essential Guide to Electronics in Shenzhen by Andrew 'Bunnie' Huang
 
Intel Edison: Beyond the Breadboard
Intel Edison: Beyond the BreadboardIntel Edison: Beyond the Breadboard
Intel Edison: Beyond the Breadboard
 
The Linux Scheduler: a Decade of Wasted Cores
The Linux Scheduler: a Decade of Wasted CoresThe Linux Scheduler: a Decade of Wasted Cores
The Linux Scheduler: a Decade of Wasted Cores
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 

Último

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 

Último (20)

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 

Raspberry Pi 3 + UART/Bluetooth issues

  • 1. Raspberry Pi 3 + UART/Bluetooth Issues By: Yeo Kheng Meng (yeokm1@gmail.com)Hackware v1.6 (30 Mar 2016) 1 Video of my presentation can be found here: • https://engineers.sg/video/raspberry-pi-3-uart-bluetooth-issues--609
  • 2. Whats new? (Features) Specifications Raspberry Pi 2 Raspberry Pi 3 CPU BCM2836 Cortex-A7 900Mhz ARMv7 BCM2837 Cortex-A53 1.2Ghz ARMv8 (64-bit) GPU 250Mhz Videocore IV 1080p,30FPS,H.264 video decoding 400Mhz Videocore IV 1080p,60FPS,H.264 video decoding Wifi - 802.11n, 2.4Ghz only, single stream 150Mbps Bluetooth - Bluetooth 4.1 (Dual-mode) Classic and BLE 2http://raspi.tv/2016/raspberry-pi-3-model-b-launches-today-64-bit-quad-a53-1-2-ghz-bcm2837
  • 3. Whats new? (Board) Specifications Raspberry Pi 2 Raspberry Pi 3 LED positions Top left Bottom left microSD storage Spring No Spring 3
  • 4. UART (Debug console) issues on RPi 3 4
  • 5. UART Debug Console + USB-TTL cable https://www.adafruit.com/product/954 • Universal asynchronous receiver/transmitter 5
  • 6. UART (Serial Debug console) issue Received output. • Garbled or nothing • Output is 72000 instead of 115200 baud Expected output 6
  • 7. Hardware architecture (≤ RPi 2) System on Chip BCM2835 (RPi 1 B/B+) / BCM2836 (RPi 2) • BCM283x has 2 UARTs • UART0: Full UART (/dev/ttyAMA0) • Based on ARM Primecell PL011 • Larger FIFO buffers • 16x8 transmit • 16x12 receive • High performance full feature serial port • Older RPi models breaks out UART0 to the pin header • Default use: Debug console • UART1: “mini UART” (/dev/ttyS0) UART0 UART1 BCM2835 datasheet: Page 10 https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf 7
  • 8. System on Chip BCM2837 (RPi 3) Hardware architecture (RPi 3) SDIO BCM43438 wireless chip http://raspi.tv/2016/raspberry-pi-3-model-b-launches-today-64-bit-quad-a53-1-2-ghz-bcm2837 Bluetooth 4.1Wifi 8 • UART0: Full UART (/dev/ttyAMA0) • UART1: “mini UART” (/dev/ttyS0) UART1 UART0
  • 9. Why is UART1 a problem? BCM2835 datasheet: Page 10- 11 https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf 9 Note: I use BCM2835 datasheet as datasheets of newer chips have not been released by Broadcom. Mini UART implementation should be the same across BCM283x. Problem Explanation • 𝑏𝑎𝑢𝑑𝑟𝑎𝑡𝑒 = 𝑐𝑜𝑟𝑒𝐹𝑟𝑒𝑞 8 ∗(𝑏𝑎𝑢𝑑𝑅𝑎𝑡𝑒𝑅𝑒𝑔+1) • RPi 3 boot time core frequency is 400Mhz • RPI baud rate default 115200 • 115200 = 400 000 000 8 ∗ (𝑏𝑎𝑢𝑑𝑅𝑎𝑡𝑒𝑅𝑒𝑔+1) • baudRateReg calculated on core frequency retrieved at boot time • Frequency scaling, may drop to 250Mhz to save power under low load • Fluctuating core frequency -> Fluctuating baud rate
  • 10. Who is affected? Anyone who uses the TX/RX header pins • People who use the serial debug console • Headless systems • RPi shields that uses the UART • Eg. RS232, GPS/GSM • Device-Device communication to other MCUs or MPUs • Require high UART performance (aka full UART) and Bluetooth 10
  • 11. How do we solve this? Part (1/2) Lock a constant core frequency during boot time • (For old firmware) Add “core_freq=250” XOR “force_turbo=1” to /boot/config.txt • Lock core core_freq to minimum or maximum (400Mhz) respectively • Minimum -> RPi 3 performance will be affected. • Maximum -> Requires good cooling. • Can still be throttled to 250 Mhz under low voltage or high temperature conditions • (For new firmware) Add “enable_uart=1” to /boot/config.txt • All RPi distributions will eventually support this option going forward • Similar to “core_freq=250” with clearer intent • Raspbian latest stable updates does not support this yet • Need bleeding-edge firmware update: “sudo apt-get install rpi-update” & “sudo rpi-update” • Arch Linux requires an update to use this option: Just use “pacman –Syu” • Distros that support this option will disable debug console if “enable_uart=1” is not set • “enable_uart=1” explanation Raspberry Pi Foundation Engineer Phil Elwell (pelwell) • https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644 11
  • 12. How do we solve this? Part (2/2) Remap header pins to use Full UART with device tree overlay (pin-crossbar) • Add “dtoverlay=pi3-disable-bt” to /boot/config.txt • Disables Bluetooth in the process as UART1 is unconnected • Requires extra “sudo systemctl disable hciuart” for Raspbian • Or add “dtoverlay=pi3-miniuart-bt” to /boot/config.txt • Bluetooth now uses mini-UART • Need to add “core_freq=250” or “force_turbo=1” to /boot/config.txt so Bluetooth via mini UART is usable • Edit “/lib/systemd/system/hciuart.service” and replace “ttyAMA0” with “ttyS0” for Raspbian • Bluetooth’s performance will be affected. Only low- throughput BLE may be effectively usable. • If any of these options are used, the serial console will be enabled unless “enable_uart=0” 12 System on Chip BCM2837 (RPi 3) SDIO BCM43438 wireless chip Bluetooth 4.1Wifi • UART0: Full UART (/dev/ttyAMA0) • UART1: “mini UART” (/dev/ttyS0) UART0 UART1
  • 13. Solution summary Set in /boot/config.txt • Serial console and normal Bluetooth • Lock frequency • Old: “core_freq=250” XOR “force_turbo=1” • New: ”enable_uart=1”. Add “force_turbo=1” to lock at high frequency. • High performance Serial • Switch UART0 and UART1 pins • No Bluetooth • “dtoverlay=pi3-disable-bt” • (Raspbian) Run “sudo systemctl disable hciuart” • Slow Bluetooth Classic or BLE • “dtoverlay=pi3-miniuart-bt” AND (“core_freq=250” XOR “force_turbo=1”) • (Raspbian) Edit “/lib/systemd/system/hciuart.service” and replace “ttyAMA0” with “ttyS0” • Add “enable_uart=0” to disable debug console • The use of the mini UART will always require locking of Core frequency 13
  • 14. Arch Linux Bluetooth’s issues • Raspbian uses “pi-bluetooth” to provide Bluetooth features • “pi-bluetooth” has not been ported to Arch Linux • Someone has posted a temporary package to AUR • https://archlinuxarm.org/forum/viewtopic.php?f=67&t=10017s • https://aur.archlinux.org/packages/pi-bluetooth/ • My setup instructions using that package • https://gist.github.com/yeokm1/d6c3ca927919c61257cd 14
  • 15. Useful links 1. BCM2835 datasheet: https://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf 2. Original Github issue: https://github.com/raspberrypi/firmware/issues/553 3. “enable_uart=1” explanation by Raspberry Pi Foundation Engineer Phil Elwell https://github.com/raspberrypi/firmware/issues/553#issuecomment-199486644 4. UART DT overlays: http://www.briandorey.com/post/Raspberry-Pi-3-UART-Boot-Overlay-Part-Two 5. Detailed DT overlays: https://github.com/raspberrypi/linux/blob/rpi-4.1.y/arch/arm/boot/dts/overlays/README 6. Arch Linux ARM Bluetooth forum issue thread: https://archlinuxarm.org/forum/viewtopic.php?f=65&t=9961 7. Instructions to enable Arch Linux Bluetooth: https://gist.github.com/yeokm1/d6c3ca927919c61257cd 15