Hello,
I use c6701, I want to write some data into the flash, but only the low 16 bit data is wrote into the flash, and the high 16 bit data can't be wrote into the flash, the high 16 bit data is still FFFF. My flash is Am29LV160B, which is configured as 16 bit word mode, my flash write command is:
#define FLASH_BASE 0x01400000
void flash_write(unsigned int* pSRC, unsigned int* pDST, int size)
{
int i = 0, j = 0;
printf("flash burn start...\n");
for(i = 0; i < size / 4; i++)
{
j = 0;
*(unsigned int *)(FLASH_BASE+(0x555<<2)) = 0x00aa;
*(unsigned int *)(FLASH_BASE+(0x2aa<<2)) = 0x0055;
*(unsigned int *)(FLASH_BASE+(0x555<<2)) = 0x00a0;
*pDST = *pSRC;
delay(100);
while(*pDST != *pSRC)
{
*pDST = *pSRC;
delay(100);
j++;
if(j > 100)
{
printf("flash write error!\n");
}
}
pDST++;
pSRC++;
}
printf("flash burn over!\n");
}
Can anyone tell me why the high 16 bit data is FFFF?
Best Regards,
Si