Reduce DDR init time for S32G boards

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

Reduce DDR init time for S32G boards

1,034 次查看
hittzt
Senior Contributor I

Hi

 

Recently, we find a issue that the DDR init time seems is longer than expected.

The main cost on RDB2 as following:

NOTICE: Reset status: Power-On Reset
ddr_init start at: 100 ms
execute_training start at: 102 ms
execute_training spend: 77 ms
post_train_setup start at: 181 ms
init_memory_ecc_scrubber start at: 217 ms
init_memory_ecc_scrubber 1 loop spend: 358 ms
init_memory_ecc_scrubber 2 loop spend: 0 ms
init_memory_ecc_scrubber end at: 587 ms
init_memory_ecc_scrubber spend: 373 ms
post_train_setup end at: 594 ms
post_train_setup spend: 416 ms
ddr_init end at: 600 ms
ddr_init spend: 502 ms
NOTICE: BL2: v2.5(release):bsp36.0-2.5-12-g836521a5d-dirty
NOTICE: BL2: Built : 17:42:10, Mar 23 2023
NOTICE: BL2: Booting BL31

 

the execute_training() cost about 77ms and init_memory_ecc_scrubber() cost about 373ms.

Is there any way to reduce the time cost to make it init faster?

 

Thanks,

Zhantao

0 项奖励
回复
5 回复数

968 次查看
MayanksPatel
NXP Employee
NXP Employee

Hi @hittzt,

I have initiated a thread with the internal team and I will get back to you on this.

Thank you for your patience.

 

Thanks,

Mayank S Patel

0 项奖励
回复

920 次查看
MayanksPatel
NXP Employee
NXP Employee

Hi @hittzt,

 

I tested the DDR initialization time on RDB2 using BSP37 and found the two most time-consuming phases were the execute_training() (about 73ms) and the init_memory_ecc_scrubber() (about 358ms).

For the execute_training(), it is necessary after a POR to set up a working environment for the DDR controller. For the init_memory_ecc_scrubber(), you can not invoke it if you do not enable the DRAM-related ECC feature. If the init_memory_ecc_scrubber() is skipped, you may save the corresponding executing time. However, in this case, you may need to manually initialize the DRAM before using it. (The init_memory_ecc_scrubber() can fill all DRAM with zero, so it is not recommend to skip this function.)

On the other hand, if you do not skip the init_memory_ecc_scrubber(), you can shrink the DRAM size to save a little time in executing the init_memory_ecc_scrubber(). For example, though the physical DRAM has a capacity of 4GB, you can just use part of DRAM as per the real requirement of your project. In this case, the time consumed by executing init_memory_ecc_scrubber() will be less.

BTW, no matter which approaches you will use, I would like to suggest configuring the corresponding parameters through the S32 DDR tool and using the tool to generate the source code, rather than modifying the source code manually.

 

Hope this helps.

 

Thanks,

Mayank S Patel

 
 
0 项奖励
回复

806 次查看
yanyan
Contributor I

Hi Mayank @MayanksPatel 

The submitter is my colleague and we have a S32G customer who would like to reduce the boot-up time of the system. Thank you so much for the detailed explanation. Would you please provide a maybe draft version of the source code changes for the refinement ideas you mentioned below? We're not familiar with the u-boot boot-up code and not very sure about what changes to carry out here.

Regards,

Yan

0 项奖励
回复

663 次查看
nxf92355
NXP Employee
NXP Employee

Hi @Yan


The DDR initialization source code are not directly modified. S32 DDR tool is used for that. we configure the parameters in the tool, and then generate the code. you needs to generate the code through S32 DDR Tool on your board. please refer Document AN12848 regarding S32G2/R45 DDR Initialization

 

Regards ,

Tushar

0 项奖励
回复

881 次查看
hittzt
Senior Contributor I

Hi Mayank S Patel,

 

Thanks for your reply.

I know what you mean, we will discuss your suggestion.

 

Thanks,

Zhantao

0 项奖励
回复