time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Re: [time-nuts] GPScon running on Raspberry Pi 3b

HM
Hal Murray
Fri, Jun 23, 2017 4:16 AM

The PI does have a couple of logic level serial ports on the expansion
connector you can connect a level shifter two.  One port is normally the
Linux serial console which you can configure to be a general purpose serial
port (I've never used them, but others have).

The console port used by the GPS HATs.  Works fine.  /dev/ttyAMA0

The PPS pin varies depending on which type of HAT you get.

--
These are my opinions.  I hate spam.

holrum@hotmail.com said: > The PI does have a couple of logic level serial ports on the expansion > connector you can connect a level shifter two. One port is normally the > Linux serial console which you can configure to be a general purpose serial > port (I've never used them, but others have). The console port used by the GPS HATs. Works fine. /dev/ttyAMA0 The PPS pin varies depending on which type of HAT you get. -- These are my opinions. I hate spam.
AE
Andrew E Mileski
Mon, Jun 26, 2017 6:04 PM

On Fri, Jun 23, 2017 at 12:16 AM, Hal Murray hmurray@megapathdsl.net
wrote:

The PI does have a couple of logic level serial ports on the expansion
connector you can connect a level shifter two.  One port is normally the
Linux serial console which you can configure to be a general purpose

serial

port (I've never used them, but others have).

The console port used by the GPS HATs.  Works fine.  /dev/ttyAMA0

The PPS pin varies depending on which type of HAT you get.

The RaspberryPi 3 is a bit different.

All the Pi models, 1 & 2 & 3, have two UARTs:  a full-featured UART, and a
mini-UART.

On the PI 3, the header pins for the serial port are routed by default to
the mini-UART, and the full-featured UART is used for Bluetooth.  On the
older Pi models, the full-featured UART is routed to the header,

It is possible to swap them back via software, but then you lose Bluetooth
functionality.

The mini-UART has issues with its baud-rate generator:  it is derived from
the system clock, not an independent clock generator like the full-featured
UART, so it doesn't work when dynamic system clocking for power management
is enabled, so you either have to run at max or minimum speed only.

FWIW, I'm running a custom Fedora 25 on all my Pi3, as the default doesn't
support all Pi3 devices (and I don't want the U-Boot boot-loader either).
I'm using cheap $0.99 USD CH340 based USB-to-Serial converters from E-Bay
(I bought 10), as well as my bench equipment which are mostly FTDI (hacked
some to use standard VendorId and DeviceId) or PL.

Beware that USB-to-Serial converters are pretty horrible for precise timing
applications, like PPS on the CD pin.  It can be done on a GPIO pin
instead, but requires some hacking and re-compiling.

On Fri, Jun 23, 2017 at 12:16 AM, Hal Murray <hmurray@megapathdsl.net> wrote: > > holrum@hotmail.com said: > > The PI does have a couple of logic level serial ports on the expansion > > connector you can connect a level shifter two. One port is normally the > > Linux serial console which you can configure to be a general purpose > serial > > port (I've never used them, but others have). > > The console port used by the GPS HATs. Works fine. /dev/ttyAMA0 > > The PPS pin varies depending on which type of HAT you get. > The RaspberryPi 3 is a bit different. All the Pi models, 1 & 2 & 3, have two UARTs: a full-featured UART, and a mini-UART. On the PI 3, the header pins for the serial port are routed by default to the mini-UART, and the full-featured UART is used for Bluetooth. On the older Pi models, the full-featured UART is routed to the header, It is possible to swap them back via software, but then you lose Bluetooth functionality. The mini-UART has issues with its baud-rate generator: it is derived from the system clock, not an independent clock generator like the full-featured UART, so it doesn't work when dynamic system clocking for power management is enabled, so you either have to run at max or minimum speed only. FWIW, I'm running a custom Fedora 25 on all my Pi3, as the default doesn't support all Pi3 devices (and I don't want the U-Boot boot-loader either). I'm using cheap $0.99 USD CH340 based USB-to-Serial converters from E-Bay (I bought 10), as well as my bench equipment which are mostly FTDI (hacked some to use standard VendorId and DeviceId) or PL. Beware that USB-to-Serial converters are pretty horrible for precise timing applications, like PPS on the CD pin. It can be done on a GPIO pin instead, but requires some hacking and re-compiling.
AE
Andrew E Mileski
Mon, Jun 26, 2017 7:52 PM

On Mon, Jun 26, 2017 at 2:04 PM, Andrew E Mileski andrew.mileski@gmail.com
wrote:

The RaspberryPi 3 is a bit different.

All the Pi models, 1 & 2 & 3, have two UARTs:  a full-featured UART, and a
mini-UART.

On the PI 3, the header pins for the serial port are routed by default to
the mini-UART, and the full-featured UART is used for Bluetooth.  On the
older Pi models, the full-featured UART is routed to the header,

It is possible to swap them back via software, but then you lose Bluetooth
functionality.

The mini-UART has issues with its baud-rate generator:  it is derived from
the system clock, not an independent clock generator like the full-featured
UART, so it doesn't work when dynamic system clocking for power management
is enabled, so you either have to run at max or minimum speed only.

FWIW, I'm running a custom Fedora 25 on all my Pi3, as the default doesn't
support all Pi3 devices (and I don't want the U-Boot boot-loader either).
I'm using cheap $0.99 USD CH340 based USB-to-Serial converters from E-Bay
(I bought 10), as well as my bench equipment which are mostly FTDI (hacked
some to use standard VendorId and DeviceId) or PL.

Beware that USB-to-Serial converters are pretty horrible for precise
timing applications, like PPS on the CD pin.  It can be done on a GPIO pin
instead, but requires some hacking and re-compiling.

I should have cited my sources:  most details can be found on the RPi
Foundation's web site at:

https://www.raspberrypi.org/documentation/configuration/uart.md

Google:  raspberry pi mini-uart

On Mon, Jun 26, 2017 at 2:04 PM, Andrew E Mileski <andrew.mileski@gmail.com> wrote: > > The RaspberryPi 3 is a bit different. > > All the Pi models, 1 & 2 & 3, have two UARTs: a full-featured UART, and a > mini-UART. > > On the PI 3, the header pins for the serial port are routed by default to > the mini-UART, and the full-featured UART is used for Bluetooth. On the > older Pi models, the full-featured UART is routed to the header, > > It is possible to swap them back via software, but then you lose Bluetooth > functionality. > > The mini-UART has issues with its baud-rate generator: it is derived from > the system clock, not an independent clock generator like the full-featured > UART, so it doesn't work when dynamic system clocking for power management > is enabled, so you either have to run at max or minimum speed only. > > FWIW, I'm running a custom Fedora 25 on all my Pi3, as the default doesn't > support all Pi3 devices (and I don't want the U-Boot boot-loader either). > I'm using cheap $0.99 USD CH340 based USB-to-Serial converters from E-Bay > (I bought 10), as well as my bench equipment which are mostly FTDI (hacked > some to use standard VendorId and DeviceId) or PL. > > Beware that USB-to-Serial converters are pretty horrible for precise > timing applications, like PPS on the CD pin. It can be done on a GPIO pin > instead, but requires some hacking and re-compiling. > I should have cited my sources: most details can be found on the RPi Foundation's web site at: https://www.raspberrypi.org/documentation/configuration/uart.md Google: raspberry pi mini-uart