Re: Nucleo STM32F411RE PWM support
Florian Hester
Hello,
toggle quoted messageShow quoted text
I have used the following overlay: / { soc { timers1: timers@40010000 { status = "okay"; pwm { status = "okay"; }; }; timers2: timers@40000000 { status = "okay"; pwm { status = "okay"; }; }; timers3: timers@40000400 { status = "okay"; pwm { status = "okay"; }; }; timers4: timers@40000800 { status = "okay"; pwm { status = "okay"; }; }; }; }; The prj.conf file contains the following regarding PWM: CONFIG_PWM=y CONFIG_PWM_STM32=y I used the following code to test: auto dev_pwm = device_get_binding("PWM_1"); if (dev_pwm != nullptr) { LOG_INF("Have PWM device."); int ret = pwm_pin_set_usec(dev_pwm, 1, 100, 50, 0); if (ret != 0) { LOG_ERR("Could not set PWM."); } else { LOG_INF("PWM set."); } } The output: [00:00:00.006,000] <inf> main: Have PWM device. [00:00:00.006,000] <inf> main: PWM set. I am measuring pin D7 on the board (PA8 for the chip), and no pulse. Florian Op 12/11/2020 om 08:36 schreef Adam Podogrocki:
Hi Florian,
|
|