Hello,
I am working on a project using zephyr as well as the nrf5340 MCU. For this test, I am on the nrf5340dk.
My application requires I drive a PWM at 125khz. In my device tree, I setup the PWM as follows:
With:
And:
The device application that uses it:
Additionally, I have a 32MHz external crystal.
In this instance, I have an application that effectively just turns on this PWM and nothing else.
If I hook up a logic analyzer to the pin, and I analyze the PWM , there is a "very" slight oscillation in the duty cycle.
Effectively, I fall from 49.93% duty cycle to 50% duty cycle up to 51.07% duty cycle, and back down. It is not necessarily periodic.
I wouldn't expect the duty cycle to be 50% exactly at all times, but there is concern from our hardware team that this noise is causing problems down the line for our application.
I want to do my due diligence and ask, is there anything related to registers that I could be missing to make the duty cycle cleaner? Or, alternatively, if there is a drive-mode that could potentially make the signal cleaner? Not sure if there is much to do, here.
I can provide more information as needed.