Reply
Posts: 3
Registered: ‎10-06-2017

IDE apparent unwanted jump after 2 CNJE instructions

Hello, I am using the Silicon Labs IDE version 4.90.00 Debug logic version 6. I am experiencing an issue where when 2 if statements are set to execute one after another, (in assembly generating 2 CJNE instructions) the Debugger shows an incorrect jump to the spec defined USB interrupt. If any arbitrary instruction is placed between the if statements, this effect is not seen. Note the USB interrupt is not enabled so I believe this is a byproduct. Furthermore, when running in real time, on hardware it appears the code is executing correctly. Now, the assembly is computing the offset correctly, and in fact after the undesired jump is taken, and other "imaginary"/"invisible" lines of code are "executed" the code will return to the correct line. I believe this is an issue with the IDE/debugger. It is more strange to me that this issue is not replicable across multiple hardware platforms I use. Finally, I isolated the issue by putting two back to back if statements in a while(1) loop and only running that in the chip, the same issue arises. Do to the nature of the work I cannot post snippets of code.
Highlighted
Posts: 8,172
Registered: ‎08-13-2003

Re: IDE apparent unwanted jump after 2 CNJE instructions

 I believe this is an issue with the IDE/debugger.

could also be a result of overly optimizing.  try to set optimize level to 2 and see

erik