9s12xet256 debugging with PEMicro

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

9s12xet256 debugging with PEMicro

1,455 次查看
michaelhuslig
Contributor IV

I have been trying for some time to get either of my PEMicro debuggers (ML Universal and ML-12) to talk to a 9s12xet256 with no luck.  I can see the RESET and BKGD pins toggling but CW5.2 (Win10) doesn't see the uP.  I have also tried Win7 and CW5.1;  same thing.  The uP is operating at 5V (on board regulator), and I do see a 4 MHz clock on ECLK.  MODB is open and MODA is connected to an OE input on a SRAM.

Mike

0 项奖励
回复
5 回复数

1,315 次查看
michaelhuslig
Contributor IV

I forgot to mention, I have done all the patches and driver updates and other recommendations provided by PEMicro.

Mike

0 项奖励
回复

1,315 次查看
kef2
Senior Contributor V

BDM debug is normally performed in single chip mode. Debugger by default pulls BKGD(MODC) low and then pulses /RESET pin. Having MODB/A set up for single chip mode this makes target enter special single chip mode. It is very useful mode because target MCU stays stopped at start of your program.

Having MODB/A pins set to expanded mode, pulling BKGD low and pulsing /RESET pin will render not very useful operating mode. To avoid this odd mode you need to always use debuggers Hotplug mode, which assumes target is running and reset is not performed.

There's an easier option for expanded mode, make MODB/A pins pulled for single chip mode and reconfigure operating mode on the fly from single chip to expanded mode.

0 项奖励
回复

1,315 次查看
michaelhuslig
Contributor IV

According to MC9S12XEP100RMV1.pdf, MODA and MODB are internally pulled low when /RESET is low.  Therefore, the uP on my board should be in Normal single chip or Special single chip mode depending on how the debugger pulls BKGD.  My problem is the PEMicro debugger is not talking to the uP.

0 项奖励
回复

1,315 次查看
kef2
Senior Contributor V

Ugh, OE-MODA connection made me thinking you are trying booting to expanded mode, sorry. Still internal pull devices are quite weak, I would check if MODA pulls low on time.

Perhaps MCU got secured, did you try P&E Unsecure12 utility? Are you able to read registers, perhaps manipulate some DDRx and PORTx registers via memory window to make some pin high/low?  

0 项奖励
回复

1,315 次查看
michaelhuslig
Contributor IV

Read the following then note that I observed the MODE register as 0x00.

I sent this to PEMicro today:

I had to go back to a home grown BDM interface I had made long ago for the HC12A4.  After modifying my BDM firmware, I was able to see the BDM signal and noticed I needed to add a pull-up on the BGND line, since my BDM used an open collector to talk to the target.  I could also reprogram my BDM to use a push-pull pin, in which case I didn't need to add the pull-up resistor.  I hadn't noticed a slow rise time on the BGND pin when I was using the PE BDMs, so I assume your BDMs didn't need a pull-up?

So anyway, I added the pull-up and tried to use the PE BDMs.  No luck.  So I tried the UNSECURE12 program.  It didn't work with the Multilink Universal, but did work with the ML-12.  You need to fix this since the ML-12 is obsolete.

However, with the uP unsecured, CW5.2 still wouldn't program the target with either PE BDM.

Mike H.

0 项奖励
回复