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

Keil run button doesn't work

Hi,

We have a custom board with nRF52840 based ISP1807 and developed the fw to some point. For some reason we tried to run the same fw on the nRF52840 DK rather our custom board to make sure of something. However when we try to debug on DK  the Keil Run button  is greyed out, we are not able to press it. We don't have such a problem with our custom card. 

I used to have a similar problem with dongle but I think it was kind of a different problem.

What could be reason and solution for a such condition?

Best,

Den

Parents
  • Hi Den,

    This will happen if execution has not reached the file you are debugging. For instance if you are using a bootloader and that does not start the application for some reason, like a CRC mismatch which you will get if you have not programmed a valid settings page or modified the bootloader to to skip the CRC check. I suspect this was also the issue in your old thread with a similar topic.

    Einar

  • Hi Einar,

    Thanks for your quick response.

    In the older the thread I was trying to debug the Dongle with an external debugger. I do not remember the details of doing so but I remember playing with the bootloader, DFU etc. (could not solve it at that time). I was not able to upload any applications as far as I remember.

    However in this case it's just and application that is supposed to work on every nRF52840. What could be reason for CRC mismatch? I did not change anything with the bootloaders. Moreover I am able to upload and run some of the provided examples but my own code.

    If you still think that it is the indeed the cause, will the suggested solution in the old thread solve my problem? Does it have any risks of making the mcu unusable? I could not manage to solve it last time, but if you suggest so I give it another try.

    Thanks

  • Hi,

    Den said:
    However in this case it's just and application that is supposed to work on every nRF52840. What could be reason for CRC mismatch?

    If you don not have a bootloader in the board, then that is not relevant. Except if you did at some point and still has a MBR (or full SoftDevice), and did not do a full chip erase. In that case, the UICR could still hold a bootloader start address so that the MBR would branch to where the bootloader used to be.

    Den said:
    Moreover I am able to upload and run some of the provided examples but my own code.

    Then it is tempting to think that either your cod/app has the wrong start address, or it depends on either a MBR or SoftDevice and you forgot to flash it. If it is missing, then execution will stop before it ever reaches your code, and so there is nothing for Keil to continue from when debugging (execution never reached the part you are debugging).

    Den said:
    If you still think that it is the indeed the cause, will the suggested solution in the old thread solve my problem? Does it have any risks of making the mcu unusable? I could not manage to solve it last time, but if you suggest so I give it another try.

    Not the details itself. The point is that it looks like execution never reaches the app you are debugging. This could be caused by several reasons as described earlier in this post. And how to solve it depends on what causes the issue.

  • Hi again,

    After establishing the connection with JLink, "erase" command performs a full chip erase. Am I right? That's what I do. Then I enter the loadfile command with the location of the softdevice hex file. Both commands are verified once they are executed.

    Am I missing anything?

  • I think it was because of the softdevice version. I was trying with version 6.1.0. Version 7.0.1 has solved the issue. 

    Thanks for the help anyways. 

Reply Children
No Data
Related