我在flash_query()想進入CFI mode取得flash informations..以下是我flash_query()的code
- 代碼: 選擇全部
int flash_query(unsigned char *data)
{
volatile unsigned short *ROM;
......
ROM = (volatile unsigned short *)0x00000000; // flash_base = 0x00000000
ROM[0] = FLASH_Read_Query; // FLASH_Read_Query = 0x98
for (cnt = CNT; cnt > 0; cnt--) ;
for (i = 0; i < sizeof(struct FLASH_query); i++) {
printf("ROM[%d] = %x %p\n",i,*ROM,ROM);
*data++ = *ROM++;
}
ROM[0] = FLASH_Reset;
......
}
在for loop中printf出來的結果並非是CFI的informations..想請問各位高手是不是我哪邊有問題..謝謝^^