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

buttons interrupts are so much that sensor colecting proess donot have enough time slice to execute.

in nRF5_SDK_14.2.0_17b948a project,   we get sensor x y z w data in a loop process, the data which print in uart  shows very smoothly.

but if i push buttons many times in a second, the sensor data pause a little time and later going on.

i doubt that continue buttons interrupt may take too much time so that process can not get a time slice to run.

how can i slove it ? although i am pushing buttons in a high frequence, i don want sensor data pause, miss some import position data.

thanks 

Parents Reply
  • dear in this project : examples\ble_peripheral\ble_app_uart\main.c; 

    sensor  routine may have no relationship with button. so it is not the reason ...

    void bsp_event_handler(bsp_event_t event)
    {

    switch (event)
    {
    button_push=1;


    case BSP_EVENT_KEY_0:
    break;

    case BSP_EVENT_KEY_1:
    }
    }

    int main(void)

    {


    #if 1
    while(1){
    nrf_delay_ms(25);
    sensor_data_colect(); ---- sensor

    if(button_push==1) -- button 
    {

    button_push=0;

    }

    }
    #endif

    }

Children
No Data
Related