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

Parents
  • 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.

Reply
  • >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.

Children
Related