Clear pending interrupts STM32F411 #16167
Replies: 1 comment
-
Appears the best thing to do is to disable interrupts, not clear them. https://community.st.com/t5/stm32-mcus-products/how-to-clear-all-pending-interrupts/td-p/61696 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am a beginner when it comes to interrupts in Micropython. After struggling with an ESP32 I decided to move to a bare-metal thinking the RTOS was getting in the way.
What I thought I wanted to do was after servicing a wanted interrupt that I would clear any pending interrupts, say after 1 second. Then wait for the next wanted interrupt, which could be minutes later.
The project it a traffic light system. I thought I'd use interrupts to move to the next state AND that would allow me to flash the lights to save power.
Is asyncio a better solution?
Thanks for any suggestions.
PS Fortunately, disabling interrupts and only enabling the next expected interrupt seems to provide a lot more reliability.
Beta Was this translation helpful? Give feedback.
All reactions