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

Question for developing customized nrf51822 board

Hi guys, just signed up here for some help.

I was learning how to develop a project with nrf51822 core chip. The one I'm using is this one . I also have a DK for the nrf51.

I have gone through the tutorial from some of the post, for example using the UART example with DK, the board works fine.

For now my question is how could I apply the example code or develop my own code for the customized chip? I have see many post about my question but didn't really find a good answer for myself.

My concerns now is how could I set up a correct library I need for the chip? For example if I want my chip lights up a LED with interrupt and also could be connected with my iphone, how could I choose the BLE library and GPIO library code to include? How could I add them through Keil?

I have some experience using SAM W25 ARM chip and during which I have a user manual which can tell me what library should I include when I want a function, using AVR Studio ASF. But for now, I could not find such a manual or post for nrf51822 (maybe I have missed).

For my current process, I could upload the softdevice s130 to my customized board (using jLink) and could load UART example also, but I could not see the chip with my phone. Still, I'm trying to understand the code from the example.

I'm not sure if I have made myself clear, please let me know.

Thanks

update:

For the schematic, please refer the following picture. image description

For the design, I'm following the Taiyo Yuden board datasheet. image description

For the functions, I only need two pins from the controller, one is reading a interrupt and another controls an LED. For programming, I used SWD interface.

update for debug picture image description

Parents
  • Hello cookieeeeee

    As is stated in the link RK posted in his comment, the Taiyo Yuden modules do not come with a 32kHz crystal, so unless you plan to add one you need to configure the LFCLK to use the internal RC oscillator instead. The Softdevice needs the LFCLK to function so that might solve your problem.

    All the example codes in the SDK are programmed for our development kits. In each project there is a pcaXXXXX.h file (E.g. pca10028 for nRF51 DK and 10040 for nRF52832 DK) which defines the pin configurations specific for that board. When designing a custom board, you would typically create your own custom_board.h file.

    Beyond this you are free to use any of the examples in the SDK as the foundation for your code. Exactly how you add new modules depends a little on the IDE you're using. Header files are typically included at the top of main, and the source files which accompany them are added to the project. For Keil header file locations must be added to the paths list in the "Target options"->C/C++ (button with wizard wand up top), and source files are added to the folder tree on the left hand side.

    Best regards

    Jørn Frøysa

  • The thing is, I have created a breakout board using the Taiyo Yuden BLE board, I solder the board onto the breakout board and then connected SWD interface to the Jlink, there is nothing else on the board right now. The only thing I could tell is that the uVision5 has successfully load the code to the board (shows success in the dialog message window), other than that, I could not test any other function of the chip. There is a on board LED I could solder to the board and maybe try to blink it to make sure the board is working fine.

Reply
  • The thing is, I have created a breakout board using the Taiyo Yuden BLE board, I solder the board onto the breakout board and then connected SWD interface to the Jlink, there is nothing else on the board right now. The only thing I could tell is that the uVision5 has successfully load the code to the board (shows success in the dialog message window), other than that, I could not test any other function of the chip. There is a on board LED I could solder to the board and maybe try to blink it to make sure the board is working fine.

Children
No Data
Related