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/PROCESSOR-SDK-AM65X: Uart1 Uniflash Programming

Part Number: PROCESSOR-SDK-AM65X
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Code Composer Studio

Hi,

We are planning to use TI’s Uniflash tool for loading the u-boot to QSPI NOR flash memory in our custom hardware by using main UART1 instead of main UART0.Our custom board designed with UART1 for debugging/Development.

But the Uniflash neither support QSPI for AM65xx nor main UART1 for flashing the images.

For meeting the above requirement, Uniflash customization is required as suggested by TI.

We are trying to understand how to add the QSPI and UART1 support in Uniflash for loading the u-boot to our custom board.

Currently,

  1. Uniflash supports only UART0 for loading the images

  2. No support available for QSPI NOR flash memory for AM654x target boards

  3. Uniflash is supporting TI’s specific EVM models only, no custom board support is available.

As a first step, trying to understand the Uniflash source files in TI’s PDK source.

I have attached a document with my observations .Please confirm whether we are moving in correct direction for customisation of Uniflash to meet our requirement.

Uniflash_QSPI FlashWriter.rtf

Regards

Venkatesh

  • Hi Venkatesh,

    We will provide you a more detailed feedback on the document that you have shared.

    But just a quick note that the Uniflash tool uses the UART boot to transfer initial Flash writer that will be used to program the flashes. So it needs to use the MCU UART instance for this purpose.

    Are you able to achieve UART boot on your custom board? If not, I request you to check that in parallel.

    Regards

    Karthik

  • HI Karthik!

    Thank you for your quick response...

    Yes, we are able to boot the Device till Login prompt and displaying messages in UART also. Currently we are seeing Kernel booting messages in UART and uBoot messages not coming because messages are redirected to DCC console . we have removed the DCC patch but not yet tested with Board .

    This is the reason we would like to flash the image by using UNIFLAH instead of using Trace32 scripts for flashing. Hope this clarified to your suggestion..

    Thanks & Regards

    Garimella Srinivasu

  • Hi Karthik,

    We have done the following changes for supporting Uniflash with UART1 for image flashing to our customised AM654x board.

    1. Currently pinmux is missing for UART1 port.We have generated AM65xx_pinmux_data.c source file for our hardware support with UART1

    filepath : <pdk_am65xx_1_0_6\packages\ti\board\src\am65xx_idk\AM65xx_pinmux_data.c>

    2. uint8_t uart_inst=BOARD_UART_INSTANCE is the logical peripheral number indexed into the HWAttrs table currently this is indexing for UART0 Attributes

    3. BOARD_UART1_INSTANCE is assigned to the variable uint8_t uart_inst for supporting UART1.

    filepath <pdk_am65xx_1_0_6\packages\ti\board\utils\uniflash\target\soc\k3\soc.c>

    Regards

    Venkatesh

  • Hi Venkatesh,

    Do you have support for MCU UART port on your board and able to confirm the UART boot? If so, you need not make any UART related changes to Uniflash.

    - Pratap.

  • Hi Pratap,


    Thanks for your support.  
    We have MCU UART0 and MAIN UART1 on our AM654x board. Our Hardware set up is getting ready and We will test and confirm the result.


    Uniflash support for QSPI NOR flashing:
    Currently Uniflash is supporting ospi NOR flashing for AM65xx.We need QSPI flashing support for our hardware based on AM654x.
    Please let me know what are the changes required in uniflash source for QSPI flashing support for AM654x hardware.


    In our Hardware, AM654x is interfaced with Spansion S25Fl256s1(32MB) on MCU OSPI0 bus as a boot media.
    Can we use below NOR Flash qspi driver for this purpose by replacing the mt25qu512abb.h to s25fl256s.h in qspi.h header file. Or can we use same ospi driver with minimal changes for supporting qspi flashing.
    #include <ti/board/src/flash/nor/device/mt25qu512abb.h>
     Below is the QSPI Driver source for AM65xx platforms.
    Path:<pdk_am65xx_1_0_6\packages\ti\board\src\flash\nor\ospi\nor_qspi.c


    Currently uniflash is supporting ospi flash memory for am65xx and the application level driver is available from the below path.
    ospi driver path:<pdk_am65xx_1_0_6\packages\ti\board\utils\uniflash\target\src\ospi


    Can we use the same ospi driver for the QSPI support with minimal changes, which may require for QSPI support, or is it required to use the qspi driver from the same path?
    qspi driver path:<pdk_am65xx_1_0_6\packages\ti\board\utils\uniflash\target\src\qspi

     

    Regards

    Venkatesh

  • Reopening the thread to post further updates.

  • Hi Venkatesh,

     

    OSPI based quad flash driver is not supported on AM65x. Driver available at pdk_am65xx_1_0_6\packages\ti\board\src\flash\nor\ospi\nor_qspi.c is for TDA4 platform but it can be extended to AM65xx. Please follow below steps. I am using am65xx_evm name as reference. You can use your platform name.

     

    • Replace mt25qu512abb.h file inclusion in ‘packages\ti\board\src\flash\nor\ospi\nor_qspi.h’ with below

    #if defined (am65xx_evm)

    #include <ti/board/src/flash/nor/device/s25fl256s.h >

    #else

    #include <ti/board/src/flash/nor/device/mt25qu512abb.h>

    #endif

     

    • Update Nor_config structure for AM65xx platform in ‘pdk\packages\ti\board\src\flash\nor\nor.c’ to add Nor_qspiFxnTable at offset 1

    #elif defined (am65xx_evm) || defined (am65xx_idk)

    NOR_Config Nor_config[BOARD_FLASH_NOR_INTF_MAX] =

    {

        {

            NULL

        },

        {

            &Nor_qspiFxnTable

        },

        {

            NULL

        },

        {

            &Nor_ospiFxnTable

        },

        {

            NULL

        }

    };

    #elif defined (j721e_sim) || defined (j721e_evm)

     

    • Update SRCS_COMMON in ‘packages\ti\board\src\flash\src_files_flash.mk' to include nor_qspi.c for am65xx build.

     

    • You may get into some build errors due to the command macro name mismatch. Include command macros that are needed for nor_qspi.c build in s25fl256s.h and map them to the proper command codes of s25fl256s flash.

     

    Let me know in case you get into any issues.

     

    - Pratap.

  • Hi Venkatesh,

     

    Regarding the Uniflash, you need to use file at packages\ti\board\utils\uniflash\target\src\qspi to enable qspi flash programming. Once you are done with board flash library update as mentioned in above post, you can follow below steps to enable qspi in Uniflash for AM65x.

     

    • Add macro ‘#define QSPI_FLASH' in the file ‘packages\ti\board\utils\uniflash\target\include\ flash_programmer.h' under AM65xx group

    #if defined(am65xx_evm) || defined(am65xx_idk)

    #define MAX_BAUDRATE_SUPPORTED                                  (0xEU)

    #define MAX_BAUDRATE_SUPPORTED_LINUX      (0xBU)

     

    #define OSPI_FLASH

    #define EMMC_FLASH

    #define QSPI_FLASH

    #endif

     

    • Add am65xx_evm define in ‘packages\ti\board\utils\uniflash\target\src\qspi\qspi.c' at every place where j721e_evm is present

    #if (defined(SOC_K2G) || defined(j721e_evm))  è #if (defined(SOC_K2G) || defined(j721e_evm) || defined(am65xx_evm))

    #if defined(j721e_evm) è #if defined(j721e_evm) || defined(am65xx_evm)

     

    • Update packages\ti\board\utils\uniflash\target\makefile to include qspi.c for AM65xx build

    ifeq ($(BOARD), $(filter $(BOARD), am65xx_evm))

    SRC_DRV += qspi.c

    endif

     

    • Build and generate Uniflash flash programmer. Copy uart_am65xx_evm_flash_programmer.tiimage and sysfw.bin from PDK package to uniflash_x.x.x\processors\FlashWriter\am65xx_evm
    • You need to use device type ‘2’ for QSPI flash programming.

     

    Let me know in case you get into any issues.

     

    - Pratap.