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

The failure of get rssi

My nrf51 SDK version is like this,
nrf51 9.0
softdevice 130
chip:nrf51822_xxAArun ble_central_and_peripheral connectivity example,
The nrf51 board is controlled by host MCU though UART.
When my Host MCU get the connected event,
Call API "sd_ble_gap_rssi_start(m_conn_handle, 10, 0);"
When get the rssi changed event,
Call API "
sd_ble_gap_rssi_get(m_conn_handle, &rssi);"
Then I found API "sb_ble_gap_rssi_get" didn't return.
The NRf51 chip seems was frozen.
If I call these two APIs just in the nrf51 chip, such as running ble_peripheral/ble_app_template example.
It works properly.

For resolving this issue, I update the SDK from 9.0 to 11.00,
The freeze issue still exist.
So I think there are problems about the UART comunicate between Host MCU and NRF51.
NRF51 can't handle the "get rssi" command which is from hos MCU.
So it may be a problem of NRF5 SDK.
Could you reproduce this issue between host MCU and NRF51?


Thanks

  • Hi there,

     

    seems like you might be calling sb_ble_gap_rssi_get from a interrupt priority higher than SVC. In this case you will get a hardfault. Can you start your application in debugger and step though the code to see whathappens after the call sb_ble_gap_rssi_get. 

  • >seems like you might be calling sb_ble_gap_rssi_get from a interrupt priority higher than SVC.

    1. I didn't modify the nrf51 firmware and just run connectivity of  ble_central_and_peripheral example.

    In host MCU side, the other APIs works properly and just API "sb_ble_gap_rssi_get" works abnormally.

    (I didn't change any code about API "sb_ble_gap_rssi_get" in host MCU side.)

    2. I try to use S132 of SDK11 by NRF52 board, the issue of getting rssi didn't occur.

    3.I think it is easy to reproduce it  in Nordic side(one is for host MCU, the other is for NRF51),

    or you have confirmed there is no issue about Nrf51882 S130 NRF51 SDK 9.0.

    >Can you start your application in debugger and step though the code to see whathappens after the >call sb_ble_gap_rssi_get. 

    I try to do like this by keil. but some err occur and the debug stopped.

    (I guess it is because some SDK codes is just binary file

    Could you kindly provide some test patches or some method to locate the issue.

  • All the known issues of SDK 9.0 have been mentioned here. The meaning is that, no one else have found any problems with this before. But that does not mean that this is not a bug. You might have found new one. If using SDK 11 helps in your case, can't you update your project to use SDK11?

  • >can't you update your project to use SDK11?

    I have updated the sdk from 9 to 11, the issue  of getting rssi still exists.

  • Hi sq,

    You said that the sd_ble_gap_rssi_get does not return.

    Can you please start your project in debugger and after running for a while break the execution and see what the value of PC (program counter register) is. This way we can know where the execution is stuck. It most probably is not stuck inside the softdevice but in the application.

Related