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

ESB on the Sparkfun pro NRF52840 mini

Hello!

I'm struggling to get ESB running on the Sparkfun Pro NRF52840 mini. I successfully set up the toolchain and can build and flash the board. This works fine.

I built the ESB example of the SDK and flashed it on the chip. Running the esb_init(); function works fine, but the chip resets during the
nrf_esb_write_payload(&tx_payload) statement. According to sparkfun, the S140 SoftDevice is preinstalled, is this a problem? Or does the bootloader makes any trouble?

Thank you for your help!

Yours

Benjamin

  • I think i found a problem. When i deleted the
    LDFLAGS += -Wl,--gc-sections in the makefile, the chip does not reset after sending. It does indeed send, i can receive it. But it somehow gets stuck after sending.

  • Now i got one and I use it as a J-Link debugger. It seams like the problem is due to placement of the code in the flash memory. I overrode the bootloader and now it works fine. But I'm now not able to use the convenience of the bootloader.

  • Hi,

    Sorry for the delay.

    Can you please describe the problem once again starting from how your application will work so that we can have rough idea about bootloader and stuff?

    What I can understand is you will be using ESB protocol for data transfer; your device restarts while writing data and you want bootloader(maybe to update firmware not sure via BLE or USB or some other purpose) for which you are having difficulty with flash region.

    Would you please describe your problem with bootloader like what do you want to achieve or where things aren't working?

  • Thank you for your reply!

    At first i simply want the ESB examples, in the newest version of the Nordic SDK, running on the Sparkfun Pro NRF52840 Mini. I've been able to achieve this, but with the downside of loosing the bootloader. Because I've overwritten it. I placed the firmware directly at the beginning of the memory.

    My problem was in conjunction with the bootloader. I've setup the toolchain and IDE according to 
    https://learn.sparkfun.com/tutorials/nrf52840-advanced-development-with-the-nrf5-sdk .
    I've also adapted the memory definitions. Now i programmed the board with the DFU via USB and it was successful. At first the contoller ran without a problem. The problem occured as soon as i started to use ESB. The MCU allways rested AFTER "nrf_esb_write_payload(&tx_payload);". I could switch a LED after this statement, but the MCU reseted anyway. I could also not read POWER.RESETREAS, because the JLINK debugger resets the chip itself. Well i could read it, but it was allways reseted by the SWD pin.

    I don't need the bootloader, it would just be more convenient. I would like to be able to update the firmware via USB. But it is not that important, this is just an evaluation-project. I'm trying to assess the NRF52840 and ESB for our application.

  • Hi,

    Perfect!

    Let's try to

    1) Run a simple application without bootloader to test ESB protocol.

    2) Add bootloader for which we simply need to modify a part of code and memory location and are good to go.

    Erase complete memory of nRF52840 and flash ESB Tx example on one board and Rx example on another from

    {SDK}\examples\proprietary_rf\esb_prx
    {SDK}\examples\proprietary_rf\esb_ptx

    Test the program, include DEBUG while compiling if you encounter some error and let us know aout it.

    Remember to use correct board file parameters i.e. pca10056 which refers to nRF52840-DK; you can use the same config parameters even if you aren't using DK.

Related