Compiler/AWR1642: about Flash Earse with QSPI

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

In the sdk, I see the QSPIFlash_sectorEarse() function

   //write the write enable;

  //write the earse cmd;

  //write the address;

split the sector earse request to 2 parts(cmd and address)

the question is:

1. the CS go high after writing cmd,how can the address be writen into the flash? The flash datesheet says,the cmd is followed by address in a CS enable.

2. the frameLen parameter of QSPIFlash_chipEarse() function is 0, but in the QSPI_cfgWrite(), the SPI CMD_REG[11:0] is writen with (numWords-1),a unsigned int data 0 substract 1?

4 Replies

  • Hi,
    Let me check this at my end and get back to you.

    Regards,
    Jitendra

    ________________________________________________________________

    Please click the "This resolved my issue"   button on this post if it answers your question.

    ________________________________________________________________

  • Hi,

    1. As per one of the datasheet, it says command will be transferred first then address. (section 4.2  & 4.2.1) and SDK driver follows the same flow.

    2. Section 9 of this same datasheet explains about commands explains that for chip erase there is only 1 byte (instruction), so driver sends only command which doesn't follow any address in contrast to sectorErase/BlockErase. Go over the table 9.1 for these functionality to get more info about no. of bytes. In the SDK driver calling an QSPI_cfgWrite() with 0 means, it sends only cmd (instruction) whereas for SectorErase  it sends total 4 bytes.

    Are you facing any error/issue with current implementation of this QSPI driver.

    Regards,

    Jitendra

    ________________________________________________________________

    Please click the "This resolved my issue"   button on this post if it answers your question.

    ________________________________________________________________

  • In reply to Jitendra Gupta:

    I understand your mean,but i have checked the sdk code again, when the code calls the QSPIFlash_chipErase() function, it give a enter parameter 0:
    QSPIFlash_chipErase(0);
    then the QSPIFlash_chipErase call the QSPI_cfgWrite(0), in the QSPI_cfgWrite function,the '0 - 1'(numWords) give to the bit[11:0] of CMD_REG.
    in my opinion, call the QSPIFlash_chipErase,the parameter should be 1.
    How do you think?
  • In reply to user1607004:

    To erase whole chip no. of words doesn't matter, so giving '0-1' is don't care.

    May I know what are you planning to do with QSPI driver and is it causing any issue to you?

    Regards,
    Jitendra

    ________________________________________________________________

    Please click the "This resolved my issue"   button on this post if it answers your question.

    ________________________________________________________________