Hello everyone, I've developing a low power application using Arduino NANO 33 BLE. I want to turn the sleep mode ON while the microcontroller doesn't need to do anything but I don't know exacly how to do that.
I've been checking the implementation of the delay() method in mbed os and I found that, which is located on cores>arduino>wiring.cpp
void delay(unsigned long ms)
{
#ifndef NO_RTOS
rtos::ThisThread::sleep_for(ms * 1ms);
#else
wait_us(ms * 1000);
#endif
}
But I'm not able to find the implementation of that sleep_for() method.
I can't do a debugging cause I don't have the necessary hardware. If I could debug I could find this one easily.
I've also found another sleep_until() method which I would like to use for temporization in my project, but I don't either know how to get the current tick as a reference for timing in Arduino.
I hope you could help me.
Thank you so much in advance