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.

CCS/AM6548: QSPI NOR flash support

Part Number: AM6548

Tool/software: Code Composer Studio

Hello all,

I want to support QSPI nor flash (Macronix MX25L25635F) on our AM65xx custom board. 

AM65xx custom board is similar to AM65xx_idk board, the only differences is in type of nor flash. We modified IDK board to use QSPI nor flash (Macronix MX25L25635F) conected to port 0 of OSPI interfaces instead of existing OSPI nor flash on IDK board (MT35XU512ABA1G12).

I am using:

  • AM654x IDK
  • ti-processor-sdk-rtos-am65xx-evm-06.01.00.08
  • CCS ver 8.3.0

What i did until now in order to add support for QSPI nor flash on AM65xx custom board:

QSPI support already exists for j721e_evm platform in board support libary, so to use this support for AM65xx platform i made some changes in the following files:

  • <\BOARD_FLASH_PATH\nor\device\MX25L25635F.h> - I created new header file for our flash device, and for starting point i used file <mt25qu512abb.h> (this flash device is supported for j721e_evm platform)
  • <\BOARD_FLASH_PATH\src_files_flash.mk> - in this makefile I included nor_qspi.c, nor_qspi.h and MX25L25635F.h in build
  • <\BOARD_FLASH_PATH\include\board_flash.h> - I added board flash ID number (BOARD_FLASH_ID_MX25L25635F)
  • <\BOARD_FLASH_PATH\board_flash.c> - I added board flash ID in all functions where it was needed
  • <\BOARD_FLASH_PATH\nor\nor.c> - in array "Nor_config[BOARD_FLASH_NOR_INTF_MAX]" I added "&Nor_qspiFxnTable"
  • <\BOARD_FLASH_PATH\nor\ospi\nor_qspi.h> - I include <\BOARD_FLASH_PATH\nor\device\MX25L25635F.h> for AM65xx platform

(BOARD_FLASH_PATH = \packages\ti\board\src\flash\)

What i am planning to do:

  • To create test application for QSPI nor flash (Macronix MX25L25635F)

Questions:

  1. To create test application for QSPI nor flash, which example from pdk should i use as starting point?
  •  I was thinking to use OSPI flash test example <\packages\ti\drv\spi\test\ospi_flash\src\main_ospi_flash_test.c> as starting point and to use OSPI driver to configure OSPI peripheral to work in QSPI mode
  •  However, I saw that there is QSPI nor flash test example too, but this example is made for other platforms (am437x, am571x, am572x...) and those platformes have only QSPI peripheral and to configure QSPI peripheral it was used QSPI driver from pdk.

        2. As you can see above, i am trying to reuse QSPI nor flash support from j721e_evm for AM65xx_idk board. Does this approach have any sense from your point of view?

NOTE: I am planing to create separete board configuration for our custom AM65xx board (e.g. am65xx_custom), but for now i just want to see can I communicate with QSPI nor flash by using existing board libary and driver support from pdk.

 

Best regards,
Novica