This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

/* force unlock interrupts */ NRF9160

Hi all,

I have mqtt sample on my board, after I added MCUboot module from Configure nrf Connect SDK Project, when I try to debug, it gets stucked at :

#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
         /* force unlock interrupts */
           eors.n r0, r0
          msr BASEPRI, r0

On serial console it`s stucked in this loop : 


***** Booting Zephyr OS v1.14.99-ncs2 *****
[00:00:00.004,455] <inf> mcuboot: Starting bootloader
[00:00:00.013,122] <inf> mcuboot: Primary image: magic=unset, copy_done=0x3, image_ok=0x3
[00:00:00.024,688] <inf> mcuboot: Scratch: magic=unset, copy_done=0x50, image_ok=0x3
[00:00:00.035,644] <inf> mcuboot: Boot source: primary slot
[00:00:00.047,027] <inf> mcuboot: Swap type: none

On Segger Embedded studio I got : 

Preparing target for download
Executing Reset script TargetInterface.resetAndStop()
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
Downloading ‘merged.hex’ to J-Link
Programming 33.8 KB of addresses 00000000 — 0000875f
Programming 161.0 KB of addresses 0000c000 — 0003440f
J-Link: Flash download: Bank 2 @ 0x00000000: 2 ranges affected (204800 bytes)
J-Link: Flash download: Total time needed: 1.793s (Prepare: 0.083s, Compare: 0.018s, Erase: 0.000s, Program: 1.635s, Verify: 0.007s, Restore: 0.049s)
Download successful
Stopped by vector catch

Thanks for help :).

Parents
  • Hi.

    Are you using Segger Embedded Studio (SES) to debug, or something else?

    Are you running the mqtt_simple sample unmodified (except for adding CONFIG_BOOTLOADER_MCUBOOT=y to your prj.conf)?

    Does the device only get stuck when you try to debug it? Does it work as expected when you are not debugging?

    Are you trying to debug MCUBoot, SPM, or the mqtt_simple application?

    When debugging, you can add CONFIG_DEBUG_OPTIMIZATIONS=y to have the compiler "optimize for debugging experience".

    Finally, to my knowledge, SES has not yet implemented a workaround to errata 29, which might also cause problems in this case. Can you try to run nrfjprog -e from the command line before starting a debug session and see if the problem still persist?

    Best regards,

    Didrik

Reply
  • Hi.

    Are you using Segger Embedded Studio (SES) to debug, or something else?

    Are you running the mqtt_simple sample unmodified (except for adding CONFIG_BOOTLOADER_MCUBOOT=y to your prj.conf)?

    Does the device only get stuck when you try to debug it? Does it work as expected when you are not debugging?

    Are you trying to debug MCUBoot, SPM, or the mqtt_simple application?

    When debugging, you can add CONFIG_DEBUG_OPTIMIZATIONS=y to have the compiler "optimize for debugging experience".

    Finally, to my knowledge, SES has not yet implemented a workaround to errata 29, which might also cause problems in this case. Can you try to run nrfjprog -e from the command line before starting a debug session and see if the problem still persist?

    Best regards,

    Didrik

Children
  • Hello I managed to get rid of that error, the soultion was to uncheck  Validate image in the primary slot on every boot from mcuboot menu settings, but I don`t really know how to fix that error ( now my issue is that I can't use boot_write_img_confirmed() because is stops at the start with console error :


    Exception occurred in Secure State
    ***** HARD FAULT *****
    Fault escalation (see below)
    ***** BUS FAULT *****
    Precise data bus error
    BFAR Address: 0x50008120
    ***** Hardware exception *****
    Current thread ID = 0x20021d74
    Faulting instruction address = 0x2e5d4
    Fatal fault in ISR! Spinning...

  • Hi, and sorry for the long delay.

    I am not able to recreate your problems on my end.

    What version of NCS and the modem firmware do you use?

    Also, could you share a bit more details about what you are doing and where the errors occur?

    Best regards,

    Didrik

Related