How to perform condition monitoring on STM32