LPCXpresso54114 no PwmOut in OS 6

Mbed-os targets.json does not have PwmOut for the LPC54114 target.
However the board supports PWM. Even the pinout on the mbed board shows PWM support.

Why is it not in the official mbed-os?

Hello Nick,

that seem to be historical (from Mbed OS 5.7.5) issue - LPCXpresso54114 has no PWMOUT - but it’s on the hardware · Issue #6382 · ARMmbed/mbed-os (github.com)

BR, Jan

Thanks for the reply.
It seems its still an issue in OS6.11.
From the thread from three years ago it looks like it was never at resolved???
That is pretty crazy considering the board is shown on MBED site to have usable PWM without any notes that its not implemented in mbed… and its an NXP LPC chip.

Any idea regarding putting PwmOut in manually?

I am attempting to port code from a stm32 chip.


From my understanding Mbed provides a higher level APIs in C++ what wrapping HAL drivers of different partners (ST, NXP, etc…) to same form. That wrapping is usually done by partners, in this case by the NXP.

  • I’m not sure the path you chose is good. In basic it is the same but HALs and coding style will be probably difference between ST and NXP.
    If you are familiar with this, here you see the whole porting process, maybe you will find something useful for you.
  • Maybe you can ask NXP about why or when and so on. I do not know who represent the NXP here, so maybe NXP community/support forum can be a way.

BR, Jan

Yeah it looks like too much of a hassle.

I am going to see if I can control the NXP SDK pwm timer directly from mbed code.

Probably not because the driver is missing (no fsl_pwm.h file) - mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_LPC54114/drivers at master · ARMmbed/mbed-os · GitHub
So you probably must to download the SDK, extract necessary files and place them to that folder.

BR, Jan

This model uses the SCTimer/PWM so it needs the fsl_sctimer.h to exist… which is there fortunately enough.

Hello Nick B,

I dont know if you have solve the problem. I am interested in using pwm functionality on the same board. It seems what you need is to implement pwm_api.c in TARGET_LPC54114 folder using driver/fsl_sctimer.h and then include it in cmake list.

If you want, we can work together to patch it.

BR Hao