Thanks. What I meant about the first issue is that analogWrite() for timers with negated output enables both negated and non-negated output for a channel, even when only one or the other is needed. This causes problems.
analogWrite(A8,0);
peek16(0x40012c20); // should be 1 (enable non-negated output of channel 1 on A8) - is actually 5 (enable non-negated output of channel 1 on A8 and enable negated output on B13).
This is why if you've used PWM on A8~10, a PWM signal gets played "ontop of" SPI2 - the pins are put into "alternate function" mode to use the SPI, and analogWrite(A8~10) enables the negated output on B13~15.
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.
Thanks. What I meant about the first issue is that analogWrite() for timers with negated output enables both negated and non-negated output for a channel, even when only one or the other is needed. This causes problems.
This is why if you've used PWM on A8~10, a PWM signal gets played "ontop of" SPI2 - the pins are put into "alternate function" mode to use the SPI, and analogWrite(A8~10) enables the negated output on B13~15.