Nrf52 Hang during continuous operation

We are facing an issue in nrf52840 (SDK 15). Our hardware uses timer, SPI, USB, FLASH and uDMA. implemented watchdog timer and its working fine as well intented. But in some cases we feel it device is got hanged ( dont know whether execution happened in the device No timer interrupt are working) device is not responded even if we are attaching USB ( USB interrupt is activated). We didn't get any issue in debug mode (using NRF DK). if we reattached the hanged device (Once this error happened in field) to DK for debugging device get restarted from zero. Our device is a continuous data logger so how we can debug this issue and is it any specific area we need to look.
Also all time this error is not happened around 10 installation 1 or 2 may be failed like this incident and issue is not hardware specific as well.

Parents
  • Hi Vijay,

    It is a bit hard in this case to even get a direction of suspects which could be causing issue in your case as it is too little information to process.

    But in some cases we feel it device is got hanged

    You should add more logs into your application to get a sense of application running or stuck in a loop/hardfault/hanged. This is particularly important since connecting the debugger seems to make the problem go away. There could be some timing issues as well in your application just based on the fact that you see issues only when debugger not connected.

  • Thanks for the feedback.
    We added log in maximum possible locations but unfortunately we cant pointed out the issue In debug environement.

    loop/hardfault/hanged.

    If device is in loop mode USB interupt or timer interupt may work (Done in threading operation in controller). am i right?
    if device is in  hardfault or some error condition appear can we restart the controller from default location (Similar to WDT)

  • asv said:
    If device is in loop mode USB interupt or timer interupt may work (Done in threading operation in controller). am i right?

    Interrupts should work if the application managed to run till the point where the peripheral is configured correctly. But if the application faults or deadlocks before that point, then the peripheral is not configured to generate interrupts. Also make sure that you are compiling your project with no optimizations on code size and speed so that the code is generated for best debug experience. 

    asv said:
    if device is in  hardfault or some error condition appear can we restart the controller from default location (Similar to WDT)

    The fault handler should allows the application to handle the faults in a custom way. You are free to edit the default fault handling of the fault by the system.

Reply
  • asv said:
    If device is in loop mode USB interupt or timer interupt may work (Done in threading operation in controller). am i right?

    Interrupts should work if the application managed to run till the point where the peripheral is configured correctly. But if the application faults or deadlocks before that point, then the peripheral is not configured to generate interrupts. Also make sure that you are compiling your project with no optimizations on code size and speed so that the code is generated for best debug experience. 

    asv said:
    if device is in  hardfault or some error condition appear can we restart the controller from default location (Similar to WDT)

    The fault handler should allows the application to handle the faults in a custom way. You are free to edit the default fault handling of the fault by the system.

Children
No Data
Related