Hello,
I am using nRF52832 IC with softdevice and SDK v15.
I wish to make the MCU in sleep mode and then a couple of milliseconds (let's say 250ms) wakes up the MCU. For this purpose, can I use the timer? Or do you have any idea ?
Hello,
I am using nRF52832 IC with softdevice and SDK v15.
I wish to make the MCU in sleep mode and then a couple of milliseconds (let's say 250ms) wakes up the MCU. For this purpose, can I use the timer? Or do you have any idea ?
You'll want to use the RTC — Real-time counter. See the Real Time Counter Example and RTC API documentation.
Can I use it with the softdevice?
I have external xtal. Do I need to use "lfclk"?
In addition, does the resolution is second? I need resolution in milliseconds
You can use RTC1-2. You can also use the Timer library (app_timer), see also Application Timer API docs.
will this awake the MCU from sleep mode?
I have external xtal. Do I need to use "lfclk"?
Any interrupt will wake the CPU.
"I have external xtal. Do I need to use "lfclk"?"
- Well, yes for the RTC you ned a LF clock source. If you've got a 32kHz crystal you can use the LFXO as the source. .