cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP135f-dk USART synchronous mode support under Linux – CK signal not driven

Icyjkk
Associate

Hello,

 

I am working with an STM32MP135f-dk device running Linux and trying to evaluate the possibility of using the USART peripheral in synchronous mode (TX/RX + CK).

 

From a hardware point of view, the STM32 USART clearly supports synchronous operation. However, when using the standard STM32 USART Linux kernel driver, the peripheral is only exposed as a /dev/ttySTM* device and operates strictly in asynchronous (UART) mode.

 

As far as I can see, the current driver does not enable or drive the CK clock signal, which makes true synchronous USART communication impossible under Linux, even though the underlying hardware is a USART.

 

My questions are:

1. Is this limitation expected by design in the current STM32 Linux USART driver?

 

2. Has anyone successfully implemented synchronous USART on STM32 under Linux, for example by: Extendimg the existing driver, writing a custom kernel driver, or using an alternative ?

4 REPLIES 4
mfgkw
Senior III

Regarding 1.: yes

/dev/tty* seem to support only async mode, see https://wiki.st.com/stm32mpu/wiki/USART_internal_peripheral "4. Software frameworks and drivers":

Linux®: serial/tty framework; however, the Linux® kernel supports only the UART Asynchronous mode (Synchronous mode not supported)

 

So another driver will be required...

I know that at lower levels (TF‑A, U‑Boot) the USART can be used in synchronous mode, but under Linux the official driver only supports asynchronous UART and does not generate the CK signal.
Is there any alternative driver or known solution that enables synchronous mode on Linux?

Hi,

I'm not SW expert, so, I don't know if USART synchronous Linux driver (and associated framework) exists.
Maybe try to use SPI instead of USART for synchronous communications.

Otherwise, build you own custom driver.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Tip of the day: Try Sidekick STM32 AI agent, see here

Maybe have a look to 
https://wiki.st.com/stm32mpu/wiki/USART_internal_peripheral#Software_frameworks_and_drivers

which mention optee driver for USART synchronous for smartcard communication.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Tip of the day: Try Sidekick STM32 AI agent, see here