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.

AM2434: AM2434: Custom flash driver for AM2434 error

Part Number: AM2434

Hello,

I have encountered problem when trying to create custom flash driver using this guide:
AM243x MCU+ SDK: Writing flash driver for a custom flash device

STEP 1:
Add and modify GD25Q64E driver code in AM2434 SDK.
Modify the file as follows:
1.Add and modify driver files:
flash_nor_ospi_quad_device_GD25Q64E.c
flash_nor_ospi_quad.c
flash_nor_ospi_quad.h

makefile.am243x.r5f.ti-arm-clang
flash_am243x.syscfg.js

STEP 2:
Rebuild library files in linux environment
execute "gmake -f makefile.am243x libs"

STEP 3:
When running the example OSPI Flash Diagnostic example,write data and read data compare incorrectly.


The AM2434 is using the GD25Q64E flash memory. I have run the ospi_flash_diag example and gotten this information:
[MAIN_Cortex_R5_0_0] [OSPI Flash Diagnostic Test] Starting ...
[OSPI Flash Diagnostic Test] Flash Manufacturer ID : 0xC8
[OSPI Flash Diagnostic Test] Flash Device ID : 0x4017
[OSPI Flash Diagnostic Test] Executing Flash Erase on first block...
[OSPI Flash Diagnostic Test] Done !!!
[OSPI Flash Diagnostic Test] Performing Write-Read Test...
ERROR: ospi_flash_diag_test_compare_buffers:170: OSPI read data mismatch !!!
Some tests have failed!!

The write data is offset by one byte forward, and the data read one byte forward is correct.

So my questions are:

Is there something I have missed when trying to add custom flash driver? (desc. in Step 1)

Thank you very much for your help.

  • Hi Lin,

    Most of your steps look okay to me. Instead of using I/O Fast Read, try using Output Fast Read. Also, can you share the details by reading status register ?

    1. After Chip Erase
    2. After Flash Write
    3. After Flash Read

    If we could not deduce the problem out of these details, we can plan some debug session together with Flash experts.

    Thanks and Regards,
    Aakash