NUCLEO-L031K6 low power on MBED OS 2

Hello,

I am trying to implement a deepsleep (timer interrupt) in order to use the low power features of my NUCLEO-L031K6 board. My problem is that this board is only compatible with MBED OS 2 which is quite outdated and I cannot find documentation about this. I am guessing that MBED OS 2 is not really supported anymore since I cannot access the documentation in the online compiler (“documentation not ready”).

In this case, I am not sure if I should try to migrate to a newer version and if so, how ? (adding a recent mbed library with the URL produces the error “NUCLEO-L031K6 is not recognized”).
Or if there is a way to get the deepsleep to work using MBED OS 2 ? This solution would be easier for me because everything else in my code already works great on MBED OS 2 .
I tried the code displayed here DeepSleep Method - Question | Mbed but the sleep() function appears to have no effect on my board.

Thank you.

Hi
I’m afraid Mbed 2 is deprecated and no thus no longer supported. Have you looked at the bare metal profile for Mbed OS 6 ? This is effectively the replacement and you may be able to port your board to using that.

Regards
Anna

@AnnaBridge that board is not supported in MbedOS6+
@ruck3rs the last where that target was supported seems to be MbedOS 5.15 also under bare metal profile.

The documentation was usually created from code directly I think, so maybe you can found something in the source - mbed-dev or mbed

BR, Jan