Error in SystemCoreClockUpdate at initialization with nonsecure TFM

I am getting this error in Ozone:

"The target stopped in HardFault exception state.

Reason: A fault with configurable priority has been escalated to a HardFault exception at 0x0002A5A2."

system_nrf5340_application.c line 66:

SystemCoreClock = __SYSTEM_CLOCK_MAX >> (NRF_CLOCK_NS->HFCLKCTRL & (CLOCK_HFCLKCTRL_HCLK_Msk));

0002A5A2   LDR.W          R2, [R3, #0x0558]

I am building with nonsecure TFM. What could be the reason for this hard fault?

Edit: In ozone I am loading zephyr.elf, could this be related to missing memory addresses from the binary? Should I generate a merged.elf?

Parents
  • Hello,

    In ozone I am loading zephyr.elf, could this be related to missing memory addresses from the binary? Should I generate a merged.elf?

    If the device it's already programmed, then it should be fine to only load the zephyr.elf. It contains the debug symbols you need to debug the application.

    But please check that Ozone is not configured to set any initial PC value. Otherwise, it may make the device start execution directly from application's reset handler and cause execution of TF-M to be skipped.

    Best regards,

    Vidar

Reply
  • Hello,

    In ozone I am loading zephyr.elf, could this be related to missing memory addresses from the binary? Should I generate a merged.elf?

    If the device it's already programmed, then it should be fine to only load the zephyr.elf. It contains the debug symbols you need to debug the application.

    But please check that Ozone is not configured to set any initial PC value. Otherwise, it may make the device start execution directly from application's reset handler and cause execution of TF-M to be skipped.

    Best regards,

    Vidar

Children
No Data
Related