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

Device reset is happening again and again while calling the function

Hi,

I am working on project which is based on nrf9160. I added the source files and user define header files . and also given the path of source file in CMake file. Build is successful. But when i put the break point in function (function defined in some other source file and i m calling function from some other file) ,it is not juming to the function. Before jumping to function device get reset. Please help me out

2. after reset of device and when debugging is stopped it is showing like this -

  • Hi,

     

    It looks like you're not able to enter debug mode successfully.

    Do you see the same behavior if you erase the device (from command line: nrfjprog -e -f nrf91), then enter debug mode (shortcut: F5)?

     

    Is there anything printing on the uart that indicates a fault?

     

    Kind regards,

    Håkon

  • Hi,

    I can able to enter in debug mode and can able to debug some of the functions . I am sending the data from real term to nrf  through the uart and can able to receive data in real term  after that when received data is processed through the other function , it is not hitting  some of the break points , and before hitting  to those  function device got reset. I called those function from one file and define those functions in some other file.

    Is there anything printing on the uart that indicates a fault? - NO

    It is only showing after the reset  -Timeout while preparing target, RAMCode did not respond in time. What does it means ?I checked [ABANDONED] Timeout while blank checking, RAMCode did not respond in time and updated the J-link version but still facing the same issue .

    What is this - CPU_REG_Set() : Register 0 is already marked as valid.

     

  • Hi,

    Why the data section from the solution build is not updating . As i defined some of the functions in Protocol_SupportFuncs.c and Calling those functions from the MICmdInterpreter.c but why data section from solution build is not updating , Those function are creating a device reset which i defined in Protocol_SupportFunc.c and  Ascii.c .

  • Hi,

     

    shruti mishra said:
    Why the data section from the solution build is not updating . As i defined some of the functions in Protocol_SupportFuncs.c and Calling those functions from the MICmdInterpreter.c but why data section from solution build is not updating , Those function are creating a device reset which i defined in Protocol_SupportFunc.c and  Ascii.c .

    Is the added usage used, or is the compiler/linker dropping some code? Can you check your build output before and after adding the code?

    I tried this and it updates the RAM and flash usage accordingly at my end after rebuilding:

     

     

    shruti mishra said:
    Those function are creating a device reset which i defined in Protocol_SupportFunc.c and  Ascii.c .

     Are you able to see where or get a fault print out? Can you try to select "ASSERT" in menuconfig (or open prj.conf and add CONFIG_ASSERT=y) to see if this has an impact?

     

    Kind regards,

    Håkon

Related