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!