Update: Strange it matters if we enable global interrupts before we enable each interrupt, or enable global interrupts after that. My collegue wrote in C18 forum http://forum.microchip.com/tm.aspx?m=280401&mpage=3 : " Now the code seems to work with both high and low priorities simultaneously. The only change that I have made is to enable interrupts globally (high and low) AFTER all interrupt priorities have been set. Before I started with no IE-flags enabled, then enabled interrupts globally, then changed priorities and in the last step I enabled the IE-flags. Is the old method I used a no-no that produces glitches? I need to be 100% certain that I have found the bug before I dare to go on, as undefined behaviour in this product might hurt people (industrial application). " /Morgan Den 2007-09-10 21:36:45 skrev Morgan Olsson : > After a couple hundred man hours... (yes, we are nuts probably...) > After submitting a support ticket and poning we finally got an answer that explains problems: > > " > Under certain conditions, the use of dual priority interrupts > may cause a program instruction to be skipped entirely. > This has only been observed when both of the following apply: > > * Both high and low interrupts are enabled, and > > * A high priority asynchronous interrupt occurs in the > following cycle after any low priority interrupts. > > The event causes the stack to get pushed twice, > and will eventually result in an overflow. > " > > AAAAAAHHH !!! > > > And this is not in any errata, and still Microchip knows about it. > (although a month ago when we asked they did not know any bugs not described in the erratas) > > OK... whatever... > Before we go on programming around that bug... > > Any idea how we can get to know all bugs, not just the ones released in erratas? > -- Morgan Olsson -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist