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.

TDA4VH-Q1: How to use the hyperflash in the SBL

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: TDA4VH, TDA4VM

Tool/software:

so far we just use the hyperflash as the boot media for MCU island of TDA4VH(j784s4), but when we just use the sbl_hyperflash.c  int the primary PDK as integration, there are dataAbortion in the intilization function just like 

SBL_hyperflashInit function and we do not know why ,do you have any available demo use cases for this situation.
 
since we just stuck into the hyperflash intial phase to load sysfw bin files from hyperflash, our hyperflash is Cyclepress S26KS128.
  • Hi Zhen,

    so far we just use the hyperflash as the boot media for MCU island of TDA4VH(j784s4), but when we just use the sbl_hyperflash.c  int the primary PDK as integration, there are dataAbortion in the intilization function just like 

    The TDA4VH device does not support the hyperflash.

    SBL_hyperflashInit function and we do not know why ,do you have any available demo use cases for this situation.


    TDA4VM device support the HyperFlash, could you please refer the attached CSL HyperBus example from the J721E SDK.

    hyperbus.zip

    Regards,

    Karthik 

  • hello 

    Thank you for your rapid reply.

    there are some questions about your attachment for hyperflash example .

    1. There is no member like fsscfg in the Stuct Board_PinmuxConfig_t as you can see below picture:

    is there any mismatch  place for project?

    2. i think you can not do the Board_Init before you load system firmware or tifs.bin in the CM4. because our system firmware has been flashed into external hyperflash with Lauterbach tool.

    3. we fist need to load the system firmware in our sbl initial phase after Lauterbach flashing, then you can do the Board_Init with sciclient related function as you see below:

    so we need to do the OSPI initial action without using scient related functions before loading the system firmware from hyperflash ,after this we can use Board_init, is my undstanding right?

  • Hi Zhen,

    1. There is no member like fsscfg in the Stuct Board_PinmuxConfig_t as you can see below picture:

    The example which I have shared is specific to J721e platform and there will be changes in terms of structure members as you mentioned. For reference I am adding the Board_PinmuxConfig structure here. For further changes and porting I would suggest downloading the J721E SDK

     71 /* Structure to set the board pinmux configuration */
     72 typedef struct Board_PinmuxConfig_s
     73 {
     74     /**
     75      * Pinmux auto config control
     76      *  BOARD_PINMUX_CUSTOM(0) - Pinmux is based on other add-on card
     77      *  settings of the pinmux config.
     78      *  BOARD_PINMUX_AUTO(1) - Pinmux is based on board detection by
     79      *  reading the board ID info from EEPROM.
     80      *  When auto mode is enabled, all other below fields of
     81      *  pinmux config will be ignored.
     82      */
     83     uint8_t autoCfg;
     84 
     85     /**
     86      * Pinmux config control for GESI/Infotainment expansion connector
     87      *  BOARD_PINMUX_GESI_ICSSG(0) - GESI Board (ICSSG RGMII)
     88      *  BOARD_PINMUX_GESI_CPSW(1) - GESI Board (CPSW9G RGMII)
     89      *  BOARD_PINMUX_INFOTAINMENT(2) - Infotainment Board
     90      */
     91     uint8_t gesiExp;
     92 
     93     /**
     94      * Pinmux config control for CSI expansion connector
     95      *  BOARD_PINMUX_CSI_FUSION(0) - Fusion-2 board
     96      *  BOARD_PINMUX_CSI_MV(1) - MV capture board
     97      *  BOARD_PINMUX_CSI_LI(2) - LI capture board
     98      */
     99     uint8_t csiExp;
    100 
    101     /**
    102      * Pinmux config control for ENET expansion connector
    103      *  BOARD_PINMUX_ENET_QSGMII(0) - ENET QSGMII board
    104      */
    105      uint8_t enetExp;
    106 
    107     /**
    108      * Pinmux config control for OSPI/Hyperflash mux
    109      *  BOARD_PINMUX_FSS_OSPI(0) - OSPI
    110      *  BOARD_PINMUX_FSS_HPB (1) - Hyperbus
    111      */
    112      uint8_t fssCfg;
    113 
    114 } Board_PinmuxConfig_t;
    

    2. i think you can not do the Board_Init before you load system firmware or tifs.bin in the CM4. because our system firmware has been flashed into external hyperflash with Lauterbach tool.

    Yes that's right, board_init cannot be called before the tifs.bin. J721E device boot flow is different from J784S4. During porting the examples we have to take care of the boot flow changes too.

    so we need to do the OSPI initial action without using scient related functions before loading the system firmware from hyperflash ,after this we can use Board_init, is my undstanding right?

    NO, First the system firmware has to be loaded from the hyperflash and then the Board_init has to be called.

    Could you please explain about OSPI initial action? 

    Regards,

    Karthik

  • the OSPI initial action means the hyperflash initialzation. so firstly you need to make sure do the hyperflash initialzation without using sciclient functions, then read tifs.bin from hyperflash and loaded into CM4, finally you can use board_init function.

    That is why i said that the hyperflash initialization example from J721e was also  not corrret. Because i did not see any process to load system firmware like tifs.bin before using board_init function.

  • Hi Zhen,

    Thanks for the clarification. The part number which you have shared needs to be interfaced with "hyperbus". I believe you have did the same. If it is interfaced with the hyperbus, OSPI initialization is not required. However if you are keen in knowing when the OSPI initialization will be done during the SBL OSPI boot, it goes as follows and the initialization happens after SciClient_init().

    sbl_main.c -> SBL_BootImage() ->   sbl_slave_core_boot.c -> SBL_OSPIBootImage() ->  sbl_ospi.c -> SBL_OSPI_Initialize() 

    In case of Hyperflash intialization it goes as follows it happens inside the SciClient_init(). 

    sbl_main.c -> SBL_SciClientInit() -> sbl_sci_client.c -> SBL_ReadSysfwImage() -> sbl_hyperflash.c ->SBL_hyperflashInit()

    so firstly you need to make sure do the hyperflash initialzation without using sciclient functions, then read tifs.bin from hyperflash and loaded into CM4, finally you can use board_init function.

    This statement holds true to the J721e platform. But this is not validated on J784s4. 

    Can you try initialize the hyperflash after SciClient initialization?

    Regards,

    Karthik

  • hello 

    As you can see below decription from SDK html:

    The question is  that you can not use the SBL_SciClientInit before loading system firmware from external hyperflash.

    it means that you need to initial hyperflash driver manually firstly , secondly to  get the system firmware from external hyperflash with this driver , finally call SBL_hyperflashInit() will be OK.

    Because it will call Board_init inside SBL_hyperflashInit();

    But the initial hyperflash process is the precondition to get system firmware ,which is missing i think.

  • Hi Zhen,

    The question is  that you can not use the SBL_SciClientInit before loading system firmware from external hyperflash.

    The document which you have referred is talking about  Sciclient_init() which is called inside the SBL_SciClientInit. 

    Please refer the file sbl_sci_client.c

    As you have mentioned the SBL_hyperflashInit()  is called before Sciclient_init().

    But the initial hyperflash process is the precondition to get system firmware ,which is missing i think.

    Yes this is right. If you please follow the SBL_SciClientInit() function in sbl_sci_client.c file, you could observe that the SBL_hyperflashInit() is called before the system firmware is loaded. Once the firmware is loaded the Sciclient_init() is invoked.

    Hope this answers your query.

    Regards,

    Karthik