cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use the SAI peripheral with the data line only - SD_A or SD_B (without outputting the peripheral clock signal) when using the "free protocol" mode for a single-wire communication purposes?

Ond?ej Bure¨
Associate II

Dear STM32 MCUs community,

I am currently working on a project with the STM32l452RET6 MCU with a goal to use the SAI peripheral for one-directional single wire communication purposes, so only the "data line" (SD_A or SD_B) will be outputted using the GPIO. For this purpose there is no need to output also the SAI peripheral clock line. 

When I configure the SAI peripheral as a "Master transmitter" in an "asynchronous mode" and "Free protocol mode" everything works just as I expected, but only if I also configure also the GPIO pin that outputs the SAI peripheral clock (SCK_A or SCK_B). If I configure just the GPIO pin for data line (SD_A or SD_B) pin, data are not transmitted (until I also configure the GPIO for SAI peripheral clock).

My question is: is it possible to use the SAI peripheral with the data line only - SD_A or SD_B (without outputting the clock peripheral) when using the "free protocol" mode for single-wire communication purposes?

Kind regards,

Ondrej Bures

4 REPLIES 4

Doesn't your experiment prove that it's not possible?

The SPI module is known to be unable to receive without feedback from physical SCK pin, even if it's set as master it it drives the SCK pin. I am not surprised SAI to have a similar limitation.

JW

LCE
Principal

If that STM's SAI can do SPDIF TX and the SPDIF format is okay for you, you could try using that.

SPDIF is made for 1-wire transfers.

Thank you for your reply. Unfortunately the SPDIF format is not that configurable as I need in my particular case, but you are right - this mode runs indeed only on the data line.

Thank you for your reply. Actually I am a bit worried it is as you say. But to be honest I did not know that SPI peripheral suffers from this problem as well.