Jtag Connection to QorIQ p1021: [CCS last error: ELF is not in expected HALT mode ](CCSProtocolPlugin)

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

Jtag Connection to QorIQ p1021: [CCS last error: ELF is not in expected HALT mode ](CCSProtocolPlugin)

Jump to solution
2,901 Views
alfonsokame
Contributor III

Hello,

 

I'm having trouble to connect to my Bareboard based on the P1021 processor using CodeWarrior for PA Version: 10.1.2. I checked the JTAG pins and they seem to be OK. While executing the initialization script (p1021RDB_init_core.tcl), the debugger seems not be able to stop and halt the processor. It hangs while executing this script.

 

Any idea what is wrong here? The goal is to flash the bootloader to the SPI Flash.

 

Here is the Log

 

ccs_open

    ipaddr = 127.0.0.1

    port = 41475

    timeout = 15

    serverh = 0

    ccs_open; ccs_error = 0

ccs_get_connection_count

    serverh = 0

    count = 1

    ccs_get_connection_count; ccs_error = 0

ccs_available_connections

    serverh = 0

    count = 0

    ccs_available_connections; ccs_error = 0

ccs_available_connections

    serverh = 0

    count = 0

    ccs_available_connections; ccs_error = 0

ccs_config_cc

    serverh = 0

    config_string = utap:0

    ccs_config_cc; ccs_error = 0

...

...

 

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2032

    count = 2

    size = 4

    value: (size = 8)

         FFFFFFF8 00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 8

    count = 2

    size = 4

    value: (size = 8)

         00000000 00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 1

    count = 1

    size = 4

    value: (size = 4)

         00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_mem

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    addr = [space:0;size:4;address:0xffffff00]

    data: (size = 256)

         09000000 00000000 01000000 03000000

         00000000 03000000 00000000 00000000

         D4120000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

    ccs_read_mem; ccs_error = -2147418106; duration=2 ms  

    Error message: cannot start SAP transaction   

 

Executing Initialization File: C:\Users\InstAdmin\workspace1\fuziuzu-core0/CFG/P1021RDB_init_core.tcl

ccs_stop_core

    coreh = [serverh:0;cc_index:0;chain_pos:1]

radix x

cmdwin::eclipse::config hexprefix 0x

cmdwin::eclipse::config MemIdentifier v

cmdwin::eclipse::config MemWidth 32

cmdwin::eclipse::config MemAccess 32

cmdwin::eclipse::config MemSwap off

 

cmdwin::reg e500 Special Purpose Registers/PIR %d -np

    ccs_stop_core; ccs_error = 0

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2032

    count = 1

    size = 4

    value: (size = 4)

         FFFFFFFC

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 63

    count = 1

    value: (size = 1)

         0x00000000

    ccs_read_reg; ccs_error = 0; duration=1 ms

ccs_read_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 406

    count = 1

    value: (size = 1)

         0x00000000

    ccs_read_reg; ccs_error = 0; duration=0 ms

ccs_read_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 415

    count = 1

    value: (size = 1)

         0x00000000

    ccs_read_reg; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 286

    count = 1

    size = 4

    value: (size = 4)

         00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_mem

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    addr = [space:0;size:4;address:0xffffff00]

    data: (size = 256)

         09000000 00000000 01000000 03000000

         00000000 03000000 00000000 00000000

         DF120000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

    ccs_read_mem; ccs_error = -2147418106; duration=2 ms 

    Error message: cannot start SAP transaction 

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 285212672

    count = 1

    size = 4

cmdwin::stop

    value: (size = 4)

         66029B02

    ccs_read_register; ccs_error = -2147418106; duration=3 ms

    Error message: cannot start SAP transaction

 

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2032

    count = 2

    size = 4

    value: (size = 8)

         FFFFFFF8 00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 1

    count = 1

    size = 4

    value: (size = 4)

         00000000

    ccs_read_register; ccs_error = 0; duration=0 ms

thread break: Stopped, 0x0, 0x0, cpuPowerPCBig,  Connected (state, tid, pid, cpu, target)

 

cmdwin::reg e500 Special Purpose Registers/IVPR = 0xFFFF0000

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 63

    count = 1

    size = 4

    value: (size = 4)

         FFFF0000

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 63

    count = 1

    size = 4

    value: (size = 4)

         FFFF0000

    ccs_read_register; ccs_error = 0; duration=1 ms

 

cmdwin::reg e500 Special Purpose Registers/IVOR15 = 0x0000F000

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 415

    count = 1

    size = 4

    value: (size = 4)

         0000F000

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 415

    count = 1

    size = 4

    value: (size = 4)

         0000F000

    ccs_read_register; ccs_error = 0; duration=1 ms

 

cmdwin::reg e500 Special Purpose Registers/IVOR6 = 0x0000F700

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 406

    count = 1

    size = 4

    value: (size = 4)

         0000F700

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 406

    count = 1

    size = 4

    value: (size = 4)

         0000F700

    ccs_read_register; ccs_error = 0; duration=1 ms

 

cmdwin::reg e500 Special Purpose Registers/IAC1 = 0xfffffffc

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 312

    count = 1

    size = 4

    value: (size = 4)

         FFFFFFFC

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 312

    count = 1

    size = 4

    value: (size = 4)

         FFFFFFFC

    ccs_read_register; ccs_error = 0; duration=0 ms

 

cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x40800000

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 308

    count = 1

    size = 4

    value: (size = 4)

         40800000

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 308

    count = 1

    size = 4

    value: (size = 4)

         40800000

    ccs_read_register; ccs_error = 0; duration=1 ms

 

