@Robin, works as expected... hover over PWM tags on pins A0 and A5 at https://www.espruino.com/WiFi#pinout : They both show - TIM2_CH1 = Timer 2 Channel 1 - and since this is SW analog (PWM), it's on the same timer AND same channel... It cannot be the same... because there is only one interrupt available, and the last setting wins! - The example you refer to was made for Original Espruino with an STM32 that has a DAC to produce the analog output. PWM is just 'faking' it and is only 'energy-wise over time' analog.
Ahhhh, . . . the ol' hover to reveal additional detail trick!
Thank you for pointing that out @allObjects.
Page 1 of the datasheet indicated up to 11 timers. A cursory view of the WiFi pins suggested that there were up to that many PWM pins available. (no I didn't actually count) I should have read on to page 40 that described the timer labels and the 'ah ha' light might have gone on.
Hoisted by my own petard!
© Espruino, powered by microcosm.
Report a problem