MPC5606S: Can not enter background mode

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

MPC5606S: Can not enter background mode

1,496 Views
eddiewu
Contributor I

Hi, 

When I do flash program for MPC5606S with CW v10.7, the following error show.

It seems that the GDI cannot connect with the MCU.

Does anybody can give some help?

 

Please see attachments for detail:

CodeWarrior GDI protocol log ===
GDI DLL: C:\Freescale\CW MCU v10.7\MCU\bin\Plugins\Debugger\protocols\..\..\support\EPPC\gdi\eppc_pne_gdi.dll
CPU: MPC5606S
GDI: DiGdiOpen()
......
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : FLASHALG, Value : , R) => DI_ERR_NONFATAL
INF: P&E Interface detected - Flash Version 6.15
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : DEFAULT, Entry : MODE1, Value : Unknown Processor, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : REGISTERMASK, Value : *.reg, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : RESETADDR, Value : -1007091700, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : WATCHADDR, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : FLASHALG, Value : , R) => DI_ERR_NONFATAL
ERR: Debugger retrying force to background mode.
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : DEFAULT, Entry : MODE1, Value : Unknown Processor, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : REGISTERMASK, Value : *.reg, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : RESETADDR, Value : -1007091700, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : WATCHADDR, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : FLASHALG, Value : , R) => DI_ERR_NONFATAL
ERR: Can not enter background mode  .
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : DEFAULT, Entry : MODE1, Value : Unknown Processor, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : REGISTERMASK, Value : *.reg, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : RESETADDR, Value : -1007091700, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : WATCHADDR, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : Unknown Processor, Entry : FLASHALG, Value : , R) => DI_ERR_NONFATAL
INF: Unable to initialize PEDebug.
GDI: => DI_ERR_NONFATAL
GDI: The Debugger can not connect to the P&E device
GDI: DiGdiClose()
GDI: => DI_OK

Original Attachment has been moved to: DemoProject.zip

Original Attachment has been moved to: 2.txt.zip

Original Attachment has been moved to: 1.txt.zip

0 Kudos
3 Replies

1,119 Views
martin_kovar
NXP Employee
NXP Employee

Hello,

I need to clarify some points:

1) Which debug probe you use?

2) Do you use NXP evaluation board or your own design?

3) Have you ever been able to connect to the microcontroller? If yes, what did you load into the microcontroller?

4) Did you try to connect to Flash target or RAM target or both?

5) Have you correctly installed and updated PE Micro drivers?

6) Which operating system you use?

7) What is the microcontroller mask?

Could you please send me some simple project? I would like to check debugger settings.

Regards,

Martin

0 Kudos

1,119 Views
maddyv
Contributor I

My Environment is MPC567XEVBMB + MPC5674ADAT516 + SPC5674FMVY3+ PE micro multilink universal + cw 5.9.0 Eval version. Unable to debug. Getting 'Cannot Enter Background Mode" error message.

However, Trace32 provides more details.

debug port fail
JTAGID=0x1827401D
SYStem.Up error: received invalid OSR (0x000)
- does the target assert JCOMP while RESET is asserted?
- is the device censored?
error: received invalid OSR while core running (0x000)

0 Kudos

1,119 Views
eddiewu
Contributor I

Hi Martin,

Thanks for your help.

My environment is as:

VisualBox: Win7 64bit OS + CodeWarrior v10.7 + PE micro Multilink Universal

And use my own design board.

Previously I can do flash program many times with this board. But one time, the flash program failed.

I guess it's not the code reason that I downloaded. It seems like the MCU can not be controlled by the shell scripts.

My MCU is SPC5606SVL06.

The error Console log is:

        fl::target -lc "LC for Simple Flash"
        fl::target -b 0x40000000 0xc000
        fl::target -v off -l off
        cmdwin::fl::device -d "MPC5606S_SHADOW_FLASH_VLE" -o "16Kx32x1" -a 0x200000 0x203fff
       cmdwin::fl::protect all off
        Beginning Operation ...   
       -------------------------
        Performing target initialization ...   
       Error:  Connect Failed.
       Can't connect. The Debugger can not connect to the P&E device(EPPC GDI Protocol Adapter)
       Error: Connect Failed.

I compared with the correct Console log:

        fl::target -lc "LC for Simple Flash"
        fl::target -b 0x40000000 0xc000
        fl::target -v off -l off
        cmdwin::fl::device -d "MPC5606S_SHADOW_FLASH_VLE" -o "16Kx32x1" -a 0x200000 0x203fff
        cmdwin::fl::protect all off
         Beginning Operation ...   
        -------------------------
        Performing target initialization ...   
        Reading SSCM.STATUS ...
        MCU in single chip mode
        Set interrupt vector base address at 0x40000000

        ........

It seems that the shell script "MPC5606S_VLE.tcl" is not be executed normally. (Please see the attachment DemoPorject.zip)

Then I open this file, find that the first proc "mpc560xx_init()" may not be executed normally.

    proc mpc560xx_init {} {

        global   GPR_GROUP
       set SPR_GROUP "e200z0h Special Purpose Registers/"
   
       # force reset the device
       reset

       # Explicitly stop the core
       stop
       # check single chip mode, SSCM.STATUS.BMODE == 0b011
       set SSCM_STATUS 0x0
       puts "Reading SSCM.STATUS ..."
       catch {set SSCM_STATUS [mem 0xC3FD8000 -np]}
       set r [expr $SSCM_STATUS & 0xE00000]
       ......
Because the log "Reading SSCM.STATUS..." didn't be print in the error log, I guess the previous command reset or stop is not be executed normally.

When I try to start flash programmer, the MCU is reset because the LCD is off. So I guess the command stop may not be executed normally.

So, I want to know which condition would cause the MCU can not be stop via command?

Now the firmware that I previously downloaded into this issue board MCU can run normally, the LCD/CAN/GPIO/PWM/TIMER.... all the functions can work normally.

The only problem is that this issue board MCU can not be programmed via flash programmer again.

Because I can program other board with this CW project and PE micro environment, I guess the error must come from the issue board MCU.

Does some debug related registers in this MCU be changed unexpectedly ?  or the debug circuit in this MCU is damaged? I have no idea.

Thanks & Best regards,
Eddie Wu
0 Kudos