DDR TOOL hangs with iMX8MM board

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

DDR TOOL hangs with iMX8MM board

Jump to solution
5,741 Views
hongtao_li
Contributor III

Hi support,

I am developping a iMX8mm board, when I run the ddr tool V3.20, it hangs below.

My PMIC is PCA9450AHN, and the uart configuration is correct.

How can I debug it?

Thanks.

hongtao_li_0-1634869217337.png

 

0 Kudos
Reply
1 Solution
5,504 Views
hongtao_li
Contributor III

Hi everyone,

This issue is fixed, there is something wrong with our hardware design, which makes the CPU enter TEST MODE.

Many thanks to all your support.

Best wishes.

View solution in original post

0 Kudos
Reply
24 Replies
5,505 Views
hongtao_li
Contributor III

Hi everyone,

This issue is fixed, there is something wrong with our hardware design, which makes the CPU enter TEST MODE.

Many thanks to all your support.

Best wishes.

0 Kudos
Reply
5,090 Views
BiyongSUN
NXP Employee
NXP Employee

The ddr tool firmware default is for i.MX8MM evk lpddr4 + rohm pmic. 

If it is a customized board, at least need to configure the pmic pca. 

the guide is on the page. 

Have you done  that in the .ds file, as you said you have read the guide?

 

  

0 Kudos
Reply
5,081 Views
hongtao_li
Contributor III

As we use the PCA9450 PMIC, should we use different ddr firmware in the ddr tool? 

0 Kudos
Reply
5,082 Views
hongtao_li
Contributor III

We use the PCA9450 PMIC, and I also add the PMIC configuration in the .ds file as below.

##############step 0.5: configure I2C port IO pads according to your PCB design. #####
########### You can modify the following instructions to adapt to your board PMIC #######
memory set 0x30330214 32 0x00000010 #IOMUXC_SW_MUX_I2C1_SCL
memory set 0x30330218 32 0x00000010 #IOMUXC_SW_MUX_I2C1_SDA
memory set 0x3033047C 32 0x000000C6 #IOMUXC_SW_PAD_I2C1_SCL
memory set 0x30330480 32 0x000000C6 #IOMUXC_SW_PAD_I2C1_SDA

sysparam set pmic_cfg 0x004B
#bit[7:0] = PMIC addr,bit[15:8]=I2C Bus.
#Bus index from 0 ('0' = I2C1, '1' = I2C2, '2' = I2C3, '3' = I2C4)

sysparam set pmic_set 0x2F01
#bit[7:0] = Reg val, bit[15:8]=Reg addr.
#REG(0x2F) = 0x01

sysparam set pmic_set 0x0C02
#REG(0x0C) = 0x02

sysparam set pmic_set 0x171E
#REG(0x17) = 0x1E

sysparam set pmic_set 0x0C00
#REG(0x0C) = 0x00

sysparam set pmic_set 0x2F11
#REG(0x2F)=0x11

0 Kudos
Reply
5,045 Views
BiyongSUN
NXP Employee
NXP Employee

The script you have added seems exactly the same as the guide. 

You should change to " adapt to your board PMIC"

##############step 0.5: configure I2C port IO pads according to your PCB design. #####
########### You can modify the following instructions to adapt to your board PMIC #######

 

the guide is just example.

Tags (1)
0 Kudos
Reply
5,112 Views
Rita_Wang
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
5,111 Views
hongtao_li
Contributor III

Thanks your reply. Yes, I have read this guide, but it still doesn't work.   

0 Kudos
Reply
5,106 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Have you give the proper configuration for the ddr you are using?

0 Kudos
Reply
5,104 Views
hongtao_li
Contributor III

We use the same LPDDR4 configuration as the NXP EVK refrence board. hongtao_li_0-1635149509670.png

And I tried to use 1200M, 400M DDR frequency, but it still hangs as below. 

Downloading file 'bin\lpddr4_train1d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_train2d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_2d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_2d_v201709.bin' ..Done

Downloading IVT header...Done
Downloading file 'bin\m845s_ddr_stress_test.bin' ...Done

Download is complete
Waiting for the target board boot...

 

0 Kudos
Reply
5,099 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

You mean you use the same DDR as our reference board design?

0 Kudos
Reply
5,097 Views
hongtao_li
Contributor III

Yes, because I don't have the DDR tool source code, I don't know how to debug it.

0 Kudos
Reply
5,108 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

What's the problem you met? You can tell more details to us.

0 Kudos
Reply
5,102 Views
hongtao_li
Contributor III

The DDR tool always hangs as below.

Downloading file 'bin\lpddr4_train1d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_train2d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_2d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_2d_v201709.bin' ..Done

Downloading IVT header...Done
Downloading file 'bin\m845s_ddr_stress_test.bin' ...Done

Download is complete
Waiting for the target board boot...

0 Kudos
Reply
5,053 Views
BiyongSUN
NXP Employee
NXP Employee

Download is complete
Waiting for the target board boot...

above, it is only the ddr tool output itself. 

