The bare metal program got stuck at some point.

Hi team,

         Hi, In our project we are using Agilex 7 soc. We have an Apollo Agilex board. I am using the Uboot spl code.  I am just adding a small piece of code, to write and read the DDR memory. The code is given below. The issue is when I run the "for" loop code it runs for a few seconds after the code stops running.

for(i=0;i<0xFFE0000;i++){

*base = i;

__socfpga_udelay(1000000);

}

ptr = ((u64 *)0x0000000000000000);

j=0;

for(i=0;i<0xFFE0000;i++){

*ptr = i;

if(*ptr!=i){

printf("ddr failed at %p\n",ptr);

}

if(j==0x100000){

printf("ddr write and read success at %p\n",ptr);

j=0;

}

ptr++;

}

The above code runs correctly, the difference between the two codes is printf.

Thanks,

Regards,

Veerappan P.