Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Need to "Erase All" before I can run project without crashing.

Hi all,

I'm working on a project in SDK 5 (V17.0.2) on a custom board using a raytac nrf52840 module. IDE is segger embedded studio with a J-Link interface to the hardware.

The project has been going for a while and the code has been in a reasonably stable state.

Just recently the project has gone into a "phase" where I cannot reload new code unless I first "Erase All" flash. This is a new situation, previously I could happily reload code and continue debugging.

Now, if I write new code (or even stop and restart without code changes) and try to run in debug mode without "Erase All", the code hangs in drv_rtc_init()  at NVIC_EnableIRQ(RTC1_IRQn)

I have 2 timers running under app_timer - nothing has really changed there between when it was working normally and now.

If anyone has any ideas, it would be much appreciated.

Regards,

Carl Kamper.

Parents
  • Hello,

    Where in drv_rtc_init() is it that the code hangs? In the call to NVIC_EnableIRQ() itself? Is this something that I can replicate using a DK? Do you see it in other examples using the RTC? 

    Are you using the watchdog timer?

    Best regards,

    Edvin

  • Hi Edvin,

    I've just found some more information about the "Erase All" issue.

    I have used Port pin 1.09 as the relay control pin. This is a shared pin with TraceData3.

    I'm using SWO protocol for debug so the TraceData 1-3 shouldn't be in use but I don't really understand how to specify the TraceData pins to be in their alternate GPIO definitions.

    How do I ensure in my project that the TraceData 1-3 pins are set to their alternate GPIO use?

    Regards,

    Carl Kamper.

  • CarlK said:
    I'm not using a watchdog timer at the moment.

     Just to be clear. Did you at some point? The watchdog is a bit hard to kill, so is your chip erased since the watchdog was enabled (if it ever was)?

    Are you using a DK? Or can you try to use a DK? If so, please check out the section on trace debugging:

    https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_debug_in_trace.html

     

    CarlK said:
    but I don't really understand how to specify the TraceData pins to be in their alternate GPIO definitions.

     I don't think you can do that, but I am not sure what the trace switch on the DK does, and much less how to modify this on the raytac module. I guess you have to check with the producers. Or alternatively, perhaps you can use another pin, if it isn't too much work to change (depends on how far in the PCB design you have come).

    Best regards,

    Edvin

Reply
  • CarlK said:
    I'm not using a watchdog timer at the moment.

     Just to be clear. Did you at some point? The watchdog is a bit hard to kill, so is your chip erased since the watchdog was enabled (if it ever was)?

    Are you using a DK? Or can you try to use a DK? If so, please check out the section on trace debugging:

    https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_debug_in_trace.html

     

    CarlK said:
    but I don't really understand how to specify the TraceData pins to be in their alternate GPIO definitions.

     I don't think you can do that, but I am not sure what the trace switch on the DK does, and much less how to modify this on the raytac module. I guess you have to check with the producers. Or alternatively, perhaps you can use another pin, if it isn't too much work to change (depends on how far in the PCB design you have come).

    Best regards,

    Edvin

Children
No Data
Related