i.MX6 - DCD (Device Configuration Data) - sending character over UART

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

i.MX6 - DCD (Device Configuration Data) - sending character over UART

跳至解决方案
1,257 次查看
ericholmberg
Contributor III

I am trying to debug an intermittent boot issue from eMMC on an i.MX6D system that only affects some production hardware.  When the failure occurs, no USB serial downloader device is present and U-Boot has not had a chance to output any data over the UART.  I do not have access to JTAG on this unit, but I do have access to UART1 and USB to allow USB serial download of new U-Boot images with DCD data.

To determine if the failure is in U-Boot or a hardware issue, I was hoping to output some characters in the DCD data before starting U-Boot.  However, whenever the UART1 peripheral registers (0x0202_xxxx) are accessed (shown in bold further down), the processor stops responding.

Am I missing a clock setup or anything else?  The following DCD data is after the DDR clock setup.

// Enable all clocks (should just need CCM_CCGR5 for UART clock gate)
DATA 4, 0x020c4068, 0xffffffff
DATA 4, 0x020c406c, 0xffffffff
DATA 4, 0x020c4070, 0xffffffff
DATA 4, 0x020c4074, 0xffffffff
DATA 4, 0x020c4078, 0xffffffff
DATA 4, 0x020c407c, 0xffffffff /* CCM_CCGR5 */
DATA 4, 0x020c4080, 0xffffffff

DATA 4, 0x020c4024, 0x00000000 /* CCM_CSCDR1 UART_CLK_PODF=div/1 */

// Setup GPIO pins
DATA 4, 0x020e0650, 0x0001b0b1 /* IOMUX PAD: UART1_TX_DATA */
DATA 4, 0x020e0654, 0x0001b0b1 /* IOMUX PAD: UART1_RX_DATA */

DATA 4, 0x020e0280, 0x00000003 /* IOMUX: UART1_TX_DATA */
DATA 4, 0x020e0284, 0x00000003 /* IOMUX: UART1_RX_DATA */

// Configure UART
// TODO -- this is causing the boot to fail - maybe a clock isn't enabled?
DATA 4, 0x02020080, 0x00000000 /* UCR1: Disable UART and interrupts */

DATA 4, 0x02020084, 0x00000000 /* UCR2: SRST=1, reset uart */
DATA 4, 0x02020084, 0x00004027 /* UCR2: Ignore RTS, 8N1 */
DATA 4, 0x02020088, 0x00000784 /* UCR3: TODO */
DATA 4, 0x0202008c, 0x00008000 /* UCR4: TODO */
DATA 4, 0x02020090, 0x00000200 /* UFCR: RFDIV = /2 */
DATA 4, 0x020200a4, 0x0000000f /* UBIR: numerator */
DATA 4, 0x020200a8, 0x0000015b /* UBMR: denominator */
DATA 4, 0x02020080, 0x00000001 /* UCR1: Enable UART */

// Write 'D' to UART
DATA 4, 0x02020040, 0x00000044 /* UTXD: send D */

I had a look through uart1_led.7z example from https://community.nxp.com/t5/i-MX-Processors/Min-startup-code-for-imx6/m-p/278986/highlight/true#M31... but didn't find anything that would explain the issue.

0 项奖励
1 解答
1,251 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Eric 

 

list of modules allowed in dcd is described in Table 8-31. Valid DCD address ranges

i.MX 6Dual/6Quad Applications Processor Reference Manual

as alternative one can try plugin option described in sect.8.7 Plugin image

https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6sabresd/plugin.S?h=lf_v...

 

Best regards
igor

在原帖中查看解决方案

0 项奖励
2 回复数
1,252 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Eric 

 

list of modules allowed in dcd is described in Table 8-31. Valid DCD address ranges

i.MX 6Dual/6Quad Applications Processor Reference Manual

as alternative one can try plugin option described in sect.8.7 Plugin image

https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6sabresd/plugin.S?h=lf_v...

 

Best regards
igor

0 项奖励
1,241 次查看
ericholmberg
Contributor III

Thanks Igor, the DCD limitations explain why I can't configure the UART.  Will take a look at the plug-in approach.

0 项奖励