STM32 ADC Interrupt?

An area to discuss ARM specific problems and examples

Moderator: Benj

Post Reply
User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

STM32 ADC Interrupt?

Post by fotios »

Hi
Each of the four ADC of STM32F3 generates an interrupt after the end of conversion.
Taking as an example the Single Conversion Mode:
1) Inside the regular sequence, after each conversion is complete:
• The EOC (end of regular conversion) flag is set
• An interrupt is generated if the EOCIE bit is set
2) After the regular sequence is complete:
• The EOS (end of the regular sequence) flag is set
• An interrupt is generated if the EOSIE bit is set
These interrupts are not included in FC7.
Should we write a custom interrupt code?

Thanks
Best Regards FOTIS ANAGNOSTOU

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32 ADC Interrupt?

Post by LeighM »

I’ve done an experimental update to the F303RE FCD, if you would like to try it out.
I’ve not had the time to test it, but it might work and help you :)
The ADC value should get passed as the parameter to the macro created for the interrupt.
I’ve only implemented ADC1 for initial testing.
Just create an ADC1 interrupt, set the config parameters and create the associated called macro
(give it a UINT parameter, e.g. the value can be copied to a global variable in the macro body)
This interrupt implementation does not use or need a Flowcode ADC component.
Attachments
32F303RE.fcdx
(54.44 KiB) Downloaded 221 times

Post Reply