Content originally posted in LPCWare by henna on Fri Jun 19 20:56:36 MST 2015
Hi Richard,
Thanks for the quick response.
I have working RTC interrupt which generates interrupt every 5 seconds, my problem is related to RTOS.
I understood that scheduler gets suspended before calling vPortSuppressTicksAndSleep() function. My problem is even if I enable the alarm timer interrupt which generates tick interrupt, RTOS does not resumes scheduler to resume LED tasks from main after wake up. I am not sure I am updating the alarm timer with correct tick value after wake up, I need some advise on how to update correct value to tick interrupt.
Second problem is it goes into a loop where vPortSuppressTicksAndSleep() function is called again and again and MCU goes to sleep and wakes up on RTC interrupt. This is like continuous loop and RTOS does not resume the tasks I call from main which is just to blink LED's. Do I need to create any task which calls vPortSuppressTicksAndSleep() function whenever I want to goto sleep.
My wake up interrupt using RTC is on semaphore and xSemaphoreGiveFromISR function is called from ISR during RTC wake up interrupt, do you think this is the problem as this requires context switch while scheduler is suspended.
Any help or suggestion will appreciated.
Regards,
Heena