Being inspired by this post, I have taken up this task to generate a variable frequency (1 kHz - 50 kHz) PWM signal from TIM3_CH3 using Zephyr APIs and HAL Constructs on DPin-3 of Header of UNO Q.
Cooperation from forum members would be highly appreciated.
I just checked out your links and found the sketches which I’ll definitely test to see the output. If Arduino incorporates your proposals, it will make generating high-frequency PWM signals on the UNO Q much easier by just calling functions with the necessary parameters, which isn't currently possible on the UNO R3.
For my university students, I would love to explore both Zephyr and HAL-based programming to cover fast PWM signal generation for academic purposes. HAL-based code will likely be more appealing to them, as they are already exposed (Midterm course: ATmega328P; Finalterm course: QBR22210 MPU + STM32U585 MCU) to direct register manipulation on the ATmega328P for generating fast PWM signals.
HAL Constructs based Sketch: (developed with the assistance of AI)
It generates a 1 kHz to 50 kHz PWM signal with a 50% duty cycle on DPin-3 (Fig-1) of the UNO Q header. The sketch uses TIM3_CH3 of the STM32U585 MCU.