I develop on a map I’m working on STM32 and USART interrupts. After configuring the USART1 and make Enable receive interrupt. The problem that the interruption of reception have no detected????
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Such a question is difficult to answer without knowing which specific processor you are using, which board you are using, and/or which compiler you are using. But in an attempt to be helpful, here’s my code.
Here’s my GPIO and NVIC initialization code using Sourcery CodeBench Lite with an STM32F4 processor mounted on a custom board.
Of course your settings will vary depending on your processor, board and interrupt priority.
Here’s my interrupt handler code. In my development environment, this handler is declared in my startup assembly file as a weak reference to
Default_Handler…… so as long as I provide a new declaration and implementation of this interrupt handler, the weak reference will be replaced. Here’s what my code looks like.
If you are using C++ you will need to declare it as follows:
And here’s the interrupt handler implemenation.