• AVR Freaks

Hot!Read status register Micron Serial NOR Flash Memory MT25QL128ABA

Author
Santiago
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2017/04/10 14:34:26
  • Location: 0
  • Status: offline
2017/10/05 09:57:33 (permalink)
0

Read status register Micron Serial NOR Flash Memory MT25QL128ABA

Read status register Micron Serial NOR Flash Memory MT25QL128ABA

Hi all,
 
I have a problem trying to read the status register of the flash mentioned. already read the device ID and it doesn´t look like is something wrong. I put the code below. I think i have to program some Unlock register but I don´t know which is and i have tried with all the registers of the datasheet without success. I'll appreciate any help.
#define READ_STATUS_REGISTER 0x05
#define SPI_CLOCK_ADS 1000000

void setup()
{
 MT25Q.frequency(SPI_CLOCK_ADS);
    MT25Q.format(8,1);
}

void getFlashID(unsigned int* pflashid)
{
 flashCS=0;
 MT25Q.write(0x9E);
    *pflashid = MT25Q.write(0x00);
    *pflashid <<= 8;
    *pflashid |= MT25Q.write(0x00);
    *pflashid <<= 8;
    *pflashid |= MT25Q.write(0x00);
    flashCS=1;
}

void RREG(char _command, unsigned int* pflashregister) //READ REGISTER Operations SVE
{
 flashCS=0;
    MT25Q.write(_command);
    *pflashregister = MT25Q.write(0x00);
    *pflashregister <<= 8;
    *pflashregister |= MT25Q.write(0x00);
    flashCS=1;
}

void initFLASH(struct DATA_GRAPHS* pstDataDisplay)
{

 setup();
 getFlashID(&pstDataDisplay->IDflash); //
 RREG(READ_STATUS_REGISTER, &pstDataDisplay->FlashRegister);
 
}

#1

2 Replies Related Threads

    rodims
    Super Member
    • Total Posts : 1478
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: offline
    Re: Read status register Micron Serial NOR Flash Memory MT25QL128ABA 2017/10/06 02:33:08 (permalink)
    0
    I have no own experience with the Micron MT25QL128, but from the datasheet I suspect the following issues:
     
    You did'nt specify your compiler nor PIC (which you also should always do), now its not clear whether you are using 32 bit or 16 bit.
    Your function getFlashID suggests that you are using 32 bit integers, otherwise it would not work.
    Thus you are forming a 32 bit mixed value from the Manufacturer ID (1 byte) and Device ID (2 byte), you probably are aware of that.
     
    As shown in your RREG function you are still handling the status register as 16 bit register, which I think it is NOT. It's just an 8 bit register. You are allowed to read it in a loop/continuously e.g. to check for a certain status, but it would usually not make much sense to OR it like you did. 
     
    Please read the data sheet, e.g. Table 23 READ Register operations and also see the Figure 30 below.
    You did not not describe how your results looks like. You always should explain what you expect and what you get.
    Otherwise this is all guessing, we don't know what you think is ok or wrong.
     
     
    #2
    yessine
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2018/10/03 09:24:10
    • Location: 0
    • Status: offline
    Re: Read status register Micron Serial NOR Flash Memory MT25QL128ABA 2018/10/04 09:09:13 (permalink)
    0
      I can't seem to program and read back a byte. my connection is correct as I am able to read the JEDEC-ID and the ID .   Any help would be greatly appreciated.
    I used the SST25PF040C to write some data in this flash memory , 
    I try to write on the status register to disable the protection for the memory , I try to write 0x00, 
    but the problem was when I want to read the value of the status , the result equal = 0x12 !!
    have someone any idea for this problem because i can't do any page program to this memory !
    #3
    Jump to:
    © 2019 APG vNext Commercial Version 4.5