I think this has something to do with the message from the "Angry Mac Man". Some of these Apple huggers have been known to put pins into the clay simulacrum of a PC user who does embedded design. Not me, I have learned to tolerate the slings and arrows of PC folk mocking us wimpy Mac users. MA > > On Nov 28, 2008, at 6:45 PM, Vitaliy wrote: > > Just throwing this out there, in case someone knows about the issue... > > So we have a chip, that prints a "welcome" message on startup. It is > possible to sent it a message on UART, that would execute the "reset" > instruction, which is #defined like this: > > #define p_Reset() __asm__ volatile ("reset") > > Everything was working well, until I turned on optimizations. On > power-on, > the chip sends the welcome message like it should. However, after > the UART > "reset" command, it spits out a bunch of garbage instead of the > welcome > string. Inserting a small delay: > > for (i =0; i < 100; i++) ; > > ..fixes the problem (i < 10 is not long enough). > > Any ideas about what's going on? I'm just starting to look into this > problem, but in case someone knows the answer and wants to help me > an hour > or two of debugging, I'll be grateful. :) > > Vitaliy WFT Electronics Denver, CO 720 222 1309 " dent the UNIVERSE " All ideas, text, drawings and audio , that are originated by WFT Electronics ( and it's principals ), that are included with this signature text are to be deemed to be released to the public domain as of the date of this communication . -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist