You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Gregory Nutt <sp...@gmail.com> on 2021/04/28 21:19:36 UTC

Re: tty philosophy

> I am sorting out flexcom support for the SAMA5D2 as there are issues with the arch files as well as Kconfig. In doing so, I would like to do it “right”.
>
>   
>
> If flexcoms are assigned as USARTs is the correct philosophy to register them sequentially or as per flexcom port number? For example, if (only) flexcoms 2 and 3 are configured as USARTs should they be ttyFC0 and ttyFC1, or ttyFC2 and ttyFC3?
For consistency, they should be ttyFC0 and ttyFC1.  The PX4 team likes 
the other numbering and introduced 
CONFIG_STM32_SERIAL_DISABLE_REORDERING, but I think STM32's are the only 
architectures that do that.
> $ grep -rl REORDERING arch
> arch/arm/src/chip/Kconfig
> arch/arm/src/chip/stm32_serial.c
> arch/arm/src/stm32/Kconfig
> arch/arm/src/stm32/stm32_serial.c
> arch/arm/src/stm32f0l0g0/Kconfig
> arch/arm/src/stm32f0l0g0/stm32_serial_v1.c
> arch/arm/src/stm32f0l0g0/stm32_serial_v2.c
> arch/arm/src/stm32f7/Kconfig
> arch/arm/src/stm32f7/stm32_serial.c
> arch/arm/src/stm32h7/Kconfig
> arch/arm/src/stm32h7/stm32_serial.c
> arch/arm/src/stm32l4/Kconfig
> arch/arm/src/stm32l4/stm32l4_serial.c
> arch/arm/src/stm32l5/Kconfig
> arch/arm/src/stm32l5/stm32l5_serial.c
>


Re: tty philosophy

Posted by Gregory Nutt <sp...@gmail.com>.
> And FYI, not exactly related to this topic but correlated:
>
> Console will always be at ttyS0, even if the UART peripheral is not 0.

That is true for all architectures except for the STM32 families (all of 
them).  For the STM32's, that is true by default.  For example, if the 
console is on USART6, then USART6 will be ttyS0. But for the STM32's it 
is not true if CONFIG_STM32xx_SERIAL_DISABLE_REORDERING.  In that case, 
ttyS6 would be the console device.

That is an inconsistency introduced by PX4.


Re: tty philosophy

Posted by Sara da Cunha Monteiro de Souza <sa...@gmail.com>.
And FYI, not exactly related to this topic but correlated:

Console will always be at ttyS0, even if the UART peripheral is not 0.


Em qua., 28 de abr. de 2021 às 18:19, Gregory Nutt <sp...@gmail.com>
escreveu:

>
> > I am sorting out flexcom support for the SAMA5D2 as there are issues
> with the arch files as well as Kconfig. In doing so, I would like to do it
> “right”.
> >
> >
> >
> > If flexcoms are assigned as USARTs is the correct philosophy to register
> them sequentially or as per flexcom port number? For example, if (only)
> flexcoms 2 and 3 are configured as USARTs should they be ttyFC0 and ttyFC1,
> or ttyFC2 and ttyFC3?
> For consistency, they should be ttyFC0 and ttyFC1.  The PX4 team likes
> the other numbering and introduced
> CONFIG_STM32_SERIAL_DISABLE_REORDERING, but I think STM32's are the only
> architectures that do that.
> > $ grep -rl REORDERING arch
> > arch/arm/src/chip/Kconfig
> > arch/arm/src/chip/stm32_serial.c
> > arch/arm/src/stm32/Kconfig
> > arch/arm/src/stm32/stm32_serial.c
> > arch/arm/src/stm32f0l0g0/Kconfig
> > arch/arm/src/stm32f0l0g0/stm32_serial_v1.c
> > arch/arm/src/stm32f0l0g0/stm32_serial_v2.c
> > arch/arm/src/stm32f7/Kconfig
> > arch/arm/src/stm32f7/stm32_serial.c
> > arch/arm/src/stm32h7/Kconfig
> > arch/arm/src/stm32h7/stm32_serial.c
> > arch/arm/src/stm32l4/Kconfig
> > arch/arm/src/stm32l4/stm32l4_serial.c
> > arch/arm/src/stm32l5/Kconfig
> > arch/arm/src/stm32l5/stm32l5_serial.c
> >
>
>