Quality RTOS & Embedded Software

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


Loading

LPC2148 Idle mode and FreeRTOS

Posted by r c on June 8, 2010
Hi,
I am working on an event-driven application for the LPC2148. I do not have any RTOS yet, but have started looking at FreeRTOS and want to transition to FreeRTOS soon.
I have a question about FreeRTOS and low-power modes:
My application spends most of its time in Idle mode, wakes up on UART interrrupts or timer interrupt (every few minutes), does processing and goes back to sleep.
From what I understand of FreeRTOS, I think I could put the processor to Idle mode in the Idle Task Hook. However, any interrupt can wake up the processor. So I think the FreeRTOS kernel tick will keep waking up the processor and since none of the tasks are ready to execute at that time, the idle task hook will put the processor back to sleep.

So my question is - when going into the processor's idle mode, is it also possible to put the kernel to sleep (so that tick interrupts are not generated) and then wake up the kernel only when an interrupt occurs that creates work for my application tasks (uart interrupt or the application timer interrupt in my case)?

Thanks,


RE: LPC2148 Idle mode and FreeRTOS

Posted by Richard Damon on June 9, 2010
It should be possible for the idle Hook to disable the system timer if it knew that there is nothing waiting for a timeout, but I don't know how easy it would be for FreeRTOS to give you that sort of information.

One the other hand, if your application doesn't need short timeouts, it may be possible to lower the tick rate low enough that disabling it isn't needed. You do talk of an application timer interrupt, so I am assuming you do have some need for a timer, it may be possible that that could be your system tick too.

RE: LPC2148 Idle mode and FreeRTOS

Posted by r c on June 9, 2010
“One the other hand, if your application doesn't need short timeouts, it may be possible to lower the tick rate low enough that disabling it isn't needed. You do talk of an application timer interrupt, so I am assuming you do have some need for a timer, it may be possible that that could be your system tick too. ”


I think this might work! For this application I do not need short timeouts for task scheduling. I think I could have my other task be blocked for a UART interrupt. So if this interrupt occurs before the RTOS scheduler tick, it will wake up the processor and also the RTOS scheduler, which would then run the UART task as it would be in the ready state at that time.

Thanks!


[ 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