Skip to main content
Zain
Associate III
September 5, 2024
Solved

stm32h7 adc trigger on hrtim

  • September 5, 2024
  • 1 reply
  • 1331 views

I am triggering adc every 100us in dma and getting data in adc callback. I am triggering adc with hrtim compare 3.

 

//hrtim cmp3 event call back

{

//reset a pin.

}

 

//adc conversion call back

{

//set a pin

}

 

for some reason the reset pin is working every cycle but set pin skips its cycle.
It means adc call back not working every cycle?
What can cause this kind of behavior?

Best answer by Zain

I was using adc dma fifo, i was playing around and forgot to turn it off and that was causing the issue.

1 reply

mƎALLEm
Technical Moderator
September 5, 2024

Hello,

To me, it could be either the NVIC priority Level or the timing 100us which is very relatively high to let ADC interrupt handler to be executed.

  1. Test 1: Decrease the timing and test.
  2. Test 2: Modify the priorities to let ADC having a priority > HRTIM NVIC prio.
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Zain
ZainAuthor
Associate III
September 5, 2024

Should i priorities adc interrupt as high?

mƎALLEm
Technical Moderator
September 5, 2024

This just for test to understand the behavior.

But you need to do one test (1 or 2) at a time.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.