Hi All,
I'm working with MPC5674F evlauation board and developing a program that is running in software debug mode.
My intention is that, inside the program I want to change PC(program Counter) and IR register
to jump and run the specific function when IAC, DAC or DVC exception occurs.
But I can't find any comment on PC and IR register in reference manual and even there are not seen PC and IR register in register model diagram in reference manual.
Can anyone help me how to access PC and IR register in S/W debug mode and to change them ?
Thanks in advance
Hi Peter,
Thanks so much for your kind explanation.
I'm trying to do the way you recommended.
While trying, If I encounter a problem, let me ask you again.
Many Thanks
Hoseok
Hi Peter,
Normal code jump is insufficient for me.
Those PC & IR should be used for S/W debugging in software internal debug mode.
When an exception occurs, I'll catch the running and change PC & IR to run another program or function for specific debugging.
looking forward to your help.
Thanks a lot
hoseok
Hi,
Changing PC is not possible in SW debug mode.
Only way I see is to use jump from your exception or
in you exception before return change return DSRR0 to address where you want to jump.
"Debug Save/Restore register 0 (DSRR0). When enabled, the DSRR0 register is used to save the address of the instruction at which execution continues when an rfdi or se_rfdi instruction executes at the end of a debug interrupt handler routine."
After execution of function you will need to know where to return.
Peter
Hello,
Isn't for you sufficient to use normal code jumps?
Is this for debug purposes?
Peter