Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

lpc23xx FreeRTOS and sleep or power down mode

Posted 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 mode

Posted 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 mode

Posted 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 ?




[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner