Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


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) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists