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

Getting nRF51 Dev Kit To Communicate With nRF24L01+ Modules

Hello, I just downloaded Keil and ran through a few tutorials for the nRF51 Dev Kit, so I am brand new to this development environment.

I am trying to get the nRF51422 Dev Kit to communicate with our other nRF24L01+ modules. For starters, I just wanted to get a simple application running where all its doing is listening, and whenever a payload comes over it displays it with printf so it shows up in Termite serial terminal.

I downloaded the SDK_11, and found a project in examples\peripheral\radio\receiver\pca10028\arm5_no_packs and I figured this would be a good start to modify this project into something that I described above.

Am I on the right track here? Are there other projects that might get me up and running faster? I'm not gonna lie, the way this library is programmed is significantly different than our nRF24L01+ libraries, so there is some confusing stuff in here.

Any help or advice would be greatly appreciated!

Here are the settings we are using with all of the nRF24L01+ devices:

  • 250kbps data rate
  • Channel 37 (e.g. 2437MHz)
  • Audo-acknowledgement and auto-retransmission disabled
  • Address width - 5 bytes
  • Payload size - 32 bytes
  • Max CRC setting (2 bytes)
  • Both receive and transmit address is E7E7E7E7E7
  • Only using data pipe 0
  • Hi

    The transmitter and receiver examples in the SDK are very simple, and doesn't follow the ShockBurst protocol used by the nRF24L01+.

    To establish communication between the nRF24L01+ and your nRF51 kit you essentially have two options:

    1. Change your nRF24L01+ configuration to use the auto ACK feature. This enables the Enhanced Shockburst protocol, which is supported in the official SDK. Then you can use the ESB examples in the nRF5 SDK as a counter point, which can be found in the \nRF5_SDK_vx.x\examples\proprietary_rf\ folder.

    2. Keep the nRF24L01+ configuration, and download the un-official micro ESB library here.

    Micro ESB is a precursor to the ESB library in the SDK, and supports the legacy ShockBurst mode (auto ACK disabled).

    Hopefully this is enough to get you started. If you encounter any problems along the way I will do my best to help ;)

    Best regards
    Torbjørn

  • Hello, thanks for the info! I downloaded the micro ESB library like you mentioned, unzipped it to examples/proprietary_rf/nrf51-micro-esb-master. then opened the uVision project I found in the prx/arm folder. I clicked rebuild and I get these errors:

    C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.11.1\Device\Include\nrf51.h(119): error: #5: cannot open source input file "core_cm0.h": No such file or directory #include "core_cm0.h" /!< Cortex-M0 processor and core peripherals
    C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.11.1\Device\Include\nrf51.h(119): error: #5: cannot open source input file "core_cm0.h": No such file or directory #include "core_cm0.h" /
    !< Cortex-M0 processor and core peripherals
    C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.11.1\Device\Include\nrf51.h(119): error: #5: cannot open source input file "core_cm0.h": No such file or directory #include "core_cm0.h" /*!< Cortex-M0 processor and core peripherals
    ....\common\micro_esb.c: 0 warnings, 1 error "._build\tiny_esb_ptx.axf" - 3 Error(s), 0 Warning(s).

  • Ok, I was able to search around and find those files, and it now compiles. I attempted to download it to the nRF51 dev kit, and the first error I get is a message box popup "Cannot Load Flash Programming Algorithm!", then followed up by "Error: Flash Download failed - "Cortex-M0"".

    EDIT: I was able to extend the Ram For Algorithm size to "0x2000" and it seemed to load ok.

  • Do you have two nRF51 kits, so you can try to get them to communicate first?

    Have you made sure to change the ESB settings to match that of your nRF24L01+?

    You should see the lights blinking when the demo is working properly. If you connect the virtual UART from the nRF51 DK you should also get some log output to help debug the application.

Related