
Dear Peter Pan,
In message 48abf2c20911251756k1ca3fe19p26db4a65b68bc366@mail.gmail.com you wrote:
I have checked this problem again, and find out the reason why sometimes we get a false value of the ID0 we read from norflash.
When we read IDs from norflash, we first write the read id command:
AMD_SEND_CMD(baseaddr, ACMD_READMODE); AMD_SEND_CMD((baseaddr | LATCH_OFFSET1), ACMD_UNLOCK1); AMD_SEND_CMD((baseaddr | LATCH_OFFSET2), ACMD_UNLOCK2); AMD_SEND_CMD((baseaddr | LATCH_OFFSET1), ACMD_ID);
then we read the IDs from norflash: pAddr = (unsigned short *)(baseaddr & 0xFFFFFF00); //Manufacture Id code0 = *(pAddr); //cycle 4: Addr: X00 data = 0x01 pAddr = (unsigned short *)(baseaddr + DEVICE_CODE1_OFFSET_2X16); code1 = *pAddr; //cycle 4: Addr: X01, X - don't care. data = 0x227E pAddr = (unsigned short *)(baseaddr + DEVICE_CODE2_OFFSET_2X16); code2 = *pAddr; //cycle 5: Addr: X0E data = 0x2223 pAddr = (unsigned short *)(baseaddr + DEVICE_CODE3_OFFSET_2X16); code3 = *(pAddr); //cycle 6: Addr: X0F data = 0x2201 AMD_SEND_CMD(baseaddr, ACMD_READMODE);
Umm.. could you please point out which specific part of code (i. e . file name and line numbers, or snippet of the real code from the source file) you are talking about here?
I have problems following you, as for example I can find no such thing as AMD_SEND_CMD or ACMD_READMODE or LATCH_OFFSET anywhere in the whole source tree ?
Best regards,
Wolfgang Denk