Arm Mbed OS support forum

How to get board reset count

Hi,
I’m using LPC1768 board. I want to get board reset count (how many times board gets ON and OFF) and save it into EEPROM. Can someone tell me how to do that?

regards,
V.

Hello,

I do not know if Mbed provide something like that directly, I saw only a counter of system crashes - Error handling - API references and tutorials | Mbed OS 6 Documentation

However it can be done with KVStore - API references and tutorials | Mbed OS 6 Documentation.
You can read a stored value every start of the board, incremented it and store it again.

BR, Jan