fosfolipid wrote on Wednesday, September 11, 2013:
Hi,
I want to join FreeRTOS and the deepest sleep mode in STM32, which doesn’t maintain on-chip RAM contest. I have an eval board STM3240G with external SRAM. The FreeRTOS version is 7.5.2. My app operates as follows:
1) initialization all of needed peripherals
2) creating 4 tasks blinking leds
3) starting scheduler ( vTaskStartScheduler() )
then app simply blinks leds and waits for external interrupt (from button)
button IRQ handler operates as follows:
it calls vTaskEndScheduler(); then it stores content of on-chip RAM in external RAM and calls system reset (integrally it simulates the deepest sleep mode)
after reset there is checked flag, which indicates MCU was hibernated
If it is true content of on-chip RAM is restored from external RAM and then it is called API function xPortStartScheduler.
And the issue is: sometimes app works after hibernation but sometimes - not. I think it depends on moment of pressing button. Has anybody any clues? Another issue is: when I replace xPortStartScheduler by xTaskResumeAll app always stop working. Thanks in advance for any suggestion how to solve the problem. Obviously all tips how to deal with “sleeping” FreeRTOS and “waking” it up with external RAM are welcome.
Regards