AN4989 Rev 3
67/118
AN4989
Exception handling
117
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 ; // load into variable
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
Содержание STM32 Series
Страница 46: ...Connecting to the board AN4989 46 118 AN4989 Rev 3 Figure 30 Keil hotplug step2 ...
Страница 91: ...AN4989 Rev 3 91 118 AN4989 Debug through hardware exploration 117 Figure 69 STM32F4 F7 dual MCO capabilities ...
Страница 103: ...AN4989 Rev 3 103 118 AN4989 Managing DBGMCU registers 117 Figure 78 Generator Options debug MCU in STM32CubeIDE ...