Serial Port on RPi3
bscott at bunyatech.com.au
Thu Feb 7 08:21:39 UTC 2019
On 7/2/19 7:10 pm, Dustin Marquess wrote:
> 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:
> 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 :(.
> On Thu, Feb 7, 2019 at 12:17 AM Brian Scott <bscott at bunyatech.com.au> wrote:
>> 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
>> 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.
>> freebsd-arm at freebsd.org mailing list
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
Thanks. Just the magic I'm looking for.
More information about the freebsd-arm