7 years, 10 months ago.

PwmOut on Nucleo-F411RE

Hello,

I am using a STM32F411 through the Nucleo board. My project uses a lot of PWM pins. For some reason, some of the PwmOut pins are working and others are not. Should mbed be able to use all the PWM pins? Can they all be used at the same time? The pwm pins are labeled PWM1/1, PWM1/2, PWM1/3, PWM2/1, PWM2/2, etc. Also some of the pins have an 'N' after them, like PWM1/1N. Does anyone know which pwm pins mbed can use at the same time and if they all are working? (I just upgraded to the latest mbed).

1 Answer

7 years, 10 months ago.

The first number after 'PWM' is the PWM timer, the second one is the channel. All PWM's with a unique combination of those two numbers can be controlled seperately. Different PWM channels on the same timers have shared period, so change one period, all will have a changed period.

Finally those with an 'N' afterwards are identical to not having an 'N' (they can be inverted, but aren't done so by the mbed lib, so that is where the 'N' comes from). So PWM1/1 and PWM1/1N are identical, change one, and the other one also changes (assuming they both can be active at the same time, not 100% sure. But you can't get them to behave independent).