Skip to content

Commit

Permalink
tests/drivers: pwm_api: Document how to tune test for stm32 targets
Browse files Browse the repository at this point in the history
The way the test is implemented requires some adaptation to
be effective on all STM32 boards.
I'm not adding per board code on purpose, as this would be a
never ending story.

Fixes #31582

Signed-off-by: Erwan Gouriou <[email protected]>
  • Loading branch information
erwango authored and ioannisg committed Jan 26, 2021
1 parent 7592863 commit 3d267ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/drivers/pwm/pwm_api/src/test_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@
#elif defined CONFIG_BOARD_ADAFRUIT_ITSYBITSY_M4_EXPRESS
#define DEFAULT_PWM_PORT 2 /* TCC1/WO[2] on PA18 (D7) */
#elif DT_HAS_COMPAT_STATUS_OKAY(st_stm32_pwm)
/* Default port should be adapted per board to fit the channel
* associated to the PWM pin. For intsance, for following device,
* pwm1: pwm {
* status = "okay";
* pinctrl-0 = <&tim1_ch3_pe13>;
* };
* the following should be used:
* #define DEFAULT_PWM_PORT 3
*/
#define DEFAULT_PWM_PORT 1
#else
#define DEFAULT_PWM_PORT 0
Expand Down

0 comments on commit 3d267ee

Please sign in to comment.