Development environment: IAR8.32.1
Test routine: SDK_2.2_TWR-K81F150M\boards\twrk81f150m\driver_examples\qspi\polling_transfer
The polling_transfer routine is to write the data of a sector from the flash base address FSL_FEATURE_QSPI_AMBA_BASE (0x68000000U), and then read the data from this address, compare, and judge whether the read data is equal to the written data.
Problem: The routine code has not been modified. After the code is downloaded, the test found that the read data and the written data are not equal, and then IAR SWD debugging found that when writing or erasing flash data, the first two bytes of each flash page are cc cc, theoretically all ff after erasing flash, cc shouldn't appear. After writing the data, the cc in the flash still exists, resulting in the wrong data being read.
Guess: I guess there may be a problem with the flash configuration. One is the LUT table and the other is the qspi_flash_config_t structure. Since we have not used QSPI before, we don't know how to modify it.