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

Getting started with nrf51822 modules and st-link.

Hello.

I'm tying to learn nrf51822. I had ordered some modules from ebay and nrf52-dk from local distributor . A week ago I had receive some modules. But local distributor says that nrf52-dk is late and won't delivered before middle of January. So, I'm trying to work with modules and st-link from st32nucleo board. And I had faced the some problems.

Here is that's modules: www.ebay.com/.../192371985227 (E77-2G4M04S)

[1].Have someone know something about it?

As I haven't original j-link, I'm trying to work through st-link (from stm-nucleo board).

As I understand before working with any examples I must flash softdevice into nrf51822 module, and after that I can flash exampls. Currently I have two modules, one of them already was erased few times by me. Another module has stayed with default firmware, but I don't know what is it and what version is it.

[2]. Is it possible to figure out what is contains by default into ROM of that's module?

When I try to flash blank (erased) module, I had faced some issues:

[3]. Into what ROM address a must flash softdevice (for example s130). As I understand, softdevice must be placed before application, and as I suppose, it must be 0x0. And, in this case, application must be plased starts from 0x1B00. Am I right?

[4]. Is it bootloader (or something else) must be placed before softdevice? And if it is, what is it and where I can get it and how a can flash it into ROM?

[5]. Is it possible to get know that softdevice had written (flashed) ok? (considering thats, nrf51822 module hasn't any leds or buttons. just SWCLK, SWDIO, GND, VCC and IO pins)

[6]. I have tried flash softdevice into module (starts from 0x0 ROM address) through st-link (Keil). But after that, a can't flash any examples (starts from 0x1B00) - I've got message "Programming Failed! Error: Flash Download failed - "Cortex-M0"". So, I think I'm missed something but I don't know what.

  • (1/2):

    1. Sorry I misunderstood. If you ask about this specific module I have nothing to add.
    2. If you dump it then you compare the memory areas with all Soft Device versions in question. It must match 100% otherwise its not that particular SD version. Easy and clear as black and white.
    3. Solved.
    4. Solved.
    5. You asked about SD only and the answer is no, you cannot verify Soft Device functionally because it does nothing! Yes, you should flash it with some application and then you can verify whatever application allows you: LED blinking, buzzer beeping, UART printing some strings, radio shining to the universe... the problem is that all ready-made examples are delivered only for Nordic Dev Kits (which is logical, they cannot cover all obscure Chinese modules), so the proper sequence would be a) develop something with PIN and LFCLK settings on nRF5x DK and b) try it on target.
  • (2/2)

    1. ...

    2. ...

    3. ...

    4. ... (I hate some auto-editing functions of this forum engine;)

    5. (continue) ...which isn't your case as you are waiting for your Dev Kit. So unless your lovely Chinese vendor delivers some supposedly working examples in binary form (like HEX files) you seems to be out of luck on this point. Sorry.

    6. ST-Link should be able to flash any ARM Cortex-M chip but I do agree that theory is one thing and torture to make it work another. If you are in Central Europe I can borrow you some of mine, otherwise I hope your DK board(s) will arrive soon.

Related