I have a bizarre bug which means that code stops working properly after a power down reset. [It always works fine just after programming.]
I have discovered that if I take out a section of code containing an IJMP and table, the bug goes away (at least with the code I am working on at the moment). Whether this is just a red herring or not I don't know yet.
Has anyone else has ever run into irregularities with using IJMP?
I could understand strange errors if I was using EIJMP and didn't properly init the EIND Register, but this reg is not even in the devices I am using.
I even checked to make sure the assembler was generating the correct hex for the IJMP instruction.
Code goes like this, and I've used it a lot before:
(That's my assembler macro to load Z with the address of the table of rjmp instructions)
Got me stumped at the moment.