-
Notifications
You must be signed in to change notification settings - Fork 1k
PWM on STM32F030F4P6 Demo Board does not work on all possible pins. #1619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @JeanHenriqueAlves Arduino_Core_STM32/variants/STM32F0xx/F030F4P/PeripheralPins.c Lines 70 to 84 in a531c22
|
And datasheet confirm this |
Okay, then it seems that the reference image made by Aryeduino is, in fact, incorrect.
I also have tested right now to see if PA9 and PA10 work (these are RX/TX in my circuit and are not used as outputs), and so far only PA9 is responding normally to analogWrite(). PA10 will output 0v if analogWrite() was called after pinMode(OUTPUT) and around 0.15v without pinMode. I have tested it on both boards. |
Hello, I am terribly sorry. It seems that the problem with PA10 was caused by my code, where I called analogWrite() consecutively on various pins, which did work for PA4, PA6, PA7, PA9 and PB1, but caused PA10 to fail. By calling analogWrite() only on PA10 it works like a charm. Thank you very much for the dedication and fast replies. |
Hello, after testing in two different STM32F030F4P6 Demo boards, it seems that analogWrite() is only supported on pins PA4 (LED1), PA6, PA7 and PB1. The pins PA0, PA1, PA2, PA3 and PA5 all behave like digital outputs (0 - 127 = LOW, 128 - 255 = HIGH). I got the board reference from this issue, where I found this image:

STM32duino core: Latest
Programmer: ST-LINK V2
IDE: Arduino 1.8.19
One of the boards was hooked to my circuit, and the other one was tested outside the circuit using a multimeter.
The text was updated successfully, but these errors were encountered: