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

mbed app loaded to drive works, downloaded to firmware does not

quick-stop_2_with_soft_filter_NRF52_DK (1).hexI imagine that my question is just one from lack of experience. I apologize for that but I cannot find any information on the Internet to address this problem. I load my mbed developed app hex file to the nrf52 DK by copying to JLINK drive and it works great.

Now wanting to load it to firmare and used nrfjprog to write it to firmware. Write went fine. Did a compare to check it was loaded and no problem but it does not run when I do a reset or on/off.

Can you guide me to what I am missing?

Thank you, Mark

Parents
  • Solved. I found out both methods load the flash. Using the JLink drive executes the application immediately (even though documentation suggests a reset has to be done). nrfjprog does not seem to do immediate execution.

    It seems that doing the reset breaks the application I wrote. I traced it to a wait statement in main. Code starts like this:

    main(){

    led1 = 0; wait(5); led1 = 1; ...

    I removed the wait statement and the application runs perfectly. I have no knowledge of why the wait statement would freeze things (and only after a reset) but that is what caused the failure. (the wait statement was put in to allow a user to turn on and set down the IOT device and walk away before activating a tamper sensor).

Reply
  • Solved. I found out both methods load the flash. Using the JLink drive executes the application immediately (even though documentation suggests a reset has to be done). nrfjprog does not seem to do immediate execution.

    It seems that doing the reset breaks the application I wrote. I traced it to a wait statement in main. Code starts like this:

    main(){

    led1 = 0; wait(5); led1 = 1; ...

    I removed the wait statement and the application runs perfectly. I have no knowledge of why the wait statement would freeze things (and only after a reset) but that is what caused the failure. (the wait statement was put in to allow a user to turn on and set down the IOT device and walk away before activating a tamper sensor).

Children
Related