cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4: SPI, NSSP and CHPA

wimalopaan
Associate

I like to use SPI in continous DMA mode together with a SPI-slave that uses the falling-edge of the spi clock (AS5048A: https://ams-osram.com/products/sensor-solutions/position-sensors/ams-as5048a-high-resolution-position-sensor). So, I have to use CHPA=1. But setting this, the NSSP hardware management does not work.

I'm looking for a solution that makes continous dma handling possible. 

As a workaround I am using an interrupt-trigger GPIO solution for the NSSP pin. But that results in a interrupt load, that would be unneccessary, it the dma could operate circular continous.

I there another workaround? Maybe using some hardware modification?

Thanks!

1 REPLY 1
MasterT
Lead

When NSSP is not available, I chained two timers, one generates CS, another -gated mode with prescaler /16 provides 16 pulses SCLK. Both pins jumped to SPI-slave, up to 1 msps on F4 /F7 and more with H7