Skip to main content
Visitor II
November 7, 2025
Question

STM32G4: SPI, NSSP and CHPA

  • November 7, 2025
  • 1 reply
  • 138 views

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!

    This topic has been closed for replies.

    1 reply

    Explorer
    November 7, 2025

    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