Hi all,
we are porting a firmware from a M4 to A7 micro (single core).
The code is very simple and checks if the micro is in debug mode.
if (CoreDebug->DHCSR & 1)
{
__BKPT (0);
}
Please, is there equivalent code?
Thanks!
See the DSCR (bit 0)
https://developer.arm.com/documentation/ddi0379/a/Debug-Register-Reference/Control-and-status-registers/Debug-Status-and-Control-Register--DSCR-
The below article may also be useful:
https://developer.arm.com/documentation/ka005695/latest/
Thanks a lot, Ronan.
are there defined symbols/structs to easily access to the register and bit ?
I'm looking for them in STM32MP13xx_HAL_Driver folders but found nothing, so far.
Thanks again!
I am not aware of what STM provide, but you will likely need to #define these yourself.