7 years, 3 months ago.

PA_0(pwm2/1)cant be used as PWM output?

Hey

Is there something I need to know to use PA_0 as PWM output? It seems not to work, where as PA_1 and other pins works just fine.

if I set PA_0 as PWM out, the output is actually in PA_15 pin, where as PA_0 just stays floating, sadly I had to broke my fan before I did realise this..(yeah propably a bad fan to begin with since I don't think it should burn its own ic because of the floating pin instead of PWM signal)

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32L476RGT6 microcontroller.

How about the basic GPIO operation on PA_0, is it also output in PA_15? It will be more helpful if you can upload your source code.

posted by terence zhang 05 Jan 2017

Terence, i did not have time to test basic IO operations last night, will do later today. What comes to source code it's only initiating 4x PwmOut and setting period/duty, but this same behaviour is still around when I only initiate PA_0 as PwmOut and comment out rest of the code.

posted by Joni Salminen 05 Jan 2017

Let's wait for result of basic IO operation to see if it is sw/hw conflict issue or PWM issue.

posted by terence zhang 05 Jan 2017

I did some testing it seems that my earlier observation of PA_0 routed to PA_15 when using PWM was just bogus, its not happening. But the the proplem, it seems that PA_0 cannot be pulled high from software, when using as IO, pulling it down seems to work as i get static 0.00v reading, but when trying to pull it high its only 0.05v what i can measure from it, so something is trying to held it low?

#include "mbed.h"

DigitalOut mOut(PA_0);

int main() {
    mOut.write(1);
    while (true) {}
}
posted by Joni Salminen 05 Jan 2017

It's close to clear now, two possible reason for this case: hardware pulling, try to check circuit diagram if there is some force pulling circuit; function confliction, need to check if any other feature are using this port now, such as serial..

posted by terence zhang 06 Jan 2017
Be the first to answer this question.