So that would seem to back up what you're saying about what timers are chosen... The order (I think) just comes from the order that they're defined in the CSV file (that has been grabbed from the STM32F1 datasheet).
So I guess simply ordering the PWM timers lowest to highest for each pin would really help - although the smartest solution is probably to prioritise the timer that isn't used for anything else.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm not quite sure I understand what you mean about the extra bits being set? Could you give me an example with
analogWrite(A8)
andpeek
?The code here appears to be taking the first timer in the list of available timers: https://github.com/espruino/Espruino/blob/master/targets/stm32/jshardware.c#L1532
And the
gen/jspininfo.c
file looks like:So that would seem to back up what you're saying about what timers are chosen... The order (I think) just comes from the order that they're defined in the CSV file (that has been grabbed from the STM32F1 datasheet).
So I guess simply ordering the PWM timers lowest to highest for each pin would really help - although the smartest solution is probably to prioritise the timer that isn't used for anything else.