Can I copy the ESB code from SDK v3.3.0-preview3 into SDK v2.9.0, and then get the functionality in esb_ptx_ble & esb_prx_ble?
Is there any way to achieve it quickly?
Can I copy the ESB code from SDK v3.3.0-preview3 into SDK v2.9.0, and then get the functionality in esb_ptx_ble & esb_prx_ble?
Is there any way to achieve it quickly?
Hello,
Not sure I understand what problem you are trying to solve here, there should be ESB example projects for the nRF52840 in both the nRF Connect SDK releases you are referring to.
Can I copy the ESB code from SDK v3.3.0-preview3 into SDK v2.9.0, and then get the functionality in esb_ptx_ble & esb_prx_ble?
There may be some api changes, but for most part I would expect it should be pretty straight forward possible yes.
Kenneth
Hello,
Using nRF Connect SDK v3.3.0, one device runs esb_ptx_ble and broadcasts 2 packets of data every 5-10ms, with 15 devices running esb_prx_ble,esb rx interval 7300ms,rx window 15ms, 30 seconds is a receiving cycle, and failure to receive a packet of data within the cycle is considered a failure; After running 15 devices for a few days, occasionally one device experiences dozens of consecutive cycles without receiving data. Why is that?
Hi Edvin,
I tried to reproduce the issue using the nRF52840 DK, but haven't encountered it yet. As mentioned earlier, it might take 5-10 days for the problem to appear.
Best regards,
Leo
I understand. Let me know if you are able to.
I canæt see that you have uploaded any code (other than snippets). But looking at NCS v3.3.0, these lines:
[00:08:53.592,987] <err> esb: Failed to initialize PPI [00:08:54.115,539] <err> esb: gppi_channel_alloc failed with: -12
Seems to come from:
v3.3.0\nrf\subsys\esb\esb.c:
static mpsl_timeslot_signal_return_param_t *ts_start_action(void)
{
nrf_radio_mode_set(NRF_RADIO, (nrf_radio_mode_t)esb_cfg.bitrate);
update_radio_crc();
update_rf_payload_format(esb_cfg.payload_length);
update_radio_addresses(ADDR_UPDATE_MASK_BASE0 | ADDR_UPDATE_MASK_BASE1 |
ADDR_UPDATE_MASK_PREFIX);
nrf_radio_fast_ramp_up_enable_set(NRF_RADIO, esb_cfg.use_fast_ramp_up);
#if defined(CONFIG_ESB_FAST_CHANNEL_SWITCHING)
nrf_radio_int_enable(NRF_RADIO, NRF_RADIO_INT_RXREADY_MASK);
#endif /* defined(CONFIG_ESB_FAST_CHANNEL_SWITCHING) */
apply_radio_init_workarounds();
int err = esb_ppi_init();
if (err) {
LOG_ERR("Failed to initialize PPI");
and v3.3.0\nrf\subsys\esb\esb_ppi.c:
...
error:
LOG_ERR("gppi_channel_alloc failed with: %d\n", ch);
return -ENODEV;
}
-12 means -ENOMEM
So it is trying to allocate a PPI channel, but it can't because it has used all it's resources (channels?).
Are you using the SoftDevice controller as well as ESB?
You say that it takes several days to reproduce. Does that mean that the application has executed for several days before the issue occurs, or does it fail quickly after a reset/reboot?
Can you please confirm whether you did any (!) changes to the two files where this log comes from? That is, esb.c and esb_ppi.c?
Is esb_init() called several times in your application? Or just once at bootup?
Is esb_disabled called before each re-init attempt (if any)?
Do you have any logs from when the issue starts and/or stops? That is, the lines before the repeating two-liner, or the lines when it manages to recover from it? Do they say anything interesting?
Best regards,
Edvin
Hi Edvin,
Hi Edvin,
I encountered a similar issue during my tests using the nRF52840DK. You can open the esb_prx_ble_test_0917.log file and search for "HARD FAULT" to see the specific details.
Based on NCS v3.3.0.
Test Steps:
1. Burn esb_prx_ble_test.hex to the nRF52840DK.
2. View the logs using J-Link Viewer.
3. The nRF52840DK will scan for nearby BT devices (RSSI>=-50) and attempt to connect.
4. If the connection is successful, it will disconnect after 5 seconds.
5. Steps 3 and 4 will be automatically repeated.
esb_prx_ble_test.zip
Best regards,
Leo
Hi Edvin,
I encountered this bug again. It seems the logs are printed by the "ts_start_action" function and don't notify the outside world via the ESB_EVENT_TIMESLOT_FAILED event. Therefore, my application layer is unaware of the PPI error and doesn't reboot the device.
I'm using ESB + BLE central with several peripherals connected, which seems to make this bug more likely to be triggered.
Error log:
00> [09:52:57.440,979] <err> esb: gppi_channel_alloc failed with: -12
00> [09:52:57.440,979] <err> esb: Failed to initialize PPI
bridge-interconn-0812-1734.log
Best regards,
Leo
Hi Edvin,
I encountered this bug again. It seems the logs are printed by the "ts_start_action" function and don't notify the outside world via the ESB_EVENT_TIMESLOT_FAILED event. Therefore, my application layer is unaware of the PPI error and doesn't reboot the device.
I'm using ESB + BLE central with several peripherals connected, which seems to make this bug more likely to be triggered.
Error log:
00> [09:52:57.440,979] <err> esb: gppi_channel_alloc failed with: -12
00> [09:52:57.440,979] <err> esb: Failed to initialize PPI
bridge-interconn-0812-1734.log
Best regards,
Leo