This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR1642: Bug in QSpi Flash driver for Macronix QFlash in mmwave_sdk_02_00_00_04

Part Number: AWR1642

Hi:  

   I'm using following code to confirm write data in QFlash in AWR1642 EVM, the flash part number is MX25V1635F:

QSPIFlash_writeEnable(hQspiFlash);
QSPIFlash_singleWrite(hQspiFlash, (uint32_t)uFlashAddr, 8, (uint8_t *)&sBootLoaderRecvObj.aMsgData[0]);
QSPIFlash_singleRead(hQspiFlash, (uint32_t)uFlashAddr, 8, (uint8_t *)&gReadDataArray[0]);
QSPIFlash_writeDisable(hQspiFlash);
uRetVal = memcmp(&sBootLoaderRecvObj.aMsgData[0],&gReadDataArray[0],8);

    The memcmp function always return false, meanning what I'v written to flash and what I read back from flash does not match. The QSPIFlash_singleRead() function always ignore the first byte.

  

   I've rebuilt the qspiflash driver lib by using gmake drv, replace the default qspiflash_device_spansion.c file with qspiflash_device_macronix.c in building.

   I go into ti\drivers\qspiflash\src\qspiflash_device_macronix.c, and find the driver use single read mode to read data. The MX25V1635F requires the logic as follows:

    There is an additional dummy read in  QSPIFlash_singleRead() function at line 776:

    QSPIFlashWriteByte(QSPIHandle, 0U, dataLen + 1U);

    If I annotate this line and build again, the Qspi flash works well.

I think this is a bug. Thank you!