stm32h7 adc trigger on hrtim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 6:26 AM
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?
Solved! Go to Solution.
- Labels:
-
ADC
-
HRTIM
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 12:33 AM
I was using adc dma fifo, i was playing around and forgot to turn it off and that was causing the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 6:45 AM - edited ‎2024-09-05 8:39 AM
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.
- Test 1: Decrease the timing and test.
- Test 2: Modify the priorities to let ADC having a priority > HRTIM NVIC prio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 8:34 AM
Should i priorities adc interrupt as high?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 8:36 AM
This just for test to understand the behavior.
But you need to do one test (1 or 2) at a time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-05 10:43 PM - edited ‎2024-09-05 10:44 PM
1. I set the sub priority of adc interrupt from 0->1->2 but issue was still there.
2. I decreased the trigger time to 200us, and the issue still existed.
It is missing every 3rd call back. Now call back is when the conversion is completed, what if the conversion never started? Could we look in to this?
As it is stated above, reset states hrtim callback that triggers adc and set indicates the adc call back function.
It is missing every third call back.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-06 12:33 AM
I was using adc dma fifo, i was playing around and forgot to turn it off and that was causing the issue.
