I'm using nRF52832 SDK board with softdevice s132_nrf52_5.0.0 and SDK 14.2. The program compile without an error. I tested the led and timer separately and these work.
When the timer throws the timeout_handler and try to send pwm to set ws2812b leds, the program crashed.
<error> app: ERROR 3735928559 [Unknown error code] at C:\Nordic_Semi\nRF5_SDK_14
.2.0_17b948a\components\drivers_nrf\pwm\nrf_drv_pwm.c:286
when I comment the part code of to send pwm to leds, it works fine.
static void animation_timeout_handler(void * p_context)
{
//set_pixel_RED(0);
//nrf_drv_WS2812_show(); //error, send pwm to leds.
NRF_LOG_INFO("animation_counter %d", counter_iteration);
counter_iteration--;
if(counter_iteration<=0){
stop_animation_timer();
counter_iteration = ITERATION_MAX;
}
}
I'm using app_timer.h in timer, and nrf_drv_pwm.h to pwm0.