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

Button cause crashes when pushed repeatedly

Hi,

We are using nrf52832 with softdevice 6.0.0 ,SDK 15.0. Our code is based on the FreeRTOS heart rate example.

We have one button in our system and when we press it several times in a row the software crashes (without any error and without disconnecting from the debugger)

We use the button using app button driver. The Initializing of the button goes like this:

button_config[0].pin_no = BUTTON_1 ;
button_config[0].active_state = BUTTONS_ACTIVE_STATE;
button_config[0].pull_cfg = BUTTON_PULL;
button_config[0].button_handler = vHAL_button_handler;
app_button_init(button_config,1,5);
app_button_enable(); 

The button handler simply change a Boolean according to the pressing state.

The button works fine when pushed once in a while. When the button pushed repeatedly the device crashes and  i cant see any error in the errors handler ( __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)

Did you encounter issues like this with FreeRTOS? We know that it is a software issue and not HW related because when removing the button definition it does not happen.

Best regards,

Ibrahim

Parents
  • Hi,

    What is the meaning of the device crashes? is it a hardfault or a device soft reset? We need to know what CPU state is before trying to understand the nature of this fault. No, i do not think that this is any hardware fault, but i think that this has to do something with wrong configuration of priorities. But i cannot say it for sure before you explain us what exactly is the meaning of device crash and when you start your program in debug mode, where is the PC pointing to in your code after the 'device crash'?

Reply
  • Hi,

    What is the meaning of the device crashes? is it a hardfault or a device soft reset? We need to know what CPU state is before trying to understand the nature of this fault. No, i do not think that this is any hardware fault, but i think that this has to do something with wrong configuration of priorities. But i cannot say it for sure before you explain us what exactly is the meaning of device crash and when you start your program in debug mode, where is the PC pointing to in your code after the 'device crash'?

Children
No Data
Related