T. Jastrzębski
T. Jastrzębski

Reputation: 185

STM32H7 and timer-triggered DFSDM conversion - how to?

For the last two evenings I have been trying to set up timer-triggered DFSDM conversion on STM32H7A3 MPU with no luck. Googling I hound no single complete example, perhaps because DFSDM is more advanced topic.
Objective: fill the filter buffer with N samples every 1s.
I attach screenshots of the CubeMX setup. The conversion works as expected in the continuous mode, so the channel and clock setup is correct.
In code, before starting the 1s timer (HAL_TIM_Base_Start()) I call HAL_DFSDM_FilterInjectedMsbStart_DMA().
Neither DFSDM1_FLT2_IRQHandler() nor DMA1_Stream2_IRQHandler() is being fired.
What am I missing?

filter setup

DMA setup

timer 7 setup

Upvotes: 0

Views: 796

Answers (1)

T. Jastrzębski
T. Jastrzębski

Reputation: 185

There was nothing wrong with this setup. The problem was that filter buffer was way too large and I was not patient enough.
However, this approach does not fulfill my needs. On every timer tick a new value is added to the buffer and HAL_DFSDM_FilterInjConvCpltCallback() is called only when filter buffers gets full. To get series of quick measurements (e.g. 1kHz rate) I could increase timer speed but that would put too much unnecessary load on CPU while I do not care about the exact rate as long as it is known. I would be better off using regular conversion started at (e.g.) 1s interval.

Upvotes: 0

Related Questions