cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging SPC56EL behaves strangely

Raghu Rajappa
Associate
Posted on September 04, 2017 at 14:35

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 #microcontroller
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on September 04, 2017 at 17:11

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