K12D512 continuously pulses /RESET line.

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

K12D512 continuously pulses /RESET line.

Jump to solution
1,647 Views
iscan
Contributor II

Very simple board with a MK12D512VLH5.  I have five prototypes and they all behave the same way.  This is a problem I see others on the forum have encountered with other Kinetis parts and I have read all the relevant threads I can find.

  • I have pull-ups on SWD_DIO,  /RESET and /NMI, pull down on SWD_CLK. Vcc=3.3V
  • On power-up, the /RESET line continuously pulses low (low for 56us, high for 2.8us)
  • I am not able to debug simple code using mcuXpresso - the debugger hangs immediately with this message in the debug window:

Thread #1 57005 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)          

0xdeadbeee              

 

I can connect with Seggar jlink over SWD using Jlink commander utility with limited functionality.

Output from j-Link Commander V6.42b:

Connecting to target via SWD

InitTarget()

Found SW-DP with ID 0x2BA01477

Scanning AP map to find all available APs

AP[2]: Stopped AP scan as end of AP map has been reached

AP[0]: AHB-AP (IDR: 0x24770011)

AP[1]: JTAG-AP (IDR: 0x001C0000)

Iterating through AP map to find AHB-AP to use

AP[0]: Core found

AP[0]: AHB-AP ROM base: 0xE00FF000

CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)

Found Cortex-M4 r0p1, Little endian.

FPUnit: 6 code (BP) slots and 2 literal slots

CoreSight components:

ROMTbl[0] @ E00FF000

ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB000 SCS

ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT

ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB

ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM

ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU

ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM

Cortex-M4 identified.

J-Link>

J-Link>r

Reset delay: 0 ms

Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

Reset: Halt core after reset via DEMCR.VC_CORERESET.

Reset: Reset device via AIRCR.SYSRESETREQ.

AfterResetTarget()

J-Link>unlock kinetis

Found SWD-DP with ID 0x2BA01477

Unlocking device...O.K.

J-Link>erase

 

**************************

WARNING: CPU could not be halted

**************************

 

Erasing device...

 

**************************

WARNING: CPU could not be halted

**************************

 

 

****** Error: Can not read register 16 (XPSR) while CPU is running

Can not read register 20 (CFBP) while CPU is running

Can not read register 0 (R0) while CPU is running

Can not read register 1 (R1) while CPU is running

Can not read register 2 (R2) while CPU is running

Can not read register 3 (R3) while CPU is running

Can not read register 4 (R4) while CPU is running

Can not read register 5 (R5) while CPU is running

Can not read register 6 (R6) while CPU is running

Can not read register 7 (R7) while CPU is running

Can not read register 8 (R8) while CPU is running

Can not read register 9 (R9) while CPU is running

Can not read register 10 (R10) while CPU is running

Can not read register 11 (R11) while CPU is running

Can not read register 12 (R12) while CPU is running

Can not read register 14 (R14) while CPU is running

Can not read register 15 (R15) while CPU is running

Can not read register 17 (MSP) while CPU is running

Can not read register 18 (PSP) while CPU is running

 

****** Error: Failed to download RAMCode.

Failed to prepare for programming.

Failed to download RAMCode!

ERROR: Erase returned with error code -1.

J-Link>

I have read the “Kinetis Lock issue analysis and unlock way” paper.  It looks like the most obvious problem may be damage from overheating during assembly.  All five prototypes were built using a hot air reflow rework station by an experienced tech.  I have never encountered this problem before with hand-built prototypes but there is always a first…..

 

Q1) Are there any suggestions for resolving this before I try replacing the microcontrollers? 

Q2) Are the Kinetis microcontrollers particularly susceptible than other microcontrollers to damage from overheating?

Q3) Does it make sense that the debug circuitry would work but not the rest of the microcontroller, on all 5 samples?

Thanks in advance,

Ian 

0 Kudos
1 Solution
1,080 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi IAN SCANLON,

   Now, follow my way to download the code with JLINK.

  1. Download the SDK_2.3.1_MK12DX256xxx5.zip from this link:

Welcome | MCUXpresso SDK Builder 

   Choose the processor as MK12DX256XXXX5, then build the MCUXpresso SDK:

pastedImage_11.png

After you download it, then open the MCUXpresso IDE

2. drag the SDK to your MCUXpresso IDE installed SDKS,

pastedImage_12.png

3. import my attached project to your MCUXpresso IDE.

  Then build the project, and download it with JLINK.

  Please check my debug result:

pastedImage_13.png

It can enter the main code.

It means the project works OK.

Please try it on your side.

If you still have question about it, please kindly let me know.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
8 Replies
1,080 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi IAN SCANLON,

    Thank you for your interest in NXP kinetis product, I would like to provide service for you.

    From your log, it seems you already can find the ARM cortex M4 core.

    Please use the JLINK commander window to double check it again on your problem board.

    Then send me the screenshots, if you still can find the core.

    Just when use the IDE to download the code to your chip have problem, I think it may your project configuration problems.

    Then please give me your chip part number again, MK12D512VLH5 is not complete, it is MK12DX512VLH5 or MK12DN512VLH5?

    Then I will help you create a new simple project for your test.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,080 Views
iscan
Contributor II

Two boards have had the MK12DX256VLH5 replaced.  Careful attention was paid to not exceeding max temperature during the process.  The exhibit the same behavior.

0 Kudos
1,081 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi IAN SCANLON,

   Now, follow my way to download the code with JLINK.

  1. Download the SDK_2.3.1_MK12DX256xxx5.zip from this link:

Welcome | MCUXpresso SDK Builder 

   Choose the processor as MK12DX256XXXX5, then build the MCUXpresso SDK:

pastedImage_11.png

After you download it, then open the MCUXpresso IDE

2. drag the SDK to your MCUXpresso IDE installed SDKS,

pastedImage_12.png

3. import my attached project to your MCUXpresso IDE.

  Then build the project, and download it with JLINK.

  Please check my debug result:

pastedImage_13.png

It can enter the main code.

It means the project works OK.

Please try it on your side.

If you still have question about it, please kindly let me know.

Kerry

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,080 Views
iscan
Contributor II

Thank you Kerry.

First tests are good.  It looks like mistake with PN caused the problems. The board was designed for K12DN512 part but it wasn't immediately available so K12DX256 was substituted.  Because "unlock Kinetis" causes the  board to crash I assume it still wasn't working.  New SDK + project resolved the problem.

Thanks for your help.

Ian

0 Kudos
1,080 Views
iscan
Contributor II

Part is marked MK12DX256VLH5.  I realize now that I have been specifying the wrong part PN.  I performed the J-link Commander and mcuXpresso debug tests again with the correct PN and have the same results.

0 Kudos
1,080 Views
iscan
Contributor II

Hi Kerry,

I have attached more J-Link Commander output below. This is from a new J-Link Commander session and a fresh POR.

SEGGER J-Link Commander V6.42b (Compiled Feb 5 2019 17:33:07)
DLL version V6.42b, compiled Feb 5 2019 17:31:40

Connecting to J-Link via USB...O.K.
Firmware: J-Link Lite-Cortex-M V8 compiled Sep 15 2016 12:05:01
Hardware version: V8.00
S/N: 398000651
OEM: IAR
VTref=3.280V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: MK12DN512XXX5 (ALLOW SECURITY)
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>1000
Device "MK12DN512XXX5 (ALLOW SECURITY)" selected.


Connecting to target via SWD
InitTarget()
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB000 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>

I can read CPU ID SFR and read/write RAM

J-Link>mem32 0x40048024 1
40048024 = 00009205

J-Link>mem32 0x20000000 1
20000000 = B1313030


J-Link>w4 0x20000000 0xAA55001F
Writing AA55001F -> 20000000


J-Link>mem32 0x20000000 1
20000000 = AA55001F


Below you can see I can reset the CPU. I can not erase.  If I try unlock before erase the J-Link returns "Unlocking device...O.K" but the uC enters continuous reset cycle state.

J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.
AfterResetTarget()
J-Link>erase
Erasing device...

****** Error: Failed to prepare for programming.
Could not preserve target memory.
ERROR: Erase returned with error code -1.
J-Link>unlock kinetis
Found SWD-DP with ID 0x2BA01477
Unlocking device...O.K.
J-Link>erase
Erasing device...

**************************
WARNING: CPU could not be halted
**************************


****** Error: Can not read register 16 (XPSR) while CPU is running
Can not read register 20 (CFBP) while CPU is running
Can not read register 0 (R0) while CPU is running
Can not read register 1 (R1) while CPU is running
Can not read register 2 (R2) while CPU is running
Can not read register 3 (R3) while CPU is running
Can not read register 4 (R4) while CPU is running
Can not read register 5 (R5) while CPU is running
Can not read register 6 (R6) while CPU is running
Can not read register 7 (R7) while CPU is running
Can not read register 8 (R8) while CPU is running
Can not read register 9 (R9) while CPU is running
Can not read register 10 (R10) while CPU is running
Can not read register 11 (R11) while CPU is running
Can not read register 12 (R12) while CPU is running
Can not read register 14 (R14) while CPU is running
Can not read register 15 (R15) while CPU is running
Can not read register 17 (MSP) while CPU is running
Can not read register 18 (PSP) while CPU is running


****** Error: Failed to prepare for programming.
Could not preserve target memory.
ERROR: Erase returned with error code -1.
J-Link>

Do you require additional J-Link commander output?

Regards,

Ian

0 Kudos
1,080 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi IAN SCANLON,

   Good test result.

   Your smallest system don't have problems, you can find the ARM core and do the mass erase.

   About the erase, I think you can use this commander: erase all

   From your now situation, I think you can download the code, it should not have the problems.


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,080 Views
iscan
Contributor II

Two boards have had the MK12DX256VLH5 replaced.  Careful attention was paid to not exceeding max temperature during the process.  The exhibit the same behavior.

0 Kudos