Cannot program K20DX256 on TWR-K20D72M board

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

Cannot program K20DX256 on TWR-K20D72M board

Jump to solution
1,133 Views
rogerpease
Contributor III

Just got a new TWR-K20D72M and am attempting to debug with it from KDS.

P&E GDB Server, Version 5.07.00.00

Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

Loading library C:\Freescale\KDS_1.1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.2.201408071632\win32\gdi\unit_ngs_arm_internal.dll ... Done.

Command line arguments: -device=K20DX256 -startserver -serverport=7224 -interface=USBMULTILINK -speed=1200 -usejtag -port=USB1 -USE_CYCLONEPRO_RELAYS=0 -FORCE_MASS_ERASE=1

Device selected is k20dx256

User Specified Hardware Selection : Interface=USBMULTILINK and Port=USB1

Connecting to target.

P&E Interface detected - Flash Version 31.21

Forcing mass erase...

Device is K20DX256.

Mode is In-Circuit Debug.

'Kinetis' is a registered trademark of Freescale.

(C)opyright 2012, P&E Microcomputer Systems, Inc. (www.pemicro.com)

API version is 101

Server running on 127.0.0.1:7224

Connection from "127.0.0.1" via 127.0.0.1

Copyright 2012 P&E Microcomputer Systems,Inc.

Command Line :C:\Freescale\KDS_1.1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.2.201408071632\win32\pegdbserver_console -device=K20DX256 -startserver -serverport=7224 -interface=USBMULTILINK -speed=1200 -usejtag -port=USB1 -USE_CYCLONEPRO_RELAYS=$

CMD>RE

Initializing.

Target has been RESET and is active.

CMD>CM C:\Freescale\KDS_1.1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_1.1.2.201408071632\win32\gdi\P&E\k20dx256z_pflash_dflash_eeprom_pipeline.arp

Initializing.

Initialized.

;version 1.12, 02/04/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [mk_256k_x_pflash_dflash_eeprom_pipeline]

;device freescale, k20dx256z, desc=pflash_dflash_eeprom_pipeline

;begin_cs device=$00000000, length=$14001000, ram=$20000000

Loading programming algorithm ...

Done.

CMD>EM

Erasing.

Module has been erased.

Initializing.

Initialized.

;version 1.12, 02/04/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [mk_256k_x_pflash_dflash_eeprom_pipeline]

;device freescale, k20dx256z, desc=pflash_dflash_eeprom_pipeline

;begin_cs device=$00000000, length=$14001000, ram=$20000000

Loading programming algorithm ...

Done.

CMD>PM

Programming.

Processing Object File Data ...                                

Error! Last command failed.

Error Programming flash of device

Error occured during Flash programming.

Device is Secure.

Device is secured. Erasing ...

PE-ERROR: Error downloading to the device.

Things I have checked:

  * I have checked that the "Always Mass erase on Connect" flag is checked.

  * I have checked the jumpers (J16 in particular).

On failing, the tool says it cannot find instruction 0xFFFFFFFE (I'm guessing it tries to start, reads an unprogrammed vector table filled with an erased flash's 0xFFFFFFFFs and tries to branch to a thumb instruction at 0xFFFFFFFE).

Any suggestions on why this is not working?

Possible thinking is I'm missing a jumper -OR- I'm using Mini-USB instead of Micro USB (I couldn't get Micro-USB to power).

Thanks,

Roger

1 Solution
664 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Roger:

Seems that the selected device is wrong.

Try changing this:

pastedImage_2.png

To this:

pastedImage_3.png


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
664 Views
rogerpease
Contributor III

Ok, P&E Microcomputer Systems  website says that there the "Device is secure" message is a red herring meaning the device may not be powered/talkable-to from the OSBDM/OSJTAG. I will try to verify connectivity.... wondering if I mis-set a jumper. Or if I have the wrong version of gdbserver talking to that pseudo-jtag chip?

0 Kudos
665 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Roger:

Seems that the selected device is wrong.

Try changing this:

pastedImage_2.png

To this:

pastedImage_3.png


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

664 Views
rogerpease
Contributor III

Thanks- That was it. I'm still getting used to Freescale grouping peripheral features by processor speed.

General suggestion for anyone reading this... don't ignore the number after the Package Code.... you may have to try all the different reasonable selections. 

0 Kudos