2016-10-27 01:50 PM
Hi All!
Edit : i'm using dicovery board STM32F429I-DISCO. i'm tying to combine 2 examples from ST CUBEF4 Firmware Package V1.10: 1. TIM - peridoc activity, every 0.5 seconds toggle LED3. 2. PWR - get system into sleep on stop mode. the combination i did was after 5 toggles (tick counter) call SleepMode_Measure() :five_tickscounter ++;
if (five_tickscounter >5)
{
StopMode_Measure();
five_tickscounter = 0;
}
(just copy & paste all relevant functions from PWR example)
for some reason, the system does not wakeup from stop mode.
Debugger is not available from the point where system is going to stop mode
any help would be much appriciated.
what this means is that the system goes to sleep during interrupt - do i need to initialize any timer interrupt? or something else in order to make it work. . .
Thank You
#rtc
2016-10-28 02:08 AM
Hi Assaf,
To let users help you , try to give more details : the device used ? which firmware library you are using ?You would share the modification that you did and the code.To debug an application in low power mode, you should enable a relevant bit in DBGMCU_CR register :To debug stop mode: set the DBG_STOP befoer entering stop mode.-Hannibal-2016-10-28 02:24 AM
2016-10-28 03:53 AM
Hi Assaf,
Ensure that you are using the following Predivs for RTC when LSI is used : #define RTC_ASYNCH_PREDIV 0x7F #define RTC_SYNCH_PREDIV 0x0130Also try to deactivate RTC wakeup timer before configuring it. (HAL_RTCEx_DeactivateWakeUpTimer() )
Another comment , I don't understand while you are using Timer interrupt and you have a possible easy use of Systick. Try to have a look to the example in STM32CubeF4 ''PWR_STOP'' under this path: STM32Cube_FW_F4_V1.12.0\Projects\STM324xG_EVAL\Examples\PWR\PWR_STOPIn this example the Led is toggling a configurable time (timingDelay) before entering stop mode.-Hannibal-2016-10-28 04:57 AM
hi
thank you very much for your helpPrediv defined as you wrote on h file.also tried disable the timer before configuring it - doesn't help.i might doing it wrong , i will check how to use systick, its just was easy to configure timer at the frequency i need. thanks for enlightening this - it might solve me the problem - use systick instead of interrupt timer.Edit : found the bug - TIM interrupt exception was issued during wakeup exception frame and invoke sleep request again.now i changed the code to stop TIM before sleep request and reactivate it in wakup call back function.