Flashing problem

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

Flashing problem

2,976 Views
benelghali
Contributor II

Hi everybody,

I am using Kinetis KV31F256m12 package with 64 pins KSDK 1.2 on IAR Embedded workbench v7.2 and  the JLink as flashing tool.

I have already downloaded my program several times on the board and it worked very well but since yesterday I am facing the following problem when trying to download the same program on the same board with the same configuration and tools IAR cannot download the program and show me the following message :

---- Fatal error: Kinetis (connect): Timeout while halting CPU. CPU does not stop.   Session aborted!--------

and when I tried to use the command lines to control Jlink the command halt does not work ------cannot halt CPU------

And when watching the reset pin which is supposed to be at high state 3.3V in our case we found that it is at 1V so we tried to force it to 3.3V but we got the same message ---cannot halt CPU---

We checked the pin PTA4  and is high.

Other remark, we noticed that there is a potential of 1.5V on the pin PTA1.

It seems like if the CPU is stacked in the reset state and cannot leave that state.

Also when we tried the hwinfo command on the Jlink Commander it show this in his message: HWInfo[00]=Target power is disabled

Also when we tried to download the program on an other similar board it worked very well very well.

Can you help me please.

Thanks.

Labels (1)
0 Kudos
7 Replies

1,179 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

If there with some hardware modification or hardware damage on that board?


Have a great day,
Ma Hui

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

0 Kudos

1,179 Views
benelghali
Contributor II

Hi,

we have no problem with the hardware we have tested several pins and there is no problem.

The only problem is with processor which is forcing the reset pin to be at 1V not 3.3V.

It seems there is no problem with our hardware.

Thanks.

0 Kudos

1,179 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

The toggling of the reset pin is an expected behavior when the flash is not programmed, this is because on a blank device the core goes to 0x0000_0000 to fetch the initial stack pointer and 0x0000_0004 to fetch the reset vector, both of these will read 0xFFFF-FFFF which are illegal addresses causing the chip to reset and start all over again. When the chip is programmed you will find the reset pin oscillating behavior gone.

So far, the problem is the chip Flash could not be programmed again.

If you could try using Freescale provided example project and check those project image could be programmed or not?

The KV31 example software could be downloaded from here.

TWR-KV31F120M Sample Code Package


Have a great day,
Ma Hui

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

0 Kudos

1,179 Views
benelghali
Contributor II

Hi Ma Hui,

In our case the CPU is not flashed for the first time and the reset is not toggling it is fixed at 1Volt level.

The JLink Indicator is orange and is blinking.

Best regards.

Bilel

0 Kudos

1,178 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Could you provides the Flash configuration filed value?


Have a great day,
Ma Hui

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

0 Kudos

1,179 Views
benelghali
Contributor II

Hi Ma Hui,

this is the flash configuration which I founded in the   startup_MKV31F25612.s file:

__FlashConfig

      DCD 0xFFFFFFFF

      DCD 0xFFFFFFFF

      DCD 0xFFFFFFFF

      DCD 0xFFFFFFFE

__FlashConfig_End

It seems that the flash is not locked and the CPU is unsecured unsecured.

The problem is that when flashing The CPU could not be halted---------CPU could not be halted--------

0 Kudos

1,179 Views
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi,

Could you try to use the SWD connection mode? The CPU could not be halted is the chip could not coming out from reset state.

Thank you for the attention.

Best regards,

Ma Hui

0 Kudos