tests: drivers: pwm: stm32 board for loopback test
Add overlay file for disco_l475_iot1 board to pwm_loopback test. The file is based on the existing overlays for twr_ke18f and frdm_k64f. The new configuration uses both a 16-Bit timer with active prescaler as well as a 32-Bit timer with deactivated prescaler for coverage. It is assumed that other STM32 boards will behave like the disco_l475_iot1. Only this board was available for testing. Signed-off-by: Tilmann Unte <unte@es-augsburg.de>
This commit is contained in:
parent
7a6666a0e7
commit
a9ba637ac9
1 changed files with 52 additions and 0 deletions
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 Tilmann Unte
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/pwm/pwm.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
pwm_loopback_0 {
|
||||||
|
compatible = "test-pwm-loopback";
|
||||||
|
/* first index must be a 32-Bit timer */
|
||||||
|
pwms = <&pwm2 1 0 PWM_POLARITY_NORMAL>,
|
||||||
|
<&pwm15 1 0 PWM_POLARITY_NORMAL>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 32-Bit timers */
|
||||||
|
&timers2 {
|
||||||
|
status = "okay";
|
||||||
|
pwm2: pwm {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&tim2_ch1_pa5>; /* CN1 D13 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&timers5 {
|
||||||
|
status = "okay";
|
||||||
|
pwm5: pwm {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&tim5_ch1_pa0>; /* CN3 D1 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 16-Bit timers */
|
||||||
|
&timers3 {
|
||||||
|
status = "okay";
|
||||||
|
st,prescaler = <255>;
|
||||||
|
pwm3: pwm {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&tim3_ch1_pa6>; /* CN1 D12 */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&timers15 {
|
||||||
|
status = "okay";
|
||||||
|
st,prescaler = <255>;
|
||||||
|
pwm15: pwm {
|
||||||
|
status = "okay";
|
||||||
|
pinctrl-0 = <&tim15_ch1_pa2>; /* CN1 D10 */
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue