Brett Wallace

M52235EVB issues and questions

Discussion created by Brett Wallace on Nov 14, 2008
Latest reply on Nov 15, 2008 by Rich Testardi
First of all, I just started playing with the M52235EVB in light of an upcoming project that will be using hte 52235 and ethernet.  My previous experince with Freescale is with HCS08/HCS12 devices.  I was playing around with the EVB and noticed some issues as soon as I tried to use the RTOS example project that comes with the EVB.  The LEDs were blinking quiet slowly and the console was very unresponsive while running the ColdFire_Lite_RTOS target. 
It quickly became clear something was wrong with the tasking system and it was a very simple basic problem.  After a quick debug session it shows that cticks was not being checked properly in the section of tk_block that looks for tasks to run.  The problem is cticks was declared as a  simple unsigned long, while it was still being modified in an ISR and checked in the main flow of the program.  It seems the compiler optimized some accesses to cticks and as such it doesn't check it properly.  The simple solution is declaring cticks as volatile in main.c and  ipport.h.  Does anyone know if there are similiar problems with these projects that I should look at before proceeding?