9 years 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);
        }
    }
}

2 Answers

8 years, 11 months ago.

ignore this answer.

9 years 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.