Unable to embed program into MPC5606B using Codewire V2.10

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

Unable to embed program into MPC5606B using Codewire V2.10

Jump to solution
1,440 Views
jiachunyu
Contributor I

When we use Codewire V2.10 for embedded development, we are unable to embed the program into MPC5606B, and the error message given is:Error : Error in ONCE status register during instruction execution
REM>; Automatically generated script file for PPCNEXUS flash programming
CMD>CM E:\software\codewarrior2.1\pemicro\Algorithms\Freescale_MPC5606B_1x32x256k_CFlash.PCP 0000000
Initializing. Initialized.
;version 1.13, 03/30/2017, Copyright P&E Microcomputer Systems, www.pemicro.com [5606b_1024k_cflash]
device NXP,MPC5606B, 1x32x256k, desc=CFlash
;begin_cs device=$00000000, length=$00100000, ram=$40000000
Loading programing algorithm ... Error loading .PCP file : E:\software\codewarior2.1\pemicro\Algoritms\Freescale_MPC5606B_1x32x256k_CFlash.pcp at address 4000011E
ERROR 14 during script!
Our computer system is Win11 and we use P&E Micro Multilink as the downloader. Could you please help us solve the following issues we have encountered? Thank you!

0 Kudos
Reply
1 Solution
1,424 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

There are significant differences between SPC5606BF and SPC5606BK and they are covered in the following appnote:

https://www.nxp.com/docs/en/application-note/AN4477.pdf

Note that

SPC5606BF = mask 1M03Y
SPC5606BK = mask 01N3E

Also it may be because of CW10 is not updated and it is also related to PeMicro drivers included in it.

PeMicro has a tool called PROGPPCNEXUS. It is flash programmer and with this you can do all these operations. In the attached screenshot you can see how to upload MCU memory content into s19 file (S-record) and with this tool you can also erase the chip and program it.

PeMicro offers their own debugger (called 64K Starter Edition of P&E's PKGPPCNEXUS. Trial version is free (it is needed to be registered and logged in), programmer is part of the package:
http://www.pemicro.com/downloads/download_file.cfm?download_id=194

For further detail I would recommend to contact PeMicro support:
https://www.pemicro.com/support/index.cfm

 

View solution in original post

0 Kudos
Reply
11 Replies
1,318 Views
jiachunyu
Contributor I

Hi davidtosenovjan

I have added the code you provided to our program, but it still hasn't solved the problem we encountered. In order to solve the problem we encountered, we contacted the engineers of P&Emicro again. Based on our program, the engineers of P&Emicro suggested that we turn off the external watchdog. Therefore, I would like to inquire about how we should turn off the external watchdog of MPC5606B. Could you please help us answer this question? Thank you!

Best Regards

0 Kudos
Reply
1,425 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

There are significant differences between SPC5606BF and SPC5606BK and they are covered in the following appnote:

https://www.nxp.com/docs/en/application-note/AN4477.pdf

Note that

SPC5606BF = mask 1M03Y
SPC5606BK = mask 01N3E

Also it may be because of CW10 is not updated and it is also related to PeMicro drivers included in it.

PeMicro has a tool called PROGPPCNEXUS. It is flash programmer and with this you can do all these operations. In the attached screenshot you can see how to upload MCU memory content into s19 file (S-record) and with this tool you can also erase the chip and program it.

PeMicro offers their own debugger (called 64K Starter Edition of P&E's PKGPPCNEXUS. Trial version is free (it is needed to be registered and logged in), programmer is part of the package:
http://www.pemicro.com/downloads/download_file.cfm?download_id=194

For further detail I would recommend to contact PeMicro support:
https://www.pemicro.com/support/index.cfm

 

0 Kudos
Reply
1,317 Views
jiachunyu
Contributor I
Hi davidtosenovjan
I have added the code you provided to our program, but it still hasn't solved the problem we encountered. In order to solve the problem we encountered, we contacted the engineers of P&Emicro again. Based on our program, the engineers of P&Emicro suggested that we turn off the external watchdog. Therefore, I would like to inquire about how we should turn off the external watchdog of MPC5606B. Could you please help us answer this question? Thank you!
Best Regards
0 Kudos
Reply
1,297 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

script can disable MCU's internal watchdog, as shown above, but not any external one. Do you have any external watchdog on your system that can reset MCU externally?
For programming error, have you tried to decrease JTAG speed as well?

BR, Petr

0 Kudos
Reply
1,241 Views
jiachunyu
Contributor I

Hi PetrS

Thank you for your answer. Could you please tell me how to reduce the speed of JTAG?

0 Kudos
Reply
1,233 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

it is set in connection manager that appears before downloading

PetrS_0-1709031283580.png

 

BR, Petr

0 Kudos
Reply
1,221 Views
jiachunyu
Contributor I

Hi PetrS

Thank you very much for your answer. Based on the method you provided, I have tried it on my software debugging interface. But when I connected to my debugger, "BDM Debug **bleep** Freq: BDM_SPEED="Unable to select and adjust speed. Is this a normal phenomenon? Due to my lack of permission to upload screenshots, I am unable to show you my debugging interface. Thank you!

Best Regards

 

0 Kudos
Reply
1,421 Views
jiachunyu
Contributor I

Hi davidtosenovjan

    While consulting NXP, I also consulted P&Emicro about the same issue. P&E's technical support engineer told me that the error message may have been caused by not turning off the watchdog. But since I am not very familiar with the MPC5606B chip, I don't know how to turn off the watchdog function of MPC5606B. Can you guide me on how to turn off the watchdog function of MPC5606B? 

Thank you very much!

Best Regards

0 Kudos
Reply
1,087 Views
stanish
NXP Employee
NXP Employee

Hi,

Could you please clarify if you are you targeting MPC5606B or MPC5606BK as already asked by David?

MPC5606BK requires a different programming algorithm (.pcp file)

 

Stan

 

 

0 Kudos
Reply
1,062 Views
jiachunyu
Contributor I
Hello Stanish
Here is some information about the devices I am using:
Microcontroller: SPC5606BMLU6
Codewheel version: 2.10
P&EMicro version: cw_progpcnexus Version 9.00
P&EMicro Debugger Model: USB-ML-UNIVERSAL-FX
I consulted with the engineer at P&EMicro about the same issue before, and his solution was to ask me to turn off the external watchdog. Therefore, I am currently trying to turn off the external watchdog in my circuit board, but due to a damage to my power management chip (TLE9262QX), I am unable to verify whether turning off the external watchdog can solve the problem of not being able to embed the program. The good news is that our newly purchased TLE9262QX has arrived today. I will remove the damaged TLE9262QX today and replace it with a new chip to observe if it can be used.
0 Kudos
Reply
1,416 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

In the C code following function may be used:

static void DisableWatchdog(void)
{
SWT.SR.R = 0x0000c520; /* Write keys to clear soft lock bit */
SWT.SR.R = 0x0000d928;
SWT.CR.R = 0x8000010A; /* Clear watchdog enable (WEN) */

/* e200 Core Watchdog Timer */
asm
{
li r3, 0
mtspr 340, r3
}
}

In the PeMicro script the same is encoded as follows:

REM Disable Watchdog Timers
mm.l $fff38010 $0000C520
mm.l $fff38010 $0000D928
mm.l $fff38000 $8000010A
REM e200 Core Watchdog Timer (all MPC55xx and MPC56xx devices)
spr 340t 0
0 Kudos
Reply