Wemos M0 PWM weirdness
One of the things I have received as Xmas gift is thus Arduino UNO form factor board with a Cortex-M0 processor running at 48 Mhz.
After getting some trouble with the Arduino IDE I managed to get it working as an Arduino M0 in 1.8.5 IDE. However, though I could upload code, analogWrite seem not so work for me.
I used Fade example code that should work with built-in LED on pin 13 but it did not.
I had to use my logic analyzer to check which pins work with PWM and which do not. I could see that Adafruit using a similar processor mentioned some trouble with some pins but my board was even worse than that. Only pins 12, 11, 10, 9, 8, 5, 4, 3, & 2 worked with PWM while others, like pin 13 should work but did not.
At least now I know which pins I can use for analogWrite. I am not sure what the root cause of the problem is though.
After getting some trouble with the Arduino IDE I managed to get it working as an Arduino M0 in 1.8.5 IDE. However, though I could upload code, analogWrite seem not so work for me.
I used Fade example code that should work with built-in LED on pin 13 but it did not.
I had to use my logic analyzer to check which pins work with PWM and which do not. I could see that Adafruit using a similar processor mentioned some trouble with some pins but my board was even worse than that. Only pins 12, 11, 10, 9, 8, 5, 4, 3, & 2 worked with PWM while others, like pin 13 should work but did not.
At least now I know which pins I can use for analogWrite. I am not sure what the root cause of the problem is though.
Comments