Hi, tried what you suggested and numerous other things, but nothing helped.
Cleaned up the code and pruned it down to bare essentials, no dice. Then I said to myself: Hello, could this actually be a simple good old fashioned bug instead of some mysterious memory conflict? Ok, changing variables changed the timing but no matter where the variables were located (I even moved part of the global data affected to 0x400) and how much I reduced the memory usage, the basic pattern of the memory corruption was there. So I round up the usual suspects (sorry Bogey, RIP) and behold, there was some missing 'volatiles' in the stepper state variables/definitions. What was happening was that the main program itself was corrupting the variables because it went and touched them while the interrupt was still working on them because the missing volatile defeated the interlocking. Oh bugger! Silly me and this after almost 30 years doing embeded stuff! Thanks for listening. And thanks for the SDCC developers for nice compiler. br Kusti >>> [email protected] 22.1.2009 0:25 >>> Hi, Kustaa Nyholm schrieb: > void stepperSeekPosition(int stepperNo, uint32 seekPosition) { ... > int16 stepperGetState(int stepperNo){ could you try void stepperSeekPosition(unsigned char stepperNo, uint32 seekPosition) { and uint16 stepperGetState(unsigned char stepperNo){ not that it should matter? ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sdcc-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Sdcc-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user
