cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the serial port print irrelevant information when I jump into the FLASH APP using the IAP I wrote?

fujiangmu
Associate II

fujiangmu_0-1769570775488.pngfujiangmu_1-1769570844224.png

 

4 REPLIES 4
TDK
Super User

My guess is your application writes to UART1 as well.

Nothing wrong that would explain this in the code you've shown.

If you feel a post has answered your question, please click "Accept as Solution".

FLASH APP? It's only in EXTI2_IRQHandler().

But I didn't trigger the interrupt.

fujiangmu_1-1769581694089.png

 

LCE
Principal II

Disable the EXTI interrupt before the jump.

At least on a H7 a lot of de-inits and interrupt disabling is done before jumping.

Maybe before jumping you first de-init / change the GPIO config, and that triggers the EXTI interrupt.
So try to disable EXTI first, the de-init the GPIOs.

LCE
Principal II

BTW, so many (and long) for-loops in an ISR are usually not considered good design, unless you have some very specific reason for that.

Why not just set a flag and then "print" in the main loop?