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.

Linux/AM5728: QSPI flash reading, writing and erasing

Part Number: AM5728

Tool/software: Linux

hai,

i am using winbond W25Q64FW nor flash with am5728, is it possible to flash this memory using user space application. That is, is it possible write an user space application which takes a file as input and flash this to the address mentioned by the user.

If it is possible, i want to know, if any other file like an user application(test.out) is required to be flashed into nor flash and then make it to run by using the address location of file in nor flash.

thanks & regards,

Venkat R.

  • Part Number: AM5728

    Tool/software: Linux

    hi,

    i am working with am5728 with spi nor flash. I flashed three binary files into NOR flash at different address locations corresponding to size of files using uboot commands(NOR flash has no file systems or partitions). Among the three applications, one is an application binary that should use the other two binary files as an input to append these two files. All i did is, just flashed the NOR flash with binaries but, I need help in knowing how these can be used and  append two of the files using application binary.

    I think there should a process on how to do it. Please help me with issue.

    Thanks & Regards,

    Venkat R.

  • Venkat,

    Please see my response on this thread:

    e2e.ti.com/.../2839929

    Specifically, I showed how to use mtd-utils to erase the flash and then I used dd to write to it. The partitions themselves are defined in your dts file.

    Best regards,
    Brad
  • Hi Venkat,

    Please refer to the following TI document.

    Regards,

    Krunal

  • thanks but is it possible to change the partitions while booting i.e., i want the system to boot from another partition which has a copy of bootloader as a backup.
  • When you start talking boot partitions, this becomes a boot ROM discussion. Please refer to Section 33.3.7.5 SPI/QSPI Flash Devices of the Technical Reference Manual. Here's a closely related excerpt:

    "Up to four redundant images can be stored on SPI/QSPI flash. The offset between them is set in
    sysboot[7:6] as described in Table 33-8. If not using the redundant SBL feature, the offset set in
    sysboot[7:6] is a don't care. A booting image is considered to be present, when the first 4 bytes word is
    not equal to 0000 0000h or FFFF FFFFh."

    So a couple things of note here are:

    1. The partition size is set by the sysboot[7:6] pins in this case, i.e. you would need to make your dts correspond with how the boot pins are configured.

    2. The criteria for the boot ROM to attempt booting from a given section is extremely simple, i.e. it checks the first 32-bit word to see if it is anything besides 0x00000000 or 0xFFFFFFFF. If that is true, then it will attempt to load that section into RAM and branch to it.