How to configure the GUI_X.c to provide the right timing routines?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        I am new to PSOC. When I run the example: touch_sample.c provided by the emWin. it didn't update the analog input. It seems the it is dead in the GUI_Delay() step; So I think it is possibly caused by wrong configuration of the timing routine for GUI_X.c. Because I don't use an OS, so I don't know how to update the OS_TimeMS in the GUI_X_gettime(). Sorry for my English, but hope you could understand me.   
0 Likes
3 Replies
JaVa_282241
Level 2
Level 2
10 replies posted 5 questions asked 5 replies posted

Hello,

   

I was same problem when i tested GUI routines. I  just replaced GUI_Delay() routine by my own.

   

Don't forget call GUI_TOUCH_Exec() routine 100 times/second.

   

Jan 

0 Likes
Anonymous
Not applicable
        HI Jan, Thank you very mcuh for your reply. I tried that before. I used Cydelay() to replace GUI_Delay() in the Touch_Sample.c; It works. I think the GUI_Delay() will call GUI_X_Delay(), so I modified the GUI_X_Delay() as following: void GUI_X_Delay(int ms) { //int tEnd = OS_TimeMS + ms; //while ((tEnd - OS_TimeMS) > 0); Cydelay(ms); }. It doesn't work. another question on GUI_gettime() which should call the GUI_X_gettime(). I tried to use a timer and ISR to simulate an OS 1ms ticks to update the OS_TimerMS. but still now working. Do you have some idea on how to get the current timing without OS. thanks.   
0 Likes
JaVa_282241
Level 2
Level 2
10 replies posted 5 questions asked 5 replies posted

Hi Robbine,

   

I did not have to make any changes to GUI_X.c file. It is not important that GUI_Delay() don't work for me. Just replace delay function in your design.

   

 

   

Jan 

0 Likes