Global variable problem (the program got stuck after just executing the assignment )

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Global variable problem (the program got stuck after just executing the assignment )

Jump to solution
843 Views
ycgxy1650601
Contributor III

HI:
    Software version: CodeWarrior 2.10   /    hardware version: mpc5606b borad

Problem: when I debug the program from step 1 to step 2 by single step debugging(see Figure 1),  the program got stuck.  The software interface is showed in figure 2 when the program got stuck.   I click the stop button,   then the software interface is shown in Figure 3.   I find the result that the pointer always point to  "00001020 e800 se_ B 00001020" after clicking the stop button.   I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020).  The global variable currentprot is described in Figure 4.

Why the program got stuck after executing the assignment statement of global variable currentprot by single step debugging?

 

debug2 - 副本.JPGdebug2-1 - 副本.JPGdebug2-2 - 副本.JPG

list global variables.JPG

THANKS

0 Kudos
Reply
1 Solution
834 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I find the result that the pointer always point to "00001020 e800 se_ B 00001020" after clicking the stop button. I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020). The global variable currentprot is described in Figure 4.

The program is not stuck.

it just run into endless loop like while(1). uC is working correctly. Please check you source code.

 

best regards,
Peter

View solution in original post

0 Kudos
Reply
1 Reply
835 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

I find the result that the pointer always point to "00001020 e800 se_ B 00001020" after clicking the stop button. I have tried many times, the result never change(PC 00001020 and 00001020 e800 se_ B 00001020). The global variable currentprot is described in Figure 4.

The program is not stuck.

it just run into endless loop like while(1). uC is working correctly. Please check you source code.

 

best regards,
Peter

0 Kudos
Reply