cancel
Showing results for 
Search instead for 
Did you mean: 

Non-standard SPI transfer and receive options

RMas
Associate II

I'm using a STM32G4 and communicating with multiple devices that use a 16 bit + 1 bit (write/read bit followed by six register address bits, 16 data bits, and a parity bit MSB first) on SPI. What I'm seeing is on transfers i have to shift my data 1 bit to the left for the devices to accept the write and reads vary but are mostly unusable. Is there a way to send non standard frame sizes, preferably with the clock and bits shifting continuously until the parity bit? I was hoping for a built in HAL or api method, but from my research it seems I may have to implement this completely in software, which i have not explored how to do just yet with this hardware.

1 REPLY 1

The hardware does not support 17 bit transfers, so why would you expect a "HAL or api method" to do that?

What happens if you transfer more than 17 bits (e.g. 2x9 = 18)? Can you point to the target devices' datasheet?

JW