AnsweredAssumed Answered

Using JTAG for imx6 board bringup

Question asked by Philip Craig on Jun 20, 2013
Latest reply on Dec 18, 2013 by EgleTeam

I need to bringup a custom i.MX6Q board. The only available boot device is SPI-NOR, so I want to use JTAG to do the initial DDR configuration and to load u-boot.

 

I am using a J-Link with OpenOCD, and this is successfully talking to the JTAG DAP, including the AHP-AP and the APB-AP. I can read the on-chip ROM and RAM using either AP:

 

> dap apsel 0

ap 0 selected, identification register 0x44770001

> mdw 0     

0x00000000: e59ff01c

> mww 0x907000 0x12345678

> mdw 0x907000          

0x00907000: 12345678

>

> dap apsel 1

ap 1 selected, identification register 0x24770002

> mdw 0                 

0x00000000: e59ff01c

> mww 0x907000 0x87654321

> mdw 0x907000          

0x00907000: 87654321

 

However, there are problems accessing other registers, such as the MMDC:

 

> dap apsel 0

ap 0 selected, identification register 0x44770001

> mdw 0x21b0000

JTAG-DP STICKY ERROR

MEM_AP_CSW 0x2800052, MEM_AP_TAR 0x21b0000

JTAG-DP STICKY ERROR

MEM_AP_CSW 0x2800052, MEM_AP_TAR 0x21b0000

Block read error address 0x21b0000

in procedure 'mdw'

>

> dap apsel 1

ap 1 selected, identification register 0x24770002

> mdw 0x21b0000

0x021b0000: 03110000


The above shows that access works using the APB-AP, but fails using the AHB-AP.


According to the CoreSight Components TRM (DDI0314H), section 2.7.5, the CSW has Sprot = 0, SPIStatus = 1, DbgStatus = 1, which means "Secure transfer produced an error response".

 

What are the possible reasons for this error response? Is the processor booting up in some secure state that I need to disable before the AHB-AP is allowed access to the MMDC registers?

 

Note that I am currently unable to halt the processor immediately after reset, so it is running some of the boot ROM code already.

 

Outcomes