4 years, 4 months ago.

Is PwmOut supported on the EFM32LG?

Hi there,

I'm trying to simply fade an LED with PWM on my EFM32LG starter kit, on PA12. I get a successful compile, but I'm not seeing any PWM. Is the PwmOut class actually compatible with this platform?

Best, Mike

#include "mbed.h"

PwmOut led(PA12);

int main() {
    while(1) {
        for(float i=0.0f; i<1.0f; i+=0.1f) {
            led = i;
            wait(0.1f);
        }
    }
}
Comment on this question

2 Answers

4 years, 3 months ago.

ignore this answer.

4 years, 4 months ago.

There is currently a pull request added to fix bugged Pwm for Silicon labs: https://github.com/mbedmicro/mbed/pull/1122. Since that pull request contains compile errors it probably requires some more work.

I am not sure that is your problem, but it could very well be.


You need to log in to post a question