tests: pwm_api: Use smaller pwm period cycles on k64-based boards
The mcux pwm drivers use period cycles as a divisor to calculate the pwm frequency in hertz. This operation can underflow easily with large values of period cycles relative to the pwm clock source, causing the driver to return an error code and the pwm_api test to fail. Updates the test to use the smaller set of period and pulse cycles on k64-based boards, fixing the test for frdm_k64f and hexiwear_k64 boards. The test is not changed for i.mx rt boards because the pwm clock source on these boards is much faster than on k64 boards, and thus the same pwm frequency operation does not underflow. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
c2d702b961
commit
9346ded0af
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@
|
|||
#error "Define a PWM device"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BOARD_COLIBRI_IMX7D_M4
|
||||
#if defined(CONFIG_BOARD_COLIBRI_IMX7D_M4) || defined(CONFIG_SOC_MK64F12)
|
||||
#define DEFAULT_PERIOD_CYCLE 1024
|
||||
#define DEFAULT_PULSE_CYCLE 512
|
||||
#define DEFAULT_PERIOD_USEC 2000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue