Serial Port on RPi3
bscott at bunyatech.com.au
Thu Feb 7 06:16:31 UTC 2019
Has anyone had any success using the serial port on a Raspberry Pi 3 at
anything other than 115200?
I'm trying to connect a GPS module to it (as most people do...) but am
having a lot of trouble.
To give myself some diagnostics I have connected another machine up
using an adafruit cable and a terminal program.
My first problem was u-boot. I have largely managed to get it out of the
way by setting the stdin, stdout and stderr environment variables to
usbkbd, vidconsole, and vidconsole (i.e. removing the serial option) but
it still insists on sending:
MMC: mmc at 7e300000: 1
Loading Environment from FAT... OK
at 115200 baud before getting out of the way. No big deal because it
doesn't look like gps commands and it is being sent at much higher
speeds than I would expect the gps to understand anyway.
The message on boot for the UART is:
uart0: <PrimeCell UART (PL011)> mem 0x7e201000-0x7e201fff irq 24 on
If I send data to the uart (echo Hi >/dev/cuau0) it works but at 115200
baud, not respecting the stty speed of 9600. Similarly, using cu (cu -l
cuau0 -s 9600), I can send data but at 115200, not the expected 9600 baud.
I have done some experiments with enable_uart= in the config.txt as well
as overlays from the linux world (uart0.dtbo and uart1.dtbo). While I
can get FreeBSD to detect the Mini-UART with some combinations of
settings, either on it's own or with the PL011, I haven't been able to
get anything out of the mini-uart and only a single character out of the
PL011 (at 115200 baud despite other settings).
My conclusions so far:
* There is no working driver behind the detection of the mini-uart.
* There is no way to change the speed of the PL011 to anything other
than 115200 (maybe because u-boot sets it that way at startup -
haven't fiddled with those knobs yet).
Am I missing something important somewhere?
P.S. I'm running 12-RELEASE with no software changes.
More information about the freebsd-arm