Hi Apurva,
We have a similiar problem with the Flash Command Sequences.
We're using a MCF53017 Freescale Microprocessor and a S29WS128P NOR Flash Spansion.
For debug, we're using Code Warrior 7.2 to program/access the flash.
The system desing works succesfully with the CFI Command, but it doesn't work with other command sequences like Autoselect, Program, Erase, ....
And example with commands and results obtained are following:
=============================================================
/* Write CFI Entry command */
*(baseaddress + 0x555) = (unsigned short)0x98;
/* Get CFI Query */
query_1 = *(baseaddress + 0x10);
query_2 = *(baseaddress + 0x11);
query_3 = *(baseaddress + 0x12);
/* Write CFI Exit command */
*(baseaddress) = (unsigned short)0xF0;
/* setup for Get Manufactured ID and Device ID */
*(baseaddress + 0x555) = (unsigned short)0xAA;
*(baseaddress + 0x2AA) = (unsigned short)0x55; *(baseaddress + 0x555) = (unsigned short)0x90;
/* get id */
mf_id = *(baseaddress);
part_id = *(baseaddress + 1);
=============================================================
RESULTS:
Variables Value
query_1 0x0051 --> 'Q' ok
query_2 0x0052 --> 'R' ok
query_3 0x0059 --> 'Y' ok
mf_id 0x0011 --> Bad Result. Correct it should be 0x0001
part_id 0xEA00 --> Bad Result. Correct it should be 0x227E
=============================================================
I've attached an image of a screenshot of CodeWarrior IDE with the result (CodeWarrior Screen1.JPG)
I don't understand why the device entry into CFI Query Mode correctly but it doesn't works with others command sequence.
Could you resolve this problem?
Thank you in advance,
Francisco José Arroyo