I've got an NCS v2.6.1 project on the nRF52832 running a timing chain using PPI for PWM instance 2:
#define STIM_PWM 2 nrfx_pwm_t pwm_instance = NRFX_PWM_INSTANCE(STIM_PWM); ... uint32_t task_addr = nrfx_pwm_simple_playback(&pwm_instance, &biphasic_seq, 1, NRFX_PWM_FLAG_START_VIA_TASK); uint32_t exp_addr = nrfx_pwm_task_address_get(&pwm_instance, NRF_PWM_TASK_SEQSTART0); if (task_addr != exp_addr) { LOG_ERR("Start trigger address unexpected (0x%x != 0x%x)", task_addr, exp_addr); fault_config(); }
The output of nrfx_pwm_task_address_get is 0x40022008 as I'd expect from the PWM peripheral registers table for PWM2
However, nrfx_pwm_simple_playback returns 0x40018008, which doesn't seem to match up to any of the addresses in the PWM table. Instead, I found that it seems to be in the address space of the SWI peripheral.
I'm currently using the return from nrfx_pwm_task_address_get in my PPI configuration. Is there a reason to use one or the other with nrfx_gppi_channel_endpoints_setup?