my problem is: I want to sleep uC into Stop Mode (STM32) and use RTC Alarm as wakeup source. Also I want to run tick interrupts from RTC, not from SysTick timer.
The point is: when I choose a RTC second interrupt as tick interrupt and in Idle Hook set alarm from RTC manually - everything work good.
But when i choose an alarm interrupt as tick interrupt ( I set alarm value only once, but in xPortSysTickHandler I clear the RTC counter ) the uC should exit Stop Mode in Idle Hook with no additional necessary configurations, I think. But it doesn’t! Setting alarm manually in Idle Hook doesn,t work too.
Moreover, I configure RTC, EXTI and NVIC in the same way in both cases
Due to the huge array of chips available on the market we are unable to comment on chip specific configuration settings. However, generally RTC peripherals are only able to generate relative infrequent interrupts. It might be that is all your application needs.
It sounds like you have already made the changed necessary to use the RTC as the tick interrupt source. This should be straight forward as the function used to configure the tick interrupt is defined as a weak symbol, and can therefore be overridden by the application.
Is you system working if you do not place the MCU into stop mode in the idle task? If so, how does stop mode effect the configuration and operation of the RTC?
Yes, my system’s working when I don’t place MCU into stop mode in the idle task. But also it seems to me that the stop mode doesn’t affect RTC.
On the ST forum when they see “FreeRTOS” they say: “I would suggest to have a look at FreeRToS.org forum on this case” . A forum about OS and hardware configuration would be great.
Thanks for reply,