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.

RTOS/AM5716: qspi_flash_writer fail to flash the image from SD card to S25FL256S

Part Number: AM5716

Tool/software: TI-RTOS

Dear expert,

I am trying to use qspi_flash_writer tool to flash the image file from SD card to S25FL256S (qspi nor flash), and got an issue.

I have made the SD card bootable and it includes three files, "boot", "app", "config". Then I use CCS to connect my board and run qspi_flash_writer.

After flashing the "boot" file to qspi flash, the tool reads the content from S25FL256S and check if it is the same as in DDR. But it reads all 0xcccccccc and check failed.

It is a custom board, and the project is TI_RTOS based. The SBL and app is correct, because it can be booted from SD card and works well.

When the qspi_flash_writer tool continuously prints data dismatch, I stop running  qspi_flash_writer.

The SBL is successfully written to S25FL256S, because when I remove the SD card and re-power on, the UART prints SBL is booted (app is not flashed to S25FL256S).

The qspi_flash_writer tool can write successfully, but reads failed. However, the RBL can read the SBL from S25FL256S successfully.

Could you give me some suggestion how to solve this problem.

Best regards.

  • What is the version of the SDK that you are using. Have you run basic diagnostics to ensure that the pinmux and clocking is correctly configured and you can perform read and writes correctly. Can you check if the same setup is working on the AM57xx IDK. Can you check to make sure that the version of the flash writer that you are using is performing an erase before performing a write operation. Can you check to confirm the offset in the config file is set to 0x80000 as expected.

    Did you rebuild the QSPI flash writer after updating the board library or are you using the default pre-built binary. Can you also indicate what is the size of the app that you are trying to flash ? Does the read back validate fail on the very first sector or does it fail in the middle of the range ? Can you please provide the log that you see after running the QSPI flash writer?

    Regards,
    Rahul
  • Hi, Rahul,

    Thank you for your reply. Here are more details.

    The SDK version is ti-processor-sdk-rtos-am57xx-evm-04.03.00.05-windows.

    I think the pinmux and clock is correctly configured. The flash_writer can write the "boot" to flash successfully and the timing waves of the certain pins are correct.

    I have checked the same setup on the idkAM571x EVM board and it worked well.

    I can make sure that the flash writer tool performs an erase befor writing. I have checked the code in sbl_qspi_writer.c.

    I have checked and confirmed the offset in the config file is right and I did no modification.

    I have built the board_lib and then rebuilt the QSPI flash writer. The size of sbl and app is in normal range and they can be booted from SD card.

    The read back data is all 0xcccccccc, so the data verification is failed from the first data.

    Here is the log when running the QSPI flash writer.

    The "boot" file is successfully written to flash. I removed the SD card and re-power on, the RBL can read the SBL from QSPI flash and the UART can print.

    So the question is that I can write but can not read. What can I do now?

    Best regards.

  • Hi, Rahul,

    This is the QSPI registers' value after reading.

    After reading the value of data_reg is 0xcccccccc. But the clock signal on the clk pin is not generated while reading. I do not know what is wrong with the QSPI module.

    Looking forward to your reply.

    Best regards.

  • Hi, Rahul,

    I have solved this issue.

    It seems like a problem of PCB routing.

    After I setting the mode to single line RX, it works well.