STMicroelectronics STM32 Application Note page 67

Microcontroller debug toolbox
Hide thumbs Also See for STM32:
Table of Contents

Advertisement

AN4989
Independently from the IDE, for projects including the CMSIS library, the content of the
registers in the code can also be printed:
void HardFault_Handler(void)
{
volatile uint32_t csfr= SCB-> CSFR ;
printf ( "SCB-> CSFR 0x%08x \n", SCB-> CSFR) // print
while (1)
{
}
}
The same content can as well be obtained directly from the memory with any memory
browser.
Other faults like UNALIGNED, UNDEFINSTR can be managed in a similar way.
For more details, refer to the relevant programming manual:
STM32F4 and STM32L4 Series Cortex®-M4 programming manual
(PM0214)
STM32F7 Series Cortex®-M7 processor programming manual (PM0253)
Relevant information is also available on partners websites:
https://www.iar.com
http://www.keil.com
// load into variable
AN4989 Rev 3
Exception handling
67/118
117

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF