problem occurs when i integrated my code with Coldfire_Lite project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem occurs when i integrated my code with Coldfire_Lite project

1,898 Views
paddy
Contributor I
Hi,
 
i am using mcf52235EVB board and keeping the Coldfire_Lite V30.0 as base and i tried to intergrate my code. i need to use TCP communcation with other system and i need to communicate with LCD using UART.
 
By keeping Coldfire_Lite_TCP_server as target i created a task to handle the LCD module. in the task entry i am initialized the UART2 and in the infinet loop calling the LCD function.
 
After executing the first command the control goes the uart2_isr() routine and not executing the other function if control goes to the next function also it not displaying in LCD.
 
when i implemanted separately in the new project it's working fine. only interrupt is genterated when soft buuton is  pressed in LCD.
 
Does any setting show be done for Coldfire_Lite project.
 
could you please help me.
 
Regards,
Labels (1)
0 Kudos
6 Replies

528 Views
tkvenki
Contributor III
HI Paddy,

The Yield function in an OS will make a high priority task give way to the ones with lower priority. It prevents the other threads/taks from starvation.

So What I understand from your post is - you are calling Yield from infinite loop. Are you placing the yield function after doing all the things in your whle(1)

Like:
 while(1)
{
-----DO Tasks----
Yield();
}

Try doing a task sleep instead. I understand that there are other tasks which have to be suchronised with this one. Are you using any mutex/semaphore to ensure that you are reading the data after it is written??


0 Kudos

528 Views
RichTestardi
Senior Contributor II
In your new task's infinite loop, are you remembering to call tk_yield(), or some other similar function?
 
-- Rich
 
0 Kudos

528 Views
paddy
Contributor I
Hi Rich,
 
The control stays in the ISR routine when i run the program, i have attached the ISR routine for your refernce.
 
Kindly suggest me.
 
Thanks & Regards,
 
0 Kudos

528 Views
RichTestardi
Senior Contributor II
Hi,
 
I'm not sure what "ProcessLCDData();" does, but I assume it returns promptly and does not call *any* task switching functions.
 
When you say that the control stays in the ISR, what is the stack trace at the time?  Where is the ISR looping, or did you accidentally call a task switching function from the ISR and some other task has now "taken over" the ISR stack?
 
-- Rich
 
0 Kudos

528 Views
paddy
Contributor I
Hi Rich,
 
The LCD will send back the character, based upon the carriage return ProcessLCDData() is called. I am using two soft buttons in LCD when it pressed it will send buuton id to handle this operation the above function is used.
 
i am not calling any task switching from ISR,when i do F11 the control goes from ISR to task.c tk_block() function 
0 Kudos

528 Views
paddy
Contributor I
Hi Rich,
 
I am calling tk_yield() in the infinte loop. i have tried without using tk_yield() function also, but it show the same problem not displaying any button in the LCD but it clearing the screen.
 
when i debug step by step it's working fine, it is displaying the button in the LCD.But when i run the program it only clearing the screen.
 
 
Thanks & Regards,
0 Kudos