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 );

Posted on October 03, 2014 at 17:24

Look at SCB

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html

DEBUGEN

http://www.keil.com/appnotes/files/apnt209.pdf

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337e/CEGCJAHJ.html

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Gabriel Germanovix
Associate II
Posted on October 03, 2014 at 21:06

Many thanks!!!