Our product uses the imx8mm chip. The M4 core is used to generate PWM signals and operates independently from Linux. The PWM signals are stable while Linux is not loaded. After Linux loads, the PWM signal starts disappearing when the main A53 core is idle. If I run a program that creates 100% load for the main core, the PWM signal is okay. It looks like the A53 disables clock or sends PWM to some low power mode while it is in wait mode.
I observed the issue on the expample project from SDK 2.8.0 (boards/evkmimx8mm/driver_examples/pwm).
I tried to enable the clock in the M4 firmware to BOARD_BootClockRUN() functions with no effect.
CLOCK_EnableClock(kCLOCK_Pwm1);
CLOCK_EnableClock(kCLOCK_Pwm2);
CLOCK_EnableClock(kCLOCK_Pwm3);
CLOCK_EnableClock(kCLOCK_Pwm4);
CLOCK_EnableClock(kCLOCK_Gpio1);
CLOCK_EnableClock(kCLOCK_Gpio5);
Also, modified the device tree file to make sure Linux doesn't touch PWMs.
Solved! Go to Solution.
Hi MaxL
one can look at sect.12.2.6.1 PWM Control Register (PWMx_PWMCR),
WAITEN - Wait Mode Enable. This bit keeps the PWM functional in wait mode.
i.MX 8M Mini Applications Processor Reference Manual
Best regards
igor
Hi MaxL
one can look at sect.12.2.6.1 PWM Control Register (PWMx_PWMCR),
WAITEN - Wait Mode Enable. This bit keeps the PWM functional in wait mode.
i.MX 8M Mini Applications Processor Reference Manual
Best regards
igor
@igorpadykovThank you for the quick reply.
It works like a charm!
PWM_GetDefaultConfig(&pwmConfig);
pwmConfig.enableWaitMode = true; // <-- Changed this default value to 'true'
PWM_Init(DEMO_PWM_BASEADDR, &pwmConfig);