void ADC_IRQHandler(void) Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-18 1:24 PM
I think I know the answer but I just want to be sure. Is there any way to know from which ADC the handler is called? If I am using the 3 ADCs do I need to call the HAL_ADC_IRQHandler() for all like below?
void ADC_IRQHandler(void)
{
HAL_ADC_IRQHandler(&hADC1);
HAL_ADC_IRQHandler(&hADC2);
HAL_ADC_IRQHandler(&hADC3);
}
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-18 2:02 PM
I'm sure each ADC has it's own status register flagging the source, and I'd expect the HAL handler to check this as the first order of business.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-18 2:03 PM
You can read the interrupt vector at SCB->ICSR, in the low order bits. I use it with a reentrant ADC interrupt handler to determine which converter is requesting service.
Jack Peacock- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-08-19 6:43 AM
Thank you guys!
