• Great! You're doing this with a Pico?

    On the F4, certain peripherals are wired to certain pins. Usually you have the option of having them in one of two places - it's controlled by something called the 'Alternate Function register'. The datasheet for the F4 tends to have a big table of what can go where, which I've digitised for Espruino here:

    https://github.com/espruino/Espruino/blo­b/master/boards/pins/stm32f401_af.csv

    You could look at the reference manual (or probably googling for some examples is easier) but it's not that nice.

    Your best bet is just to look at the pinout docs for the Pico (or WiFi board, if you use that): https://www.espruino.com/Pico#pinout

    Hover the mouse over the PWM tags and look at the tooltips - and voila - there's the timer and channel that's being used :)

About

Avatar for Gordon @Gordon started