Problem on programming interface MKE04

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

Problem on programming interface MKE04

Jump to solution
1,815 Views
lucaag
Contributor III

Hello to everybody, and many thanks to whom could give me an advice.

 

In the last months, I've been working with few Kinetis processor without any problems.

I'm now debugging a new board, which is using the MKE04Z128VLH (64 pin LQFP), and I'm facing a problem with the serial debug interface. I was trying to program the device with the USB PE micro and CodeWarrior, but I've got some errors.

 

So checking the signals on the SWD, I discovered that the reset pin is not stable although there's notting connected to it. In particular it's not stable at VCC (5V), but it seems that the microcontroller is lowering it close to 2V in average, having an alternate behaviour. So I'm not sure to have connected it to the right pin, and still wondering what is wrong.

 

To be clear, I've connected the pod (2x5x1.27mm) pins in this way:

 

PIN ON PODPin on Micro/ BoardPIN ON PODPin on Micro/Board
1VCC (+5V)2SWD_IO (pin 64 on micro)
3GND4SWD_CLK (pin 62 on micro)
5GND6--
7--8--
9--10RESET_b (pin 63)

 

What I feel it's really strange is that I see the reset pin at an intermediate value, which is not VCC neither GND.

 

Can somebody help me?

 

Thank you in advance

 

Luca

Labels (1)
0 Kudos
Reply
1 Solution
1,399 Views
lucaag
Contributor III

SOLVED

Hello and many thanks to kind people who answered to me.

It was a problem on the board: I've used the NMI pin as output as its alternate function capability, but being tied down it was blocking the CPU programming.

Thanks,

LUCA

View solution in original post

0 Kudos
Reply
7 Replies
1,400 Views
lucaag
Contributor III

SOLVED

Hello and many thanks to kind people who answered to me.

It was a problem on the board: I've used the NMI pin as output as its alternate function capability, but being tied down it was blocking the CPU programming.

Thanks,

LUCA

0 Kudos
Reply
1,399 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Luca,

I have reviewed your schematics, I see that you connect the Reset pin to a connector directly. I suggest you use a RC circuit for the Reset pin, in other words, you can use a RC circuit, connect a 10K ohm and 0.1uF capacitor, while connect the VDD(+5V) to resistor , connect GND to capacitor. You can connect the middle node of the RC circuit to Reset pin, and connect the Reset pin to pin 10 of SWD connector. I suggest you connect a hardware button to Reset pin so that you can reset the chip by pressing button.

Hope it can help you.

BR

Xiangjun Rong

1,399 Views
lucaag
Contributor III

Thank you very much Xiangju.

I've double checked and it seems that the connections to the SWD

interface are according the specs. The capacitor instead is on the board

in fact, not on the same sheet I've posted.

Unfortunately I didn't provide a push button to reset the board.

Anyway I'm not sure it's an hardware problem. Or there's some problem on

the lines to the uC, which are in reality quite short and should not

have any impact (the only thing I see is that the clock pin has some

oscillation, see the attached picture).

The problem is that after the attempt of programming, it stops giving

the error message attached (Eclipse.txt).

I guess it should be something wrong in the configurations.

Thank you for any advice

Luca

Il 23/05/2016 09:02, xiangjun.rong ha scritto:

>

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

>

Problem on programming interface MKE04

reply from xiangjun.rong

<https://community.freescale.com/people/xiangjun.rong?et=watches.email.thread>

in /Kinetis Design Studio/ - View the full discussion

<https://community.freescale.com/message/652847?et=watches.email.thread#comment-652847>

>

0 Kudos
Reply
1,399 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I have checked the log, it seems that the CW tools can read the watchdog registers successfully, but it can not program on-chip flash.

If you suspect that the CW configuration leads to the issue, I suggest you compile/download an example the CW tools provides.

Pls download the example from directory:

C:\Freescale\CW MCU v10.6\MCU\CodeWarrior_Examples\Kinetis_Examples\KE\build\cw\ke04

BTW, can you change another board and have a try?

BR

Xiangjun Rong

1,399 Views
lucaag
Contributor III

Thank you very much Xiangjun.

I've tested one example (GPIO_demo), but I've got the same result:

/INF: Loading programming algorithm ... //

//INF: Done.//

//INF: CMD>EM//

//INF: Erasing.//

//INF: Module has been erased.//

//INF: Reloading programming algorithm ... //

//INF: done.//

//INF: CMD>PM//

//INF: Programming.//

//INF: Processing Object File Data ... //

//INF: Error during programming.//

//ERR: Error Programming flash of device//

//ERR: Error occured during Flash programming.//

//INF: WARNING - NO RESET SCRIPT FILE HAS BEEN CONFIGURED TO RUN!!!//

//INF: TO MODIFY THE RESET SCRIPT SETTINGS, USE THE FOLLOWING MENU OPTION://

//INF: CONFIGURATION -> AUTOMATED SCRIPT OPTIONS//

/

It seems the programmer doesn't succed in connecting to the

microcontroller, although I see the signals movin on the pins of the device.

If any other advice, I will appreciate.

Regards

Luca

Il 24/05/2016 04:46, xiangjun.rong ha scritto:

>

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

>

Problem on programming interface MKE04

reply from xiangjun.rong

<https://community.freescale.com/people/xiangjun.rong?et=watches.email.thread>

in /Kinetis Design Studio/ - View the full discussion

<https://community.freescale.com/message/653322?et=watches.email.thread#comment-653322>

>

0 Kudos
Reply
1,399 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

It seems that it is a Reset issue, because you have RC circuit, if you unplug the JTAG female connector, and test the Reset pin, is it 5V?

BR

XiangJun Rong

1,399 Views
lucaag
Contributor III

Hello Xiangjun,

yes, probably it's a reset issue.

As soon as I connect the programmer, the reset pin remains table. If I

unplug the programmer the reset pin has a strange behaviour (as per the

attached picture). In fact I was wondering if this behaviour was or not

correct, since it's supposed the reset pin should be an input, when the

device is not yet programmed.

In stead, I see a "50Khz square wave".

What is also strange, is that once I try to program the device, the

reset remains stable to 5V up to the next power switching on.

Thank you in advance for any advice

Luca

Il 24/05/2016 10:24, xiangjun.rong ha scritto:

>

NXP Community

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>

>

Problem on programming interface MKE04

reply from xiangjun.rong

<https://community.freescale.com/people/xiangjun.rong?et=watches.email.thread>

in /Kinetis Design Studio/ - View the full discussion

<https://community.freescale.com/message/653373?et=watches.email.thread#comment-653373>

>

0 Kudos
Reply