I've been trying to understand Zephyr-RTOS PWM functionality on the LPCXPRESSO55S69 board.
I am looking at the mikro bus pin IO's. There is one designated PWM pin on this bus.
According to lpcxpresso55s69.dtsi, this PWM pin is defined as &gpio1 5.
It is my understanding that PWM is handled by SCTimer.
The next challenge was to figure out what SCTimer controls on PIO1_5.
I found this in the LPC55S6x.pdf datasheet (page 31). Here is states that PWM is input only: SCT0_GPI0 (Pin input 0 to SCTimer/PWM). There is one output option with CTIMER2_MAT0.
This is mirrored here: https://github.com/zephyrproject-rtos/hal_nxp/blob/master/dts/nxp/lpc/LPC55S69JBD100-pinctrl.h
Question. Can CTIMER2 be used for PWM?
If not, how do you generate a PWM output on this pin?
Hi @gerrikoio
Yes, CTIMER2 can be used for PWM on PIO1_5.
And i think you can refer to the sdk lpcxpresso55s69_ctimer_pwm_example demo.
It use the CTIMER2 PIO1_4.
BR
Harry