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!
Solved! Go to Solution.
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
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
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
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
Hi PetrS
Thank you for your answer. Could you please tell me how to reduce the speed of JTAG?
Hi,
it is set in connection manager that appears before downloading
BR, Petr
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
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
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
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