Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK15.2 FreeRTOS ble CENTRAL and PERIPHERAL

Hi, Sir

 

I am developing a nRF52840 system with 1 ble peripheral link and 19 ble central links.Firstly, I implement ”19 ble central links”by modifying

nRF5_SDK_15.2.0_9412b96\examples\ble_central\ble_app_uart_c\pca10056\s140 demo, the code works well;Secondly, I add a ble central mechanism(ble_app_uar_c) to nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hrs_freertos\pca10056\s140,it works well too;Finally, I combine the first step’s code with Second step’, there is a problem appearing:

  Ble scan After ran for a while (a few minutes or more than ten seconds), however, I did not set the scan timeout,then ,I debug my code,and found that when the problem appears, the code just stop on the following position:

             do{

                    __WFE();

                } while (0 == (NVIC->ISPR[0] | NVIC->ISPR[1]));

no APP_ERROR_CHECK error, no hardfault, it seems that the code is still running normally. I did more test to confirm that case

1:I add a app_button event, when the problem appeared, press the button,button event can be generated normally.

2:I put a breakpoint when the problem appeared inside the function

void SD_EVT_IRQHandler(void)

{

     BaseType_t xYieldRequired;

 

     xYieldRequired = xTaskResumeFromISR( m_softdevice_task );

 

     if( xYieldRequired == pdTRUE )

     {

         portYIELD_FROM_ISR(xYieldRequired);

     }

but the code address point can not entry into the function.

 

That looks strange, softdevice task can not be resumed again, Do you have any an idea? Please give me some advice

thanks!

Related