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

Unable to transmit at 100Hz with nRF51822

I've created 2 custom PCB boards, 1 main board and 1 dongle based on the nF51822. The Dongle board uses the default ble_app_uart_c code. The main board transmits to the Dongle board every 8ms (it is a ble_nus_string_send() call controlled by the APP_TIMER and called every 8ms) On both the boards, the minimum connection interval has been set to 7.5ms and maximum to 7.5ms as well. However, I can only achieve a maximum transmission frequency of ~60Hz. I should be able to get ~133Hz. Can anyone advise on how I could do this? I just need to get to 100Hz, not even 133Hz. 

Parents
  • Hi,

    The nRF51822 is capable of running a BLE with an interval of 7.5ms. For some reason, your system is not running at this max frequency.

    The first thing I would do to debug this is temporarily removing the code you have for queuing data and adding a short code snippet which queues a packet for sending every time a packet is sent (listen to SoftDevice events and queue packets). This is simply to make sure that there is constant data to send and then you should be able to see if the problem is in the configuration of the Bluetooth link or in the way your implementation give data to the SoftDevice.

    Another solution which can be very effective to debug this is to run a sniffer like the nRF sniffer 2.0 beta and see what connection parameters the devices are actually using. I suspect that you are either sending about half your packets empty or that the connection parameters are wrong. Feel free to share a sniffer log with me if you need help analyzing it.

    Best regards,
    Rune Holmgren

  • Hi there! Thanks for the reply. How do I listen to these packet sent events on NUS? I tried listening for the BLE_EVT_TX_COMPLETE and then sent a packet everytime that triggered. But it didn't work. It never really triggered. Any suggestions?

Reply Children
Related