It says "Waiting for the target board boot...", because  it is waiting on the uart for the board output. 

In the tool guide document, there is two keys for ".ds":1. how to configure the uart 2. how to configure the pimc.   

It is very to simple to tell the different between the i.MX8MM evk and your board those two keys. then change the ".ds" as you said you have read the guide.

the pmic, you can follow the bsp u-boot spl power init code to set the PCA pmic in ".ds"

0 Kudos
Reply
4,938 Views
hongtao_li
Contributor III

Hi Biyong,

I doubt the ddr test  program don't run correctly, what's your suggestion to further debug? 

0 Kudos
Reply
4,937 Views
hongtao_li
Contributor III

After all the bin files are downloaded, which bin will run first? m845s_ddr_stress_test.bin?How to check whether it runs or not?

 

Downloading file 'bin\lpddr4_train1d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_train2d_string_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_1d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_imem_2d_v201709.bin' ..Done

Downloading file 'bin\lpddr4_dmem_2d_v201709.bin' ..Done

Downloading IVT header...Done
Downloading file 'bin\m845s_ddr_stress_test.bin' ...Done

Download is complete

0 Kudos
Reply
5,045 Views
hongtao_li
Contributor III

Thanks. First, I have changed the uart configuration according to our design, second, we use the same PMIC PCA9450 as the EVK board. You mean the example below is not for PCA9450?Then what PMIC is it for?

sysparam set pmic_cfg 0x004B
#bit[7:0] = PMIC addr,bit[15:8]=I2C Bus.
#Bus index from 0 ('0' = I2C1, '1' = I2C2, '2' = I2C3, '3' = I2C4)

sysparam set pmic_set 0x2F01
#bit[7:0] = Reg val, bit[15:8]=Reg addr.
#REG(0x2F) = 0x01

sysparam set pmic_set 0x0C02
#REG(0x0C) = 0x02

sysparam set pmic_set 0x171E
#REG(0x17) = 0x1E

sysparam set pmic_set 0x0C00
#REG(0x0C) = 0x00

sysparam set pmic_set 0x2F11
#REG(0x2F)=0x11

0 Kudos
Reply
5,032 Views
BiyongSUN
NXP Employee
NXP Employee
make sure the settings is the same as spl
 
ifdef CONFIG_POWER
#define I2C_PMIC    0
#ifdef CONFIG_POWER_PCA9450
int power_init_board(void)
{
    struct pmic *p;
    int ret;

    ret = power_pca9450b_init(I2C_PMIC);
    if (ret)
        printf("power init failed");
    p = pmic_get("PCA9450");
    pmic_probe(p);

    /* BUCKxOUT_DVS0/1 control BUCK123 output */
    pmic_reg_write(p, PCA9450_BUCK123_DVS, 0x29);

    /* Buck 1 DVS control through PMIC_STBY_REQ */
    pmic_reg_write(p, PCA9450_BUCK1CTRL, 0x59);

    /* Set DVS1 to 0.8v for suspend */
    pmic_reg_write(p, PCA9450_BUCK1OUT_DVS1, 0x10);

    /* increase VDD_DRAM to 0.95v for 3Ghz DDR */
    pmic_reg_write(p, PCA9450_BUCK3OUT_DVS0, 0x1C);

    /* VDD_DRAM needs off in suspend, set B1_ENMODE=10 (ON by PMIC_ON_REQ = H && PMIC_STBY_REQ = L) */
    pmic_reg_write(p, PCA9450_BUCK3CTRL, 0x4a);

    /* set VDD_SNVS_0V8 from default 0.85V */
    pmic_reg_write(p, PCA9450_LDO2CTRL, 0xC0);

    /* set WDOG_B_CFG to cold reset */
    pmic_reg_write(p, PCA9450_RESET_CTRL, 0xA1);

    return 0;
}
#else
int power_init_board(void)
{
    struct pmic *p;
0 Kudos
Reply
5,027 Views
hongtao_li
Contributor III

Below is the .ds setting I add for PCA9450 from the spl pmic setting.

sysparam set pmic_cfg 0x0025
#bit[7:0] = PMIC addr,bit[15:8]=I2C Bus.
#Bus index from 0 ('0' = I2C1, '1' = I2C2, '2' = I2C3, '3' = I2C4)

sysparam set pmic_set 0x0C29
#REG(0x0C) = 0x29

sysparam set pmic_set 0x1059
#REG(0x10) = 0x59

sysparam set pmic_set 0x1210
#REG(0x12) = 0x10

sysparam set pmic_set 0x171c
#REG(0x17) = 0x1c

sysparam set pmic_set 0x164a
#REG(0x16) = 0x4a

sysparam set pmic_set 0x22c0
#REG(0x22) = 0xc0

sysparam set pmic_set 0x08a1
#REG(0x08) = 0xa1

0 Kudos
Reply
5,025 Views
hongtao_li
Contributor III

I measured the I2C_SCL and I2C_SDA signals, there was no operation on them. I think the ddr tool program hasn't run to the setting for PMIC when hangs.

 

0 Kudos
Reply