5 years, 7 months ago.

Mbed LowPowerTimeout example doesn't compile

I'm interested in using the LowPowerTimeout, but the compiler doesn't recognize the type. I've updated mbed-os to the latest.

The example demo doesn't compile either:

https://os.mbed.com/teams/mbed_example/code/LowPowerTimeout-example/

Is the class platform specific? I'm using the C027 kit (LPC1768). The same question was asked here, but not answered:

https://os.mbed.com/questions/61288/Is-possible-work-with-mbed-in-a-low-powe/

1 Answer

5 years, 7 months ago.

Hi Peter,

That example has been updated for Mbed OS5 and it does rely on the target having the DEVICE_LPTICKER feature which is lacking for the LPC1768. This means that to use the example you will have to revert back to an Mbed OS2 version. You can readily do this in the online compiler by following these steps (please see screen capture):

  • 1. Select the project in the Program Workspace
  • 2. Select "Revision" from the main menu.
  • 3. From the Revision History pane, now select Revision 2:50216cc. This is the last Mbed OS2 version of the program. Right-click and select "Switch working copy to this revision...".
  • 4. De-select the "Revision" button and you should see that main.cpp and mbed have reverted back to this: https://os.mbed.com/teams/mbed_example/code/LowPowerTimeout-example/rev/50216cc75b4a/

Then you should be able to successfully build for the LPC1768. Let us know if you have any problems.

-Ralph, Team Mbed

/media/uploads/RalphF/onlinecompiler-changeprogramrevision.png

Thanks. For memory reasons I will be migrating to a K64F development kit. Does that have the DEVICE_LPTICKER feature?

posted by Peter Miller 20 Sep 2018

Hi Peter,

Yes - it does. You can check the targets.json file to see all the "device_has" properties:

The official macro name you will see referenced in source code is DEVICE_LPTICKER but it appears simply as LPTICKER in the json file.

-Ralph, Team Mbed

posted by Ralph Fulchiero 20 Sep 2018