cancel
Showing results for 
Search instead for 
Did you mean: 

Timer 6 interrupt is working in debug mode but not in run

NPhal.1
Associate

I have designed a custom board for my simple timer interrupt based application for STM32F446re it is run properly in debug mode but not working in normal run, firstly i thought may be some issue with board but if i run the code with normal delay then it work fine in normal mode. dont know how to solve the issue. keed help:sad_but_relieved_face:

5 REPLIES 5

What is the difference between "debug mode" and "normal run"? Optimization level when compiling? Then you most probably didn't use properly the volatile qualifier for variables shared between main and interrupt.

JW

TDK
Guru

You can also run the code, then attach a debugger to it without resetting. Could be stuck in a hardfault handler.

Typically when this happens, it's due to a bug in your code.

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

Previously i was using 84MZ APB1 bus now i have compiled the project with 16MHZ and now my code work properly.

@NPhal.1​ it could be linked with hardware design. Did you follow HW getting started application note? Please check here: https://www.st.com/resource/en/application_note/dm00115714-getting-started-with-stm32f4xxxx-mcu-hardware-development-stmicroelectronics.pdf

> i was using 84MZ APB1 bus

That's more than is the allowed maximum frequency for APB1, see datasheet.

JW