I just installed the qp framework to my embed using the dining philosophers example http://mbed.org/users/QL/programs/qp_dpp/ly37cg
Previously I installed the TextLCD library http://mbed.org/users/simon/libraries/TextLCD/livod0 and modified it slightly to allow for 16x4 displays.
I got the TextLCD library to work previously and to show text on my LCD display, but after installing the qp framework I cannot figure out how to make it work. If I put any of the lcd (LCD defined to this name) commands, e.g. lcd.cls(), the QP software just stop running just after start. I call the lcd from a function in the bsp.cpp, which in turn is called from the philo.cpp initial state. The calling from the initial state to the bsp.cpp works if I do not use lcd functions in the bsp.cpp code.
I tried to find any examples on how to use a LCD through a library such as the TextLCD, but did not find any.
Any ideas on how to call the lcd functions when using the qp framework?
Thanks in advance!
I found out myself that the problem with the TextLCD library is the wait commands. Without these the qp program works fine. The only problem is that the LCD does not work if the waits are omitted.
My question is therefore refined: How to implement something similar to wait with qp? Does one have to call some event, use a timer, etc.?
mbed library function Wait()uses timer-3. QP will be sure to use timers for its scheduling - probably timer3 also!
You can just write a simple wait function using CMSIS code, and use timer 0, 1, or 2. Here's an example - you can modify it using the register information in the UM
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top