Serial Port on RPi3
Dustin Marquess
dmarquess at gmail.com
Thu Feb 7 08:10:34 UTC 2019
You're absolutely right about the PL011 speed change issue. I had the
same exact issue (for the exact same reason too, GPS!) and gonzo told
me to use init_uart_baud in my config.txt:
https://lists.freebsd.org/pipermail/freebsd-arm/2017-January/015474.html
I managed to get the older U-Boots to not spew on the UART at all.
The newer ones seem to desperately want one and panic/die/etc if they
can't find one. I spent hours on it and finally just gave up :(.
-Dustin
On Thu, Feb 7, 2019 at 12:17 AM Brian Scott <bscott at bunyatech.com.au> wrote:
>
> Hi,
>
> 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
> In: serial
> Out: vidconsole
> Err: vidconsole
>
> 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
> simplebus0
>
> 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?
>
> Cheers,
>
> Brian
>
> P.S. I'm running 12-RELEASE with no software changes.
>
>
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
More information about the freebsd-arm
mailing list