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 ? Thanks,
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.
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.
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 !
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.