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

CPU reset during Debug

Hi, I testing the code using nrf5340DK kit written using nRF Connect SDK in SES. The CPU resets automatically, after few lines of code. The Output code and Task images are atached.   

Gulzar Singh 

  • Hi Gulzar

    It seems it is the call strcpy that is causing a memory fault, which implies that there is an issue with one of the buffers (esp_buffer1 or esp_buffer). 

    Can you let me know how these buffers are defined?

    Also, using strcpy is a bit risky unless you are sure that there is a terminating null character in the source string. 

    It is better to use strncpy, so that you can define a maximum length of the copy operation, which should be set to the size of the destination string. 

    The memory bus fault could be caused by overrunning the destination buffer. 

    Best regards
    Torbjørn

Related