Skip to main content
xpp07
Associate III
Oct 19, 2018 1:15 PM UTC
Question

Is it possible to synchronize PWM on-time with an SPI reading?

I'm using Timer 1 from nucleo L432KC in PWM generation mode at 5 kHz to control a DC motor.

I'm using this current sensor TLI4970-D050T4 which gives a digital data via SPI. Is there a way I can synchronize current sampling with the PWM on-time?

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    Oct 19, 2018 2:32 PM UTC

    You could perhaps find a DMA/TIM combination to write a value to the SPI->DR

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..