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

I don't know use ble_radio_notification library

Hi,

In my project, I am use nRF52832 for controlling ws2812b led strip with 8 leds.

I am use SDK 14.2 and s132_softdevice_5.0.0. 

I have problems with the latency of softdevice that danified the led frame and the color show by led is not that I intended. I read that the ble_radio_notification library can resolve my problem but I don't kown how to implement it.

Parents
  • Explaining more clear, I am using Bluetooth communication for receive frame of the app mobile and i2s communication for frame send for ws2812b. For i2s communication, I am supporting in libary of Takafumi Naka. My problem is that if I define and send frame for 7 LED the project fine work but If i define more than 7 LED the project don't work corretly. I read in other article that this problem is caused by latency of interruption of the softdevice and that ble_radio_notification can resolve this problem. I want kown if ble_radio_notification is solution and if it is how I should use.

  • Hi,

    It could be that the Softdevice is interrupting your I2S communication. I can think of a couple of solutions:

    1. The radio notifications will let you know in advance when the Softdevice is about to use the radio. This allows you to stop whatever critical tasks you are doing in a controlled manner. However, if you are in the middle of transmitting something with the I2S, it might not be feasible to just stop. 
    2. Use the Timeslot API. This API can be used to suppress SoftDevice radio activity and to reserve guaranteed time for application activities with hard timing requirements, which cannot be met by using the SoC Radio Notifications.
    3. Use the EasyDMA feature in the I2S. This allows you to prepare a buffer and have the I2S transmit the buffer directly from RAM, completely independent of the CPU and Softdevice. In other words, you can prepare the buffer without worrying about whether the Softdevice steals some CPU run time. Then you trigger the transmission and the Softdevice can do whatever it wants in the meantime. 

    If I were you, I would look at the EasyDMA options first. 

Reply
  • Hi,

    It could be that the Softdevice is interrupting your I2S communication. I can think of a couple of solutions:

    1. The radio notifications will let you know in advance when the Softdevice is about to use the radio. This allows you to stop whatever critical tasks you are doing in a controlled manner. However, if you are in the middle of transmitting something with the I2S, it might not be feasible to just stop. 
    2. Use the Timeslot API. This API can be used to suppress SoftDevice radio activity and to reserve guaranteed time for application activities with hard timing requirements, which cannot be met by using the SoC Radio Notifications.
    3. Use the EasyDMA feature in the I2S. This allows you to prepare a buffer and have the I2S transmit the buffer directly from RAM, completely independent of the CPU and Softdevice. In other words, you can prepare the buffer without worrying about whether the Softdevice steals some CPU run time. Then you trigger the transmission and the Softdevice can do whatever it wants in the meantime. 

    If I were you, I would look at the EasyDMA options first. 

Children
Related