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/AM6548: QSPI support

Part Number: AM6548

Tool/software: TI-RTOS

Hello everyone.

We are using:

  • AM654x IDK
  • processor_sdk_rtos_am65xx_5_03_00_07

We want to:

  • read/write to the ospi flash that is on the eval board (MT35XU512ABA1G12-0SIT) using single I/O instructions (as if the flash were spi one)
  • read/write to a qspi flash that is on our custom board

We did:

  • started with the sdk example project (C:\ti\processor_sdk_rtos_am65xx_5_03_00_07\demos\rtos_template_app\am65xx\evmAM65xx\A53\template_app\)
  • successfully imported ospi test code for am65 (C:\ti\pdk_am65xx_1_0_4\packages\ti\drv\spi\test\ospi_flash\src\main_ospi_flash_test.c)

but we were not able to write to/read from ospi flash in single lane mode.

We believe that driver (C:\ti\pdk_am65xx_1_0_4\packages\ti\board\src\flash\nor\ospi\nor_ospi.c) is made to work only with ospi flash using octal instructions - that is, the driver IS NOT generic.

Questions:

  1. Should we use ospi driver or qspi driver to communicate with a qspi device connected to the OSPI0 interface of the AM65x processor?
  2. When will the ospi driver become generic (so that we can communicate with a qspi flash)?
  3. What kind of changes in driver must someone make, in order to communicate with a qspi device?
  4. Is it possible to get some example code for AM65xx where a spi or qspi flash is being used?

Thank You very much in advance,

Dusan

  • Dusan Corlija said:
    Should we use ospi driver or qspi driver to communicate with a qspi device connected to the OSPI0 interface of the AM65x processor?

    Dusan Corlija said:
    When will the ospi driver become generic (so that we can communicate with a qspi flash)?

    You need to use the OSPI driver to communicate to the QSPI flash device on AM65x. We currently have a plan to integrate QSPI flash support in to Processor SDK RTOS  and also provide guidance for SBL update to support booting from QSPI flash. The current plan is to have instructions for QSPI flash to be added in Processor SDK RTOS 6.x time frame but the SBL update may only be available in the subsequent release 

    Dusan Corlija said:
    • What kind of changes in driver must someone make, in order to communicate with a qspi device?
    • Is it possible to get some example code for AM65xx where a spi or qspi flash is being used?

    In order to test a QSPI flash device, you may need to change the below driver code:

    1. Modify OSPI drivers to support Quad SPI mode (ti/drv/spi/src/v0/OSPI_v0.c, ti/drv/spi/soc/am65xx/SPI_soc.c)

    2. Modify Board OSPI NOR flash driver to support QSPI device (ti/board/src/flash/nor/ospi/nor_ospi.c)

    I beleive "phyEnable" should be false and xferLines should be OSPI_XFER_LINES_QUAD

    I need to check if a full fledge example is planned to be supported. One of the challenges is that the EVM doesn`t support QSPI flash so the current plan is to use one of our internal silicon verfication boards to showcase QSPI flash connect to OSPI1 but you may not be able to test that on the EVM.
    Regards,
    Rahul

  • Dear Sir,

    thank You for the fast response. Now we know a bit better what should be done, however, we are looking forward to any additional info regarding the example or TI plans concerning this issue.

    Dušan