FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [August 2010 Threads] lpc23xx FreeRTOS and sleep or power down modePosted by Ben on August 25, 2010 I am trying to put an LPC2368 into power down or sleep mode. I can get the chip to sleep and wakeup with out any problems, however I sometimes get data aborts after waking up.
Now I just want to check what I am doing with FreeRTOS is correct.
I have several tasks running. When it is time to sleep most of the tasks block on a semaphore.
So when going to sleep, I call taskENTER_CRITICAL(), stop the RTOS timer and put the chip into power down mode.
Upon waking I start the RTOS timer and call taskEXIT_CRITICAL().
Can anyone see any problems with this ?
Using GCC to compile.
thanks Ben
RE: lpc23xx FreeRTOS and sleep or power down modePosted by Richard on August 26, 2010 Where are the ENTER/EXIT critical functions called from, and is it as part of the same sequential code?
I don't have experience of sleep modes on LPC2000's I'm sorry to say, so assistance will be limited if there is some quirk of the architecture that could cause a problem, but I would suggest writing a test program without FreeRTOS included to see if it is kernel related or not. For example, have a program that sets up a tick interrupt that does nothing much (maybe toggle an LED every 100ms), then execute code to disable interrupts and put into sleep mode - then when waking up enable interrupts and see if the LED starts flashing again.
Regards.
RE: lpc23xx FreeRTOS and sleep or power down modePosted by Ben on August 31, 2010 the Enter- Sleep - Exit are all inside a function called from one of the running tasks.
I am re-checking all the code paths inside the Enter/Exit calls to make sure no FreeRTOS calls are made ( I don't think any are).
I think my problems are timing/interrupt based with some memory corruption, but I am not 100% sure on that. Most of the time everything resumes as normal.
Fairly sure it is not a stack issue. I have plenty of free RAM and so have increased stacks sizes quite a bit. vTaskList() reports plenty of free space for the tasks.
I am assuming stopping the RTOS timer would in effect halt the RTOS and as long as I make no api calls that would result in a task switch, I would be pretty safe.
If you had to suspend the RTOS to put a chip to sleep how would you go about it ?
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|