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

Instructions for setting up nrf51 DK that work

Its clear there is little interest in this DK compared to the nRF52 version. I got instructions for that platform that actually worked.

Not so for the nRF51 DK. But I am stuck using it, otherwise I would toss it in the trash.

Follow the procedures to install SoftDevice from Keil. It actually worked. What the instructions did not tell me was that the memory addresses were wrong. When I tried to install the demo application (health thermometer), I got the dreaded Cortex-M0 error.

The reasons were one of several according to this site one being no power to the chip (obviously not the case since SoftDevice loaded). The other reason was an address conflict. Sure enough, the address for the SoftDevice installation in Keil was the same as the application space. Arrg. So now I had to erase that and try a re-install. Was able to erase but not re-install. At least with Keil. The docs said I had to use nRFGo Studio. Arrg! More crap to install. Installed but did not work. Uninstalled. Out of desperation I used the Nrf Connect tool and that did work! But now when I try and install the hts example application I get that dreaded Cortex-M0 error with the unable to read memory location 0x20000000 which is the start address configured in the flash.

I still have not figured out a solution and there are so many conflicting and incomplete instructions that I don't know what to do.

Would be nice if there was somewhere a SINGLE clear, correct, and tested set of instructions to use the nRF51 DK with the examples in the corresponding SDK.

Parents
  • Hi. 

    I'm sorry that you have had problems to get your project working on the nRF51-DK. 

    From what you said, you found a reference to nRFgo Studio in the doc. so I'm a little curious which doc/guide you are following. nRFgo studio is now deprecated and nRF connect for desktop - programmer should be used instead (however, nRFgo studio should work with nRF51-DK). 

    Anyway; 
    The nRF51 Development Kit User Guide v1.2 should provide you with the information you need to get started with the DK.

    Br, 
    Joakim

  • Joakim,

    There were several issues that were left out of any instructions and information I found. I was shooting in the dark and went down many rabbit holes in the meantime. Bortkastad tid om du fattar vad jag menar.

    In the end the problems were two fold

    1. When changing the target device in Keil, Keil resets the address boundaries to defaults making the installation of SoftDevice and the application conflict.

    2. If you fix that, using the Keil option to migrate the project format to the version 5 does the same thing (and maybe resets more).

    I was doing both, partly because when I was working with SDK 8 I had to migrate to Keil 5 format to get target device options listed in the 'Devices' tab. That extra step is not needed in SDK 10+.

    I suppose what would have saved me the most if some where in the documentation this resetting by Keil of the memory layouts was mentioned, especially when you reset the target device as that is something many might do.

    I wonder how many of those 'Flashing Failed Cortex-M0' error messages would have been resolved or not have happened if the above were made known. One should probably add that if you DONT fix the memory address boundaries that you will get such errors when flashing SoftDevice and your project..

Reply
  • Joakim,

    There were several issues that were left out of any instructions and information I found. I was shooting in the dark and went down many rabbit holes in the meantime. Bortkastad tid om du fattar vad jag menar.

    In the end the problems were two fold

    1. When changing the target device in Keil, Keil resets the address boundaries to defaults making the installation of SoftDevice and the application conflict.

    2. If you fix that, using the Keil option to migrate the project format to the version 5 does the same thing (and maybe resets more).

    I was doing both, partly because when I was working with SDK 8 I had to migrate to Keil 5 format to get target device options listed in the 'Devices' tab. That extra step is not needed in SDK 10+.

    I suppose what would have saved me the most if some where in the documentation this resetting by Keil of the memory layouts was mentioned, especially when you reset the target device as that is something many might do.

    I wonder how many of those 'Flashing Failed Cortex-M0' error messages would have been resolved or not have happened if the above were made known. One should probably add that if you DONT fix the memory address boundaries that you will get such errors when flashing SoftDevice and your project..

Children
  • I totally understand what you mean. 

    SDK v.8 was released even before I started working for Nordic, so I don't really have any experience with that. What I would recommend, is using the latest version of the SDK with native support for nRF51, which is nRF5 SDK v.12.3.0. 

    From your answer I get that you have managed to solve your issues. But if you need any further assistance, please let me know. 

    Br, 
    Joakim

  • Sometimes one doesn't have a choice. I am no embedded programmer but I do understand BTLE (at least with respect to health devices and the needs of such). I was given the task to fix the code in a production pulse ox device using the nRF51822. I did write a rather large gateway test suite using the pc-ble-driver for health devices on the nRF52840 Dongle so I had some familiarity with Nordic chips. I had the source code for their module which was using s110 SoftDevice and an SDK that frankly, I don't know. I am working now with SDK 12.3.0 but it may come back to bite me if I cannot update the SoftDevice on that chip to s130. The code I am not worried about; I'm starting from scratch.

    So that is why I am working with 'ancient' SDKs.

    By the way, I would need to use this forum a lot less if your documentation had a better search engine. There is a huge amount of information in that documentation, and when you are not familiar with the system its very difficult to find what you are looking for. Picking the right search word is very difficult here. I was looking for a Nordic analog to Posix semaphores. I searched on the words 'semaphore', 'wait', and some others. Nothing. Then I came upon a page with the word 'wait' in the text. So I searched for the word 'wait' and got nothing! And it was right there in front of me in plain sight. If that search function was anything like most search methods people would probably need far fewer desperate posts in this forum. I know I would need a lot fewer.

    By the way, I still have not found an analog for Posix semaphores. I posted a question on that in this forum.

  • brianreinhold said:
    By the way, I would need to use this forum a lot less if your documentation had a better search engine.

    I can forward this internally. We appreciate feedback from our customers!

     

    brianreinhold said:
    I still have not found an analog for Posix semaphores. I posted a question on that in this forum.

    I can see that we have received your ticket. This will be assigned and handled by another application engineer here at Nordic. He/She will get back to you as soon as possible.

    Br, 
    Joakim 

Related