cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f407 - Have any register status which identify debug mode? - SOLVED

Gabriel Germanovix
Associate II
Posted on October 03, 2014 at 17:09

Hello,

I'm trying to identify when program is on debug mode or not.

As semihosting (interrupts) breaks the program when it calls printf(). I hope to read a flag to identify that i'm not on debug mode and with this I don't call the printf()..

Any one have some idea?

Thanks..

#debug #stm32f4 #status
3 REPLIES 3
chen
Associate II
Posted on October 03, 2014 at 17:19

debugDetect = ( CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk );

Gabriel Germanovix
Associate II
Posted on October 03, 2014 at 21:06

Many thanks!!!