2013-07-02 12:18 AM
Hello,
I'm working with stm3220G and I get lcd example and ok. I have my small project with tasks and when I try to write to lcd into task routine, the operation failed. The operation has successfully if into task routine, I call lcd_init but it's not good solution. Is there a alternative solution? And, are there example touch screeen??Thanks2013-07-02 06:38 AM
Your wording is somehow difficult to understand, but I believe your problem is the duration of LCD routines, which presumably take longer than the time assigned to a task.
I guess you are calling such LCD routines asynchronously from different tasks, without any coordination. Absent any ressource sharing method, they mutually destroy each others context, and fail to produce the desired result. You could for instance assign all graphics operation (i.e. LCD access) to one task exclusively, and use a queue to handle/serialise such operations. Just use your favourite search machine, and look for ''multitasking'' and ''exclusive ressource access'' for methods to handle such situations.