cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 SPI 16 bit transfer with a 32 bit Slave device

Nivant11
Associate

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

1 REPLY 1

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
Up vote any posts that you find helpful, it shows what's working..