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.

AM5728: SPI Flash access -- Read works only 4KB data

Part Number: AM5728

Hello All,

AM5728 processor Qspi interface is connected to Qspi flash. 

But it is configured to work in legacy mode. 

In Linux Kernel, tried the below things: 

1. Sector Erase is working

2. Page write is working - Tested with 8KB file

3. Memory read works only first 4KB data and other locations, it is giving garbage values.

For example, written the 8KB file. 

1. Read first 4KB as start address 

2. Read 2nd 4KB as start address = (start address + 4KB)

The problem is: Can not read 8KB file in single time. Need to read 2 times as mentioned above.

To read the 8KB data, any changes are required in device tree or drivers?

1. For chip select, any timing limitation is there, i.e. for some time only it can be low. 

Here, Spi clock is around 39MHz. In this, to read the 4KB data, it took 4.55ms time.  

2. Here, chip select 2 is used and Mode 0 is used. For Mode 0, in datasheet, it is mentioned that need 

to configure Virtual mode or Manual mode timing values. Is these configurations are mandatory? 

Any Inputs? 

-Thanks.

  • To read the 8KB data, any changes are required in device tree or drivers?

    Is the objective to read 8KB at a time?

    Also the failure happens even when you read 4KB at a time?

    3. Memory read works only first 4KB data and other locations, it is giving garbage values

    1. Read first 4KB as start address 

    2. Read 2nd 4KB as start address = (start address + 4KB)

    The problem is: Can not read 8KB file in single time. Need to read 2 times as mentioned above.

    - Keerthy