2021-04-01 12:59 PM
In CubeMX I am trying to put together DFSDM setup described in STM32L4 workshop: 4.6 New peripherals - DFSDM - App example 2 (PT100 thermometer) but for STM32H7A3VITx. Objective: fill the filter buffer with N samples every 1s. Screenshots below.
I got it working in continuous mode using "regular channel" but not with timer and "injected channel required" - "regular channel" cannot be triggered by internal timer, only "injected" can.
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 called.
What am I missing? I have tried both Circular and Normal DMA modes.
I have searched all over the Internet for a working example of such setup but I found none.
Please advise.
Timer 7 setup:
Solved! Go to Solution.
2021-04-03 12:41 AM
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 when the buffers gets full. To get series of quick measurements (e.g. 1kHz speed) I could increase timer speed but that would put too much unnecessary load on CPU while I do not care about the exact speed as long as it is known. I would be better off using regular conversion started at (e.g.) 1s interval.
2021-04-03 12:41 AM
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 when the buffers gets full. To get series of quick measurements (e.g. 1kHz speed) I could increase timer speed but that would put too much unnecessary load on CPU while I do not care about the exact speed as long as it is known. I would be better off using regular conversion started at (e.g.) 1s interval.