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

Programming the nRF52840-DK

I am new to the NRF52840-DK. To burn the program into the kit, I have lots of tries to install nrfGo studio but it gives me the "no board detected readback protection" error. So, I installed nRF Connect v3.0.0 PC tool and add programmer app.

By using this app, I am able to load the program into the board.

Here, my concern is that when I am loading the pre-compiled .hex file given by Nodic, it has included three memory region- MBR or Application, SoftDevice, and Application.

Now, I have made little change in the code and compiled my project which is generated .hex file. When I tried to load this file, it has shown me only the Application region and When I am loading this by doing "Erase and Write" option in the tool it is not working.

There is one option in the tool for only "Write" but it is not enabled.

What should I do here? If we only want to load application image what we do here? Like we have the option in nRFgo studio for selection Application, Boot-loader, and SofDevice.

  • awneil said:
    I think that all of Nordic's SES example projects do this where required ?

     Yes, that is correct.

  • AP040 said:
    I tried this but not working. How it does not overlap the section?

    If you try to program something to a flash page that already has some content (anything other than ff's), that means it overlaps. Similarly, if you try to merge two hex files that have data in the same region there is an overlap. This will not work.

    AP040 said:
    If I want to merge the bootloader and softdevice where I can get those .hex files?

    The S140 SoftDevice .hex file can be found under <SDK>\components\softdevice\s140\hex\. The application .hex file is produced by your toolchain/IDE and the location depends on the IDE and how it is configured, but it will typically be in a subfolder relative to the project file(s).

    AP040 said:
    I am using the IAR Workbench. How I did the programming into the NRF52840? Can you give step by step guidance?

    If you use an example IAR project you can choose to download the file to the target directly in IAR, or chose to debug it. In that case, it will be programmed first. However, you also need to remember to program the SoftDevice, as this is not done automatically. You can do this using nrfjprog, nRF Connect Programmer or any other method you prefer. Alternatively, you can use SES as suggested by , as this will program the SoftDevice for you automatically.

  • It is simpler to just program them separately most of the time

    Agreed.

    Re-programming the Bootloader and/or SoftDevice every time is just a waste of time.

    It is better to keep the number of unknowns as low as possible in the beginning

    Absolutely!

    And, for that reason, I would suggest starting with the examples which don't even use a SoftDevice (ie, no BLE).

  • Yes, I agreed that it is a waste of time.

    But, for one-time programming, it is necessary. After that only application image, we need to load into the board.

    By the way, at the starting phase, all this stuff is a little bit confusing for me.

    I found a way to burn the program into NRF52840-DK by using SEGGER J-Flash Lite 6.48 and attached screen-shot of it.

    This is a proper way to do it? I think it will be better to have a proper download tool for flashing the images. Because it is a very tricky one for the beginner to understand it. I hope NRF will lunch the new tool for nrf52840-DK like nrfGo studio.

  • AP040 said:
    This is a proper way to do it?

     That is one way of doing it. There is no proper way per se, as there is a number of different tools that all do the job.

    AP040 said:
    I think it will be better to have a proper download tool for flashing the images. Because it is a very tricky one for the beginner to understand it. I hope NRF will lunch the new tool for nrf52840-DK like nrfGo studio.

    We have. That is the nRF Connect Programmer app that you have been trying, In my opinion, nRF Connect Programmer is more userfriendly, especially since it shows you the memory map of the hex files you have added and the target. So you can easily see how everything fits together. There is, of course, a need to understand the memory layout for it to make sense, but that is something you need to understand when you develop for a uC.

Related