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

Debugging a APP_ERROR_CHECK

I am working on a project using a BLE Nano and Nordic sdk 8.1. I included the ble_flash.c, ble_error_log.c, and ble_debug_assert_handler.c files in my include path and c source files. I also added -DDEBUG to the flags. I then check if the app is failing using the APP_ERROR_CHECK(err_code); When I do this my program just stops running though and I don't get an error log or anything in the serial monitor and I don't see any stack trace saved on the device when I open it up. Are there any other steps I have to do or am I missing something? BTW I am compiling from terminal using a makefile.

Parents
  • Looks like this might be an old bug(this is the drawback when working with old SDKs). Try to add: PWM1.p_cb->state = NRF_DRV_STATE_UNINITIALIZED; before calling the init function:

    /* Initialize and enable PWM. */
    PWM1.p_cb->state = NRF_DRV_STATE_UNINITIALIZED;
    err_code = app_pwm_init(&PWM1,&pwm1_cfg,NULL);
    

    If this does not work, try to use a different timer when creating the PWM instance, e.g. timer 2: APP_PWM_INSTANCE(PWM1,2);

Reply
  • Looks like this might be an old bug(this is the drawback when working with old SDKs). Try to add: PWM1.p_cb->state = NRF_DRV_STATE_UNINITIALIZED; before calling the init function:

    /* Initialize and enable PWM. */
    PWM1.p_cb->state = NRF_DRV_STATE_UNINITIALIZED;
    err_code = app_pwm_init(&PWM1,&pwm1_cfg,NULL);
    

    If this does not work, try to use a different timer when creating the PWM instance, e.g. timer 2: APP_PWM_INSTANCE(PWM1,2);

Children
No Data
Related