esb, shockburst, running on nrf5340dk's

I have 3 nrf boards connected. 2x nrf52832 and 1x nrf5340.

esb_tx is running on nrf52832(682782977)
esb_rx is running on nrf52832(682497942) & nrf5340(1050025410)

west build -b nrf5340dk_nrf5340_cpunet -p builds correctly and flashes without error

PS C:\nrf\esb_prx> west flash -d build_1
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner nrfjprog
There are multiple boards connected.
1. 1050025410
2. 682782977
Please select one with desired serial number (1-2): 1
-- runners.nrfjprog: Flashing file: build_1\zephyr\zephyr.hex
[ #################### ] 2.055s | Erase file - Done erasing
[ #################### ] 0.243s | Program file - Done programming
[ #################### ] 0.243s | Verify file - Done verifying
Applying pin reset.
-- runners.nrfjprog: Board with serial number 1050025410 flashed successfully.

esb_rx is working on the nrf52, but not on the nrf53.

... To be through, I powered down esb_tx_nrf52832(682782977) and flashed another nrf5340dk(1050077823) and programmed it to be esb_tx:

PS C:\nrf\esb_ptx> west flash -d build_1
-- west flash: rebuilding
ninja: no work to do.
-- west flash: using runner nrfjprog
There are multiple boards connected.
1. 1050025410
2. 1050077823
3. 682497942
Please select one with desired serial number (1-3): 2
-- runners.nrfjprog: Flashing file: build_1\zephyr\zephyr.hex
[ #################### ] 2.044s | Erase file - Done erasing
[ #################### ] 0.235s | Program file - Done programming
[ #################### ] 0.236s | Verify file - Done verifying
Applying pin reset.
-- runners.nrfjprog: Board with serial number 1050077823 flashed successfully.

Although 1050077823 (nrf5340-esb_tx) flashed correctly. Blinky continues to run (as it already had) on nrf5340-esb_tx, which probably makes sense, but I'm not getting any kind of esb response from either (nrf52832 or nrf5340) esb-rx.

There is something I am not understanding about how to flash to nrf5340_CPUNET? Maybe it's flashing correctly, but esb needs to be called from CPUAPP to start it working?? I'm close, but missing something...

Ultimately the goal is to have a network of nrf5340's in a Star configuration. I see that there is shared memory between CPUAPP and CPUNET. I assume somehow it's used to pass data from CPUAPP to CPUNET for transmission/reception. I don't exactly understand how that works either, but I figure the first step is to get the esb Sample to work on nrf5340dk's without modification. But, if there are additional samples that target this use case I would be interested in reviewing those too.

The final configuration goal is to have the center of the star network also be running BLE-UART (so the central esb in the Star Network will relay the esb data from the nodes to a BLE app). I am assuming that there is no problem running both esb and BLE at the same time.

esb_prx_ptx.zip

  • Hi Torbjørn,

    I am hoping you can help me with the ble-esb-mpsl-demo. I saw that you updated it yesterday. I upgraded to nRF Connect SDK v2.6.0 to match the requirements.

    You code worked exactly as expected. It's the lbs part that is a problem for me. Instead of the boolean from the button, I need to relay the esb_rx data as it arrives directly to BLE so I needed to modify that part of the code. It is close to working... The attached image shows what I changed and where I think the problem is.

    Standard esb_tx is already setup in my custom application. I don't believe it makes a difference, but I am using the standard esb_tx sample as the sender not the esb_tx from your demo. I think that is why I am getting the "Counter" warning.

    I never need esb_tx and BLE to run at the same time. I only need esb_rx and BLE to timeslot.

    1. removed all nrf5340 files for my own clarity, I'm using nrf52840dk board.
    2. copied lbs.c and lbs.h into the project so that I could modify/replace: bt_lbs_send_button_state()
    3. adjusted CMake to reflect file changes
    4. commented out CONFIG_BT_LBS and CONFIG_BT_LBS_POLL_BUTTON

    when I press the button I now call "bt_lbs_send_button_state_2()" with a pointer to a data array. I receive the mock data array over BLE as expected.

    However, if I use the esb_callback function to call "bt_lbs_send_button_state_2()" I get the "No ATT channel for MTU...etc..." problem.

    Calling "bt_lbs_send_button_state_2()" directly from within the esb callback caused a kernel panic so I added a workqueue.

    As always, you help is greatly appreciated!

    6303.ncs-esb-ble-mpsl-demo.zip

  • Hi Mike

    What if you try to send 20 bytes only, rather than 64? Does it work fine then? 

    Since I only used the LBS sample in the example I didn't bother configuring the BLE stack for extended data length or ATT MTU, which is probably why you are having issues getting larger notifications to work. 

    Could you try to copy the configuration from a different example I worked on recently, which is set up for high throughput? 
    You will find the relevant appcore config here and the netcore config here

    Best regards
    Torbjørn

  • Hi, I'm also interested in the coexistence of BLE and ESB, were there any developments in the last year? I think I read somewhere that this is supported, but I have not found anything other than this thread.

    Cheers

Related