Genereting a PWM signal in Port 0 pin using GPIOTE + TIMERS + DPP

Hi,

I would like to generate a PWM signal specifically on the P0.03 pin of the nRF54L15 using GPIOTE + DPPI + TIMERS.

As far as I’m concerned, Port 0 in nRF54L15 does not have a dedicated PWM peripheral for its pins, but it seems there is a workaround using the peripherals mentioned above.

TIMERS are supposed to be in the PERI PD. I believe I need to initialize two timers: one to handle the “on-time” or duty-cycle duration, and the other to define the PWM period. I also believe I need to connect them through PPIB22 so they can publish events to the LP PD GPIOTE30, which should toggle the P0.03 pin to emulate a PWM signal.

I would appreciate someone could guide me to implement this since I'm not being able to find examples to start with it.

I've seen the GPPI one to one example, yet it does not build for nRF54L15 as it is.

I'm using the nRF Connect SDK 2.9.0.

Parents
  • Hi Pablo

    Is there a specific reason you need to generate the PWM signal on the P0 port? I assume you would like to do this only on the low power domain to have lower current consumption, but if you start a TIMER in the peripheral domain that would defeat the purpose since that would wake up the peripheral power domain anyways. 

    This does sound possible without me having looked too close into it, but I don't see a reason why since you would have to use the Peripheral domain either way. Can you try to explain your use case here a bit more?

    Best regards,

    Simon

Reply
  • Hi Pablo

    Is there a specific reason you need to generate the PWM signal on the P0 port? I assume you would like to do this only on the low power domain to have lower current consumption, but if you start a TIMER in the peripheral domain that would defeat the purpose since that would wake up the peripheral power domain anyways. 

    This does sound possible without me having looked too close into it, but I don't see a reason why since you would have to use the Peripheral domain either way. Can you try to explain your use case here a bit more?

    Best regards,

    Simon

Children
Related