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

crash happen when LED state change

Reference PWM_driver sample code, I set the customer status of the LED, And it also can change status by button,

 static void bsp_evt_handler(bsp_event_t evt)
 {
void (* const demos[])(void) =
{
LED_OFF,
    whiteTenSec,
    blinkyRed
};
...

Next step, I integration this to my BLE connect, And it will crash(system reboot) when LED status changing, Is i missing something that needs to be reset or init steps? Thanks!!

 static void led_timer_handler(void * p_context)
 {
     switch(led_display_type)
	{
		case CHARGING:
			breathingWhite();
			break;
		case LOWBATTERY:
			blinkyRed();
			break;
                    default:
			//LED_OFF();				
			break;				
	}				
 }
Related