PWM Init handler exception

Our goal is to have the pwm output different values (duty-cycles) continuously.

Therefore we want to use the PWM driver with the event handler to be triggered after completion of each sequence.

We are using SDK 2.3.0.

But after we run the "nrfx_pwm_simple_playback" the MCU branches to "compiler_barrier();" after some cycles. We think this is when the PWM ISR actually triggers.

We have set a break-point in the "user_touch_pwm_handler", but this function never gets called.

If we call "nrfx_pwm_init" with NULL instead of the "user_touch_pwm_handler", it does not fail, but we want the handler to be called.

	static nrfx_pwm_config_t const config0 =
    {
        .output_pins = {
                3, // channel 0
                NRFX_PWM_PIN_NOT_USED, // channel 1
                NRFX_PWM_PIN_NOT_USED, // channel 2
                NRFX_PWM_PIN_NOT_USED  // channel 3
        },
        .irq_priority = 5,
        .base_clock   = NRF_PWM_CLK_16MHz,
        .count_mode   = NRF_PWM_MODE_UP,
        .top_value    = 116, //~70kHz
        .load_mode    = NRF_PWM_LOAD_COMMON,
        .step_mode    = NRF_PWM_STEP_AUTO
    };

     if (nrfx_pwm_init(&my_pwm, &config0, user_touch_pwm_handler, NULL) != NRFX_SUCCESS) {
        return 1;   // error
     }
     
     nrfx_pwm_simple_playback(&my_pwm, &pwm_seq_settings, 1, NRFX_PWM_FLAG_LOOP);

Related