Skip to main content
Visitor II
October 6, 2023
Question

STM32 SPI 16 bit transfer with a 32 bit Slave device

  • October 6, 2023
  • 1 reply
  • 853 views

Hello,

 

I had a general inquiry about using SPI. We are trying to use the STM32F446xC as the microcontroller to control a SPI-to-CAN controller (TCAN4550) which does 32 bit transfers. The microcontroller can only perform 8 or 16 bit transfers through SPI. We were thinking of using a bit-banging approach. We would basically manually control the CS line and perform two 16 bit transfers in order to perform SPI writes. Does this seem like a viable option? Also we are a bit confused and would appreciate any advice on how to handle SPI reads from the TCAN4550 to the STM32 given the 16bit limit.

 

Thank you

This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
October 6, 2023

Do pairs of words..

The STM32 controls CS by disabling the SPI peripheral not via number of words or bytes. In most objective cases you need to manually drive CS in any case.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..