Verdin AM62 Lower PWM Frequency Needed

I am trying to setup a constant PWM on the PWM_1 channel on our Toradex Verdin AM62 D 1GB ET following the PWM (Linux) Pwmchip interface setup.
My problem is now that we can only setup a min Frequency of 2,5Hz (max 469000000ns period). We would need a 1Hz PWM with a duty cycle of 97%.
Is this a hardware restriction or can we work around this in software? / Use different Base Clock in device tree? / Use bigger counter register?
What could be a workaround?
I already tried using a GPIO pin which is toggled in software but this is too inaccurate for our purposes.

Thank you for your support!
Lukas

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


The limitation you’re encountering with the minimum PWM frequency of 2.5Hz on the Toradex Verdin AM62 D 1GB ET is indeed a hardware restriction. This is due to the PWM controller’s design, which has a maximum period of 469000000ns, making it impossible to achieve a 1Hz PWM signal without modifications.

Here are some potential workarounds you could consider:

  1. Adjusting the Base Clock: You could try modifying the Base Clock settings in the device tree. This might allow for different clock configurations that could enable lower PWM frequencies. However, be cautious as this could affect the overall system clock configuration and other components.

  2. Using a Larger Counter Register: If the hardware supports it, increasing the counter size might allow for finer control over the PWM period, potentially enabling a 1Hz output. This would depend on the specific capabilities of the PWM hardware in your device.

  3. External PWM Generators: If the above options do not work, consider using an external PWM generator or a dedicated timer. These can provide the required frequency and duty cycle with higher accuracy than software toggling of GPIO pins.

Since software toggling of a GPIO pin has proven too inaccurate for your needs, focusing on hardware-based solutions or configurations is advisable. Consulting the hardware documentation for the Verdin AM62 may provide additional insights into possible configurations or workarounds.

Please, also check if these links can help you solve your problem:

PWM switching on and off at low frequency when high frequency is set for backlight.

Hi @xlukem!

Sorry for the delayed response.

I’ve searched on our datasheet and AM62 Reference Manual, but I didn’t find anything about the minimum frequency of PWM.

In this case, you could use Cortex M4 or PRU to achieve what you expect. Have you ever considered using the other cores? I saw that TI has an example of PWM for Cortex M4. You can find it on TI’s MCU+SDK for AM62x.

Feel free to ask if you have any doubts or issues.

Best regards.
Lucas Azeituno