2017-09-13 01:08 PM
I've got a STM32L476 with a SPI port configured as a master, talking to a single slave device. The slave device needs to communicate in 32-bit frames, with the chip select held low for the entire frame. Is there a way to do this with NSS hardware control? From what I've seen, the largest frame size I can set is 16 bits (using the DS bits in SPIx_CR2) and the NSS line toggles in between each frame.
I know I can configure the NSS pin as a GPIO and control it in software, and that works fine, but it would be nice if the hardware could take care of it.
For what it's worth, I'm using HAL drivers with STM32Cube_FW_L4_V1.8.1.
Thanks.
Solved! Go to Solution.
2017-09-13 01:25 PM
No, you can't, not simply by using the 'NSS pulse' facility of the newer SPI modules.
I pull something similar out using a combination of timer and DMA mαgic.
JW
2017-09-13 01:25 PM
No, you can't, not simply by using the 'NSS pulse' facility of the newer SPI modules.
I pull something similar out using a combination of timer and DMA mαgic.
JW
2017-09-13 03:49 PM
Ok, that's what I suspected. Thanks for confirming.