This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF51822 UART and BLE

Controller- MDBT40 (nrf51822 based)

Softdevice - S110

I have an application where data comes from UART and have to send over BLE simultaneously. When I initialize the BLE, the UART code gives unexpected behavior. But when I turn off the BLE, UART works fine. Could someone tell me is this because UART and BLE interrupts are triggered at the same time? If yes then how to change their priority.

Parents
  • Hi,

    The priorities of the softdevice are fixed, you are not able to change these, as the softdevice needs to handle strict timing requirements from the BLE specifications.

    See "Exception (interrupt) management with a SoftDevice" on page 54-55 in S110 SoftDevice Specification v2.0 for more details.

    If you need to receive data on UART while CPU is busy with BLE operations, you need to upgrade to a nRF52 series IC, which have UARTE peripherals with EasyDMA support, allowing you to send/receive data directly from/to RAM.

    Best regards,
    Jørgen

  • Thanks for your reply. So now I have written a code in the following sequence

    1. Take a data from UART for 10 secs

    2. Stop the UART and send start BLE ->send data over BLE for 10 secs

    3. Stop BLE start UART again

    I have used this approach and got a problem. BLE gets connected for only one time. In the second period, it does not show in the app. So could you tell me the API to terminate the BLE connection fully?

Reply
  • Thanks for your reply. So now I have written a code in the following sequence

    1. Take a data from UART for 10 secs

    2. Stop the UART and send start BLE ->send data over BLE for 10 secs

    3. Stop BLE start UART again

    I have used this approach and got a problem. BLE gets connected for only one time. In the second period, it does not show in the app. So could you tell me the API to terminate the BLE connection fully?

Children
No Data
Related