We are currently facing a troublesome issue: we need to send 242-byte data packets at a fixed 3ms interval. We connected an LED light after the data transmission module to observe the time taken for data sending.
When K_MSEC() in the main function is set to 50, the LED blinks approximately every 47ms. At this point, the data packet sequence numbers are continuous, transmission works normally, and the actual interval is 50-60ms. However, when K_MSEC() is set to 3, the LED blinks about every 2.7ms, while the data packet sequence numbers become discontinuous with massive losses, and the actual transmission interval still remains 50-60ms.
We intend to achieve data transmission every 3ms, so setting K_MSEC() to 3 seems appropriate in theory. But in practice, it feels either blocked, or that the Bluetooth module tries to send at such a high speed but is restricted by certain limitations (The transmission pattern shows that the first few packets are sent continuously—there are over 20 packets sent in the first second—but then the transmission becomes discontinuous and the number of packets drops). We also printed the data sent when K_MSEC is 3 via the serial port, which shows numerous failed transmission attempts, with only one successful transmission occurring within a certain period.
When using the NRF52840, we could enable continuous transmission within two handshake intervals by configuring
NRF_SDH_BLE_GAP_EVENT_LENGTH=16. However, we cannot find a suitable corresponding variable in the NRF5340. The connection event interval was also crucial for NRF52840, but we have not found any directly relevant settings in NRF5340 either. The only similar configuration we found is CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=50000, yet this configuration is highlighted in yellow, indicating a failed setting.
Attached are my current configuration files, relevant code, and experimental phenomena. We would greatly appreciate your help.










