2024-04-18 05:03 AM
Hi!
I wonder if it is possible to set up the STM32H7B3 µC as a synchronous usart slave with the usart1 peripheral. From the reference manual it seems that it is only possible to set it up in 'SPI-mode'. The functionality I want is a USART slave that transmits data packets at a fixed rate(i.e. 1kHz) with no NSS, at the bit-rate determined by a continuous clock provided by the master.
Any clarification would be appreciated!
Solved! Go to Solution.
2024-04-29 01:43 AM
Hello @HansPLJ
Have you attempted to control the chip select using GPIO pins?
2024-04-26 06:34 AM
Hello @HansPLJ
Synchronous slave mode is fully supported on USART1 of the STM32H7B3 MCU. For further details, please refer to Section 53.4 in the Reference Manual RM0455, as indicated in the table below.
You can refer to this example which describes an USART-SPI communication (transmit/receive) between two boards where the USART is configured as a slave.
2024-04-26 07:07 AM
Hello Omar!
Thank you for you input!
I was a bit inaccurate in my post. My needs are maybe atypical, but I'm trying to implement an asynchronous communication protocol that communicates at a frequency determined by a continuous input clock. For the SPI slave mode, there are timing requirements (time between chip select edge and first clock edge) that appear to not be compatible with my requirements of an continuous clock at the input.
I suspect that this somewhat unusual functionality is not supported by st libraries.
HP
2024-04-26 01:35 PM
The baudrate detection function allows to precisely tune to the peer's rate.
2024-04-29 01:43 AM
Hello @HansPLJ
Have you attempted to control the chip select using GPIO pins?
2024-04-29 02:15 AM
Hi Omar!
I don't see how this will solve the timing constraints since the state and phase of the clock will be unknown when enabling the CS. Maybe some additional logic and an analogue and-gate in front of the clock input could work.
I will revisit this issue come summer.
Thanks for your proposals
HP