Page 1 of 1
Blackpill awakening
Posted: Wed Jan 28, 2026 10:43 pm
by max.tisc
Hi,
is it possible to wake up the Blackpill cyclically from a sleep mode condition, for example every 5 minutes with the internal RTC? or any other suggestions?
thank's
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 5:12 am
by chipfryer27
Hi
I haven't used the Blackpill but from p434 (17.3.4) of the datasheet it documents wake ups from uS to 36 Hours.
Regards
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 12:26 pm
by max.tisc
but using FC10 components?
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 12:34 pm
by chipfryer27
Hi
I would have thought so as it would most likely be a C-Block to set the registers. Page 434 gives details of how to use. Never having used the ST before I can only guess that you would use C-Blocks to set registers and to make it "Sleep".
Regards
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 12:47 pm
by max.tisc
yes but I wanted to know if FC10 had something ready to use
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 4:55 pm
by LeighM
No, I don't think it does.
But after a super search, OK it was a bit of AI

I found this ...
Code: Select all
// Example to enter Sleep Mode
HAL_SuspendTick(); // Stop SysTick to prevent immediate wakeup
HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI);
HAL_ResumeTick(); // Resume SysTick after waking up
and had a bit of a play, so here's an example using the user LED and user key to put it in and out of sleep ...
edit: oops, this was created in V11, should load OK but with a warning?
I've not had chance yet to look at the RTC interrupt.
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 6:51 pm
by LeighM
As for waking up every 5 minutes, this should be possible with a timer interrupt.
Specifically with TIM2 and TIM5 that have 32 bit auto-reload counters.
However I'm struggling to discover how to change these from the 16 bit value limit, using parameters in the device FCD.
Matrix, is it possible to increase the Rollover Value to 32 bit?
Re: Blackpill awakening
Posted: Thu Jan 29, 2026 8:04 pm
by max.tisc
ok thanks everyone for the suggestions, the TIMER1 and 5 issue is worth looking into in more detail for battery systems that require the greatest energy savings