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

Problems with Programming nRF51822 customized board

Hi guys, me again.

I was very confused with my current process on developing with nrf chip now... so I would like to post my develop step and some problems I had so maybe you could give me some advises. I think I maybe stuck in my own circle.

I'm sorry to give such a long post here.

I have read through the tutorial about the nrf51 DK and BLE and many post about changing clock source for example. For the DK, I could successfully load the code to the DK, for example the UART transmission example and use my phone to communicate with it.

For the step for developing the DK, I first load the softdevice using command line tool, the softdevice I load to the DK is from SDK 12.2, s130, version is 2.0.1. Then I open the example in Keil, build up and then load to the DK, it was fine.

So, then I would like to try the code with my own board. First, I was using the nrf51822 module from Taiyo Yuden Inc, which the board them made doesn't have an external clock source, so I have changed the clock source to the internal RC clock source with the following code in example code in Keil5.

//set up clock source
 nrf_clock_lf_cfg_t rc_cfg = 
{
    .source = NRF_CLOCK_LF_SRC_RC,
    .rc_ctiv = 16,
    .rc_temp_ctiv = 2,
 };

// Initialize SoftDevice.
SOFTDEVICE_HANDLER_INIT(&rc_cfg, NULL);

For the board I'm using, please refer to the following image: image description

I connect the SWD interface to the Jlink and since the board doesn't have the reset and SWO, I only use the SWDIO and SWCLK to the Jlink. Then with the Jlink connected, I used command line tool to program the softdevice to this board. The command line tool shows the softdevice has been programmed. image description

Then I open the example in Keil5, for this time using the uart example also. I build and then load to the board. image description

After this, I open my phone and use the nordic app to scan the board, there is nothing. For my point, I was trying to see if I could program the board to be scanable and also can be connected with phone, then develop some other functionalities base on that, but I could not see the board.

Did I do anything wrong with the procedure?


That was what I have done with the Taiyo Yuden board. Since the board has all the pins under the chip, I thought maybe there is something wrong with my soldering, so I used another chip which all the pins are on the side of the board so I could see actually I have soldered them correctly. The board I'm using is this one.

For this board, I was trying some similar procedure.

I first used the nRFGo studio to program the softdevice, same version from the previous one. image description

Then I tried to load the example code from Keil, but I got an error that the Flash Downloaded fail. At first, the error says Flash Downloaded fail - could no open XXX\XXX\XXX.axf file. image description ....I was so confuse by now....

Another concern is that, if I change the device to the nrf51822_xxAA which I used with the board, the device became red and there is no update option to use for the files. image description image description

It was a long post, but I you have any idea which step I did wrong, please let me know.

Thanks

  • I just opened up the example it is set for 51422. You can leave it like that. The only difference is flash space between the two parts. IROM 1 is start 0x1b000 size 0x25000 IRAM1 is start 0x20002080 and size 0x5f80

    Occasionally the rom settings move a little on SD versions. If nRFGO still complains double check the settings with the SD release notes.

  • I should clarify the error is from the rom settings being wrong since nRFGo doesn't care about the ram settings. But likely both are wrong in your project.

  • Thanks for your kind reply.

    I will go through the nRFGo studio again to build my project.

    Thing is, my project need to have a BLE function to the phone so I could transfer some data in between, that's why I was trying to load a uart or a beacon code to my own board so that I could make sure my boards works with BLE and base on that I could then add more function into it. Just like when first develop a chip using LED blink example to make sure the board works.

    I just tried use nRFGO to load the UART code with DK, it works fine, but if I load the code to my own board, nothing happens, I change nothing in the code.

    Do you think my way would work?

    I will try find more on how to use the nRFGO and solder some new boards and do again.

  • Can you add segger_rtt tracing to your example code? Run the example code in the DK and check the trace in RTT viewer in your pc, then run the example code in the Rigado BMD200 and check the trace again in the RTT viewer. Also, can you double check the Segger JLink flasher connection to the Rigado BMD200? I assume you have a separate Segger JLink flasher and are not using the nRF51 DK to program the BMD200, right?

  • Yes, for now I switch to first try play around with the Rigado chip. I used a Jlink connecting the SWD interface from the chip and use nRFGo to load the code.

    I think the connection is ok since I now use a brand new Rigado chip, and use the nRFGo to programm it. Upon opening the nrfgo, it says you must erase the chip before you can programming, then I just click the erase and the chip is successfully be erased, and with this I think the connections are good.

    For the RTT debug, I have tried with this link. Since the SDK I'm using is ver 12.2.0, I assume I just need to do the configuration in the wizard, which I did. Then I load the code, open the RTT terminal, but there is nothing print on it.

Related