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 ]    [ Sitemap ]    [ ]

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

Latest News

Meet us at Embedded World. Hall 3A-525.

Hear from Richard Barry at Embedded World. Feb 28, 16:00, Hall 4-428.

Video: Watch James Gosling & Richard Barry at re:Invent, Las Vegas 2017.

FreeRTOS kernel V10.0.1 is available for immediate download. Now MIT licensed.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

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