How to detect via software that an on-chip Debugger is connected? using MPC5643L

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect via software that an on-chip Debugger is connected? using MPC5643L

408 Views
CInvasion
Contributor I

I want to detect via software if an on-chip debugger is connected. i use JTAG iC3000 with the board MPC5643L.

 

Is there a way to do that ?
If not, is there some other way to write an instruction/code that halts if a debugger is connected and ignored otherwise ? 

 

Thank youu

Tags (1)
0 Kudos
2 Replies

231 Views
TomE
Specialist I

I dd that on an MPC860 chip. Some of the Debugger module registers become read-only on that chip when the debugger is attached, so I had my code perform a read/write/read test on some unimportant bits in one of the registers.

 

Good luck trying to understand anything in the Nexus chapter!

 

Another possibility (assuming you want your code to know if you've come out of reset stand-alone or have started under the control of the debugger) is to have the debugger initialisation script write a non-default value to a device register in the CPU. If your startup code finds a non-default value in this register it knows the debugger wrote it that way.

 

Tom

 

0 Kudos

231 Views
CInvasion
Contributor I

Thanks Tom.

 

I found a bit EDM in SPR DBCR0, this bit it automatically set to 1 if a debugger is connected, and 0 otherwise.

0 Kudos