2 years, 10 months ago.

RTOS and LowPowerTicker not sleep

RTOS and LowPowerTicker in the deepsleep mode does not work more than 100 cycles. The problem is repeated both in a large program and in a simple program. after a certain number of cycles, the program freezes and does not respond. Is there some kind of counter? help me!...

nucleo l152RE board.

  1. include "mbed.h"

LowPowerTicker flipper; DigitalOut led1(LED1); int kol_vo; void flip() { led1 = !led1; printf("kol-vo: %d\n",++kol_vo); wait(1); }

int main() {

flipper.attach(&flip, 4.0); the address of the function to be attached (flip) and the interval (2 seconds) while(1) {sleep();} }

Be the first to answer this question.