2017-09-04 05:35 AM
I have a simple for loop that should ideally run 20 times, inside which I toggle an LED.
When I debug this code on my SPC56EL controller (on a daughter board which is mounted onto the XP56 motherboard) WITHOUT hardware breakpoints, it toggles only once and exits the main handler (confirmed this behavior). But when I add breakpoints in the loop, it works perfectly. Any logical reasoning for such a behavior?Summarizing - The code works when I put breakpoints in the loop but executes the loop only once when I do not put any breakpoints in the loop. #pls #spc56 #32bits #microcontroller2017-09-04 08:11 AM
Hello Raghu ,
It is maybe due to the Compiler optimization.
Which compiler do you use ?
for such case , it is better to switch in assembler by Mixed Code
Do you reproduce the issue in some examples applications in SPC5Studio ?
SPC56ELxx_RLA SERIAL Test Application for DiscoveryPlus
Best regards
Erwan