This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DFU and Fatal Error can not re-start system

Hi,

I'm using SDK17.02 on nRF52810, when my application have an error, it will log "fatal error" but never reset system. BTW, I'm not debugging and just watching the RTT VIWER with j-Link.

I will re-power after download also.

But when I shield NRF_BREAKPOINT_COND, my system will reset successfully.

Also, when my device working with DFU successfully, the system will not reset unless re-power.

Parents
  • Hello,

    Try defining "DEBUG" in your preprocessor definitions, and then keep monitoring the RTT viewer. If you are not sure how to do that, please let me know what compiler/IDE you are using. 

    But when I shield NRF_BREAKPOINT_COND, my system will reset successfully.

    What do you mean by shielding NRF_BREAKPOINT_COND?

    What does the log say when you add "DEBUG" to your preprocessor definitions? It will probably point to some location in your code where you will find an APP_ERROR_CHECK(err_code). What is the err_code, and what function returned it?

    Best regards,

    Edvin

  • I need to do like this the system would be reseted when occured an error.

    I do not care what's the err_code, because I made an error on purpose just like initialize uart twice.

    Shouldn't it be restarting when the system fails? So does DFU.

  • You should see that the log says "Fatal error", and then "System reset" over and over.

    Yes, that's my problem. I'm not in debugging session, and just watching RTT Viewer. And my system will stop at "Fatal error" but never showing "System reset". I can upload my project if you need.

  • Ah, sorry that I didn't catch that before. When I tested, I was using the UART log backend, and not the RTT, which was why I wasn't seeing the same behavior. 

    When you connect the RTT viewer, it counts as a debug session, because RTT is communicating with the nRF through the debugger. If you use UART as log backend, it will not stop. Otherwise, it will stop on a breakpoint as long as you are using the debugger (unless you comment out the BREAKPOINT_COND).

    Best regards,

    Edvin

  • Ok...Do you mean I can not enable RTT log backend or just only disconnect J-link even I had enabled RTT backend?

  • Taylor said:
    Ok...Do you mean I can not enable RTT log backend or just only disconnect J-link even I had enabled RTT backend?

    You can leave RTT logging enabled, but when you open RTT-Viewer, it will be counting as a debug session. 

Reply Children
No Data
Related