Skip to main content
NPhal.1
Associate
June 30, 2020
Question

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

  • June 30, 2020
  • 4 replies
  • 1355 views

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:

This topic has been closed for replies.

4 replies

waclawek.jan
Super User
June 30, 2020

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
Super User
June 30, 2020

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
NPhal.1Author
Associate
July 1, 2020

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

Tilen MAJERLE
ST Employee
July 1, 2020

@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

waclawek.jan
Super User
July 1, 2020

> i was using 84MZ APB1 bus

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

JW