Quality RTOS & Embedded Software

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


waiting before Scheduler init

Posted by bacalao on August 11, 2008
Hi all,

I have a kinda general question but here it is, first of all I am working with FreeRTOS v5.02, AT91SAM7X port and GCC compiler.

I would like to use the SPI (Serial Peripheral Interface) of this processor to send data to an LCD, so I initialize this peripheric in the main function, as in the prvSetupHardware() function in the demo. However, the initialization procedure requests to wait some dead time between commands are sent to LCD driver, and vTaskDelay() funtion is useless as i didnt have called thevTaskStartScheduler function (where system tick is set). I wouldn't like to modify the FreeRTOS kernel, so I am searching for any alternative. Any ideas ?


RE: waiting before Scheduler init

Posted by Bob Cobb on August 11, 2008
Most LCD drivers have a ‘Ready’ bit that can be read from the bus. I would suggest looping on a read to this condition instead of a simple dead timed loop.

RE: waiting before Scheduler init

Posted by Dave on August 11, 2008
You could also do the LCD initialization from a task. This is how the LMI examples work. Another way is to have a start up task that does the init then spawns all the other tasks before entering its while(1) loop or simply deleting itself.

RE: waiting before Scheduler init

Posted by bacalao on August 11, 2008
Thank you very much for your answers.
In my configuration it is not possible to read data from the LCD driver so the first proposal which is the proper way to do it itsn't possible...
I saw the LMI LM3S102 demo and I think I will adopt Dave's solution, deleting the initialization task.
Thanks again !

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

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

Latest News

Version 10.1.0 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.


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


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