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.

AWR1843: QSPIFlash_mmapRead is flaky

Part Number: AWR1843
Other Parts Discussed in Thread: AWR1642

Hello,

I'm using the AWR1843 with a Spansion flash chip.  This is the firmware I have running on the AWR1843 when reading out the flash:

QSPIFlash_configMmapRead(gMmwMssMCB.qspiFlashHandle, FLASH_QUAD_MODE, &errCode);
QSPIFlash_mmapRead(gMmwMssMCB.qspiFlashHandle, (uint32_t *)fromAddr, copyChunkLen / 8U, (uint32_t *)readDataArray);

I'm initializing the QSPI and QSPIFlash drivers prior to reading the flash with the above code.

When testing this code on the AWR1843, I found out that readDataArray contains just 0xcccccccc, which is not correct.  I then changed FLASH_QUAD_MODE to FLASH_AUTO_MODE, and reading the flash then works fine.  However, what is odd is that after I revert my change, i.e. change FLASH_AUTO_MODE back to FLASH_QUAD_MODE, reading the flash still works fine.  In fact, reading the flash still works after I power cycle the AWR1843 or reprogram it with the original binary.

Writing to the flash with QSPIFlash_mmapWrite works reliably.  QSPI_singleRead also works reliably.

I'm wondering why this issue is happening.  I performed the aforementioned procedure on four different AWR1843 chips, and they all behave the same way (reading the flash does not work initially but works after changing the read mode; after reverting the change, reading the flash continues to work).  The Spansion flash chips are all wired up to the AWR1843 to support quad mode.

In the driver code, I noticed that QSPIFlash_progQuadRead(QSPIFlashHandle) is only called if the mode is FLASH_AUTO_MODE.  If I pass in just FLASH_QUAD_MODE, then this function is not called when configuring the memory map read.  However, this doesn't explain why after reverting the change, reading the flash still works.

Thanks in advance!

  • Titan,

    Here are some notes with regard to external flash and the QSPI Driver.

    There is one bit “Quad enable” in serial falsh (such as Spansion) that needs to be enabled if QUAD read mode is desired. This bit is typically enabled in the bootloader.

    From the perspective of the SDK, if the application chooses a  specific read mode, namely QUAD, DUAL, or SINGLE, the QSPI flash driver will not look at the QUAD enable bit and read in the mode specified.

    However is “AUTO” mode, QSPI flash driver does take care of this bit. So in that case, the suggestion would be to enable this bit.

    Regards,

    Kyle

  • Hi Kyle,

    Thanks for your response.

    Is there a way to verify whether the bootloader is setting the quad enable bit?  How should I change the bootloader in order to set the quad read enable bit?

    Could I also ask why this was changed from AWR1642 to the new mmwave SDK?  In the previous version, QSPIFlash_configMmapRead would always call QSPIFlash_progQuadRead.

    Thanks,

    Titan

  • Titan,

    You cannot modify the bootloader. This is provided by TI and is not user programmable. You could potentially look at a secondary bootloader (SBL) as an alternative for setting up the QSPI.

    The primary bootloader is placed in ROM.

    Regards,

    Kyle