cmdwin::reg e500 Special Purpose Registers/DBCR1 = 0x00000000

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 309

    count = 1

    size = 4

    value: (size = 4)

         00000000

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 309

    count = 1

    size = 4

    value: (size = 4)

         00000000

    ccs_read_register; ccs_error = 0; duration=1 ms

 

cmdwin::reg Standard Special Purpose Registers/MSR = 0x02000200

ccs_write_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2034

    count = 1

    size = 4

    value: (size = 4)

         02000200

    ccs_write_register; ccs_error = 0; duration=1 ms

ccs_read_register

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2034

    count = 1

    size = 4

    value: (size = 4)

         02000200

    ccs_read_register; ccs_error = 0; duration=0 ms

cmdwin::eclipse::config runcontrolsync off

cmdwin::go

ccs_read_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 308

    count = 1

    value: (size = 1)

         0x40800000

    ccs_read_reg; ccs_error = 0; duration=1 ms

ccs_read_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 2034

    count = 1

    value: (size = 1)

         0x02000200

    ccs_read_reg; ccs_error = 0; duration=1 ms

ccs_write_reg

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    index = 308

    count = 1

    value: (size = 1)

         0x41800000

    ccs_write_reg; ccs_error = 0; duration=0 ms

ccs_out

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    ccs_io addr: (size = 4)

         0x00000000 0x00007531 0x00000000 0x00000000

    value: (size = 8)

         00000000 00000200

    ccs_out; ccs_error = 0; duration=0 ms

ccs_run_core

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    ccs_run_core; ccs_error = 0

cmdwin::wait 50

cmdwin::eclipse::config runcontrolsync on

cmdwin::stop

ccs_stop_core

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    ccs_stop_core; ccs_error = -2147418101 

    Error message: ELF is not in expected HALT mode 

 


Any idea??


Thanks a lot!

 

.

Labels (1)
0 Kudos
1 Solution
1,191 Views
hwrobel
NXP Employee
NXP Employee

Hi,

The typical reset vector is 0xffff_fffc. So if you see an access to 0xffff_ff00, I would assume that the debugger tries to read in a page of your boot flash to be able to show you the instructions correctly.

Any NOR flash would not lead to bad behavior as a boot chip select will always complete the transaction due to the GPCM being used.

Do not only check the cfg_ signals, BTW. The EC doc describes several signals with footnotes which are not standard cfg_, but are still quite relevant for proper operation.

If you can’t figure it out at all, then you could turn CCS logging and start a tech support request on the freescale web with the debugger log, your init scripts and maybe even schematic excerpts.

Heinz

View solution in original post

0 Kudos
5 Replies
1,191 Views
hwrobel
NXP Employee
NXP Employee

Your description seems to indicate that this is about your board design and not our RDB.

Go through the EC document and check every pin with a footnote thoroughly with a scope during reset. I mean it.

Most common cause for such things are missing pullups/pulldowns on pins listed in the EC with a footnote, or external logic overdriving pullups/downs during reset, thereby messing up the reset state of the chip.

If you have a BSDL scan tool, then this might help to verify pin states during reset. Note that via BSDL you will only see externally driven pin state. Internal resistors on otherwise open pins may not be visible.

Also, don't use an RDB script "as is" on a custom board. Very likely that won't work as expected. If in doubt, start with a script with minimalistic content just to see if you can "Connect" and stop at a reset vector.

Hope this helps,

Heinz

0 Kudos
1,191 Views
alfonsokame
Contributor III

Hello Heinz,

thanks for your reply!

Im still struggling in order to get the p1021 based bareboard run!

All I checked all the reset configuration signals (cfg_..). They all seem to match their Reset state that is described in the reference manual. While trying to connect to the BareBoard, I notice that one step before the init_core.tcl is being executed, A memory or IO is trying to be read and there is an error:

ccs_read_mem

    coreh = [serverh:0;cc_index:0;chain_pos:1]

    addr = [space:0;size:4;address:0xffffff00]

    data: (size = 256)

         09000000 00000000 01000000 03000000

         00000000 03000000 00000000 00000000

         D4120000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

         00000000 00000000 00000000 00000000

    ccs_read_mem; ccs_error = -2147418106; duration=2 ms   :smileyminus:

    Error message: cannot start SAP transaction    :smileyminus:



Which Moduleis he trying to read on the address ffffff00? Is it Memory? How to configure it?

Many Thanks for your reply!!

0 Kudos
1,192 Views
hwrobel
NXP Employee
NXP Employee

Hi,

The typical reset vector is 0xffff_fffc. So if you see an access to 0xffff_ff00, I would assume that the debugger tries to read in a page of your boot flash to be able to show you the instructions correctly.

Any NOR flash would not lead to bad behavior as a boot chip select will always complete the transaction due to the GPCM being used.

Do not only check the cfg_ signals, BTW. The EC doc describes several signals with footnotes which are not standard cfg_, but are still quite relevant for proper operation.

If you can’t figure it out at all, then you could turn CCS logging and start a tech support request on the freescale web with the debugger log, your init scripts and maybe even schematic excerpts.

Heinz

0 Kudos
1,191 Views
alfonsokame
Contributor III

Thanks very much Heinz,

We found the problem here, It was due to 2 too weak pull-up resistances on the spi-clock and the MOSI. It had an influence on the JTAG connection

Thanks very much for your support once again

0 Kudos
1,191 Views
esode
Contributor III

Hello Alfonsokame,

We are using P2010 chip with CW and CW-TAP on a custom board, which has 2 more chips on the JTAG. We have a very similar problem to yours, like "Error message: cannot start SAP transaction". However, we are not using any SPI protocol on the board. I wonder whether you are using SPI  then  it brings  out the problem you mentioned.  I want to get a clue whether SPI hardware connections on the board are related to the problem. 

I appreciate your comments.

Eser

0 Kudos