PwmOut not work on LPC11U24

15 Oct 2012

When I try to comple I got error:

"#error directive: "CMSIS Target not recognised"" in file "lib/mbed/cmsis.h"

#include "mbed.h"
 
PwmOut servo(p21);
 
int main() {
    servo.period(0.020);          // servo requires a 20ms period
    while (1) {
        for(float offset=0.0; offset<0.001; offset+=0.0001) {
            servo.pulsewidth(0.001 + offset); // servo position determined by a pulsewidth between 1-2ms
            wait(0.25);
        }
    }
}
15 Oct 2012

Do you have any other libraries in the folder of your program? I dont think it should compile them if they aren't included, but it doesn't really make sense it tries to do anything with cmsis, that should be completely unrelated to this program.

15 Oct 2012

Hello Roman,

click on mbed library in Your project and on righ side click Update. This should do the trick.

15 Oct 2012

little llumpu wrote:

Hello Roman,

click on mbed library in Your project and on righ side click Update. This should do the trick.

Thanks a lot, all is working, after update.