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.

TDA4VM: Use of board_clock functions on C7x

Part Number: TDA4VM

Tool/software:

Hi TI, 

I'm trying to initialize some board modules : the pinmux, ClockInitMcu, ClockInitMain() and the uartStdioInit ones on the C7x. 
I need to do that because those steps are required inside the memcpy_main_baremetal.c TI file. Because there have always been an issue while trying to use directly the Board_init() function (code that runs in loop), I kinda bypassed this function, and implemented this code based of the Board_init() function in the board_init.c file 

/*
 * main.c
 *
 *  Created on: 30 juil. 2025
 *      
 */
#include <ti/board/board.h>                      //contient le statut BOARD_SOK
#include <ti/drv/sciclient/sciclient.h>          //pour utilisation type Sciclient_ConfigPrms_t
#include <stdlib.h>

/* --- BIBLIO UTILISEES DANS FICHIER BOARD_INIT.c --- */
//#include "board_internal.h"
#include <ti/board/src/j721e_evm/include/board_internal.h>      //contient Board_moduleClockInitMcu et Board_moduleClockInitMain
//#include "board_ethernet_config.h"
#include <ti/board/src/j721e_evm/include/board_ethernet_config.h>
//#include "board_utils.h"
#include <ti/board/src/j721e_evm/include/board_utils.h>
//#include "board_serdes_cfg.h"
#include <ti/board/src/j721e_evm/include/board_serdes_cfg.h>


// Ajout cf Wissam pour l'UART
#include <ti/drv/uart/UART.h>
#include <ti/drv/uart/UART_stdio.h>
#include <ti/drv/uart/soc/UART_soc.h>

// Ajout cf Wissam pour CLOCK
#include <ti/board/src/j721e_evm/include/board_clock.h>
//#include <ti/board/src/j721e_evm/include/board_utils.h>

// Add pour clock
#include <ti/board/src/j721e_evm/include/board_cfg.h>
#include <ti/board/src/j721e_evm/include/board_pll.h>


int main(){

    /* ETAT DE LA CARTE */
    Board_STATUS ret = BOARD_SOK;
    Board_initCfg cfg;

    // Config du pinmux                         // ETAT : OK !
    if (cfg & BOARD_INIT_PINMUX_CONFIG){

        ret = Board_pinmuxConfig();
        printf("Initialisation du pinmux\n");
    }

    if (BOARD_SOK != ret){
        return ret;
    }


    // Config de la clock
    if (cfg & BOARD_INIT_MODULE_CLOCK)
    {
        ret = Board_moduleClockInitMcu();
        if (BOARD_SOK != ret)
            return ret;

        ret = Board_moduleClockInitMain();
        if (BOARD_SOK != ret)
            return ret;
    }


//    /* SCICLIENT */
//    Sciclient_ConfigPrms_t config;


}

However, whenever I try to debug and reach the line calling the Board_pinmuxConfig() function, the code always starts running in a loop. So clearly, there is an issue related to the board_clock functions...
I folllowed those steps while debuging:
- Launch script launch.js
- Run the R5F Core
- Connect C7x Core 
- Load my previous code on C7x and then run it 

Just to spare some wasted time, I put you there all the project include information: 

Regards, 

Mélanie

  • Hi,


    From your code Board_initCfg (cfg) values is not initialized.  Can you please check this.

    Load my previous code on C7x and then run it 

    Which code are you running in c7x. Are you running the board initialization code on R5F?

    Regards,
    Sivadeep

  • Hi, 

    It's normal, I'm not using the Board_init() function as I mentioned in my previous message. So I do not need to initialize the values of cfg. I already tried to use it, but since it didn't work, I bypassed it by only implementing the part of the code that performs the initialization of the three modules (BOARD_INIT_MODULE_CLOCK, BOARD_INIT_PINMUX_CONFIG, and BOARD_INIT_UART_STDIO).

    I'm trying to run what I put in my previous message... Sometimes I wonder if you read all the content.
    For the second answer, yes I am.

    Regards, 

    Mélanie

  • Hi,

    I will check this internally and update you.

    Regards,
    Sivadeep

  • Hi,

    Thank you for all the details. I’ve gone through the information you shared, but I still have a few points of confusion. Could you please help clarify the following? Apologies for any misunderstanding.

    • Are you building the code you mentioned above using the C7x core?

      From the screenshots you shared, it appears that you're using the C7x compiler. However, based on the makefiles for memcpy_main_baremetal.c, this file seems to be supported only for the A53 and A72 cores.

        

    • If possible, could you share the exact cl7x command used to build the code and generate the executable?
      This would help me try it from my side and aid in investigating the issue further.

    • In the code you shared, the configuration (cfg) does not seem to be set up to enter the condition check
      Can you please confirm whether the code is actually reaching the condition " ret = Board_pinmuxConfig();" on your end?

    Best Regards,

    Sivadeep

  • Hi, 

    • Indeed, I'm building and running the memcpy_main_baremetal.c file on the C7x. Okay, so you mean that's the code is not supported for the C7x core? Where have you found the makefiles related to this file ? What about the umda_memcpy_test.c ? Is it supported by the core C7x ? 

    • I didn't use any command to build the code, everything is done by CCS 

    • Yes, the code is code reaching the condition " ret = Board_pinmuxConfig(); "
  • I don't have the same makefile as you... Could you give the path of yours. This what I found in the makefile_baremetal

    Regards, 

    Mélanie 

  • Hi,

    I don't have the same makefile as you... Could you give the path of yours. This what I found in the makefile_baremetal

    If you want to use "makefile_baremetal", you need to build the applicaiton udma_baremetal_memcpy_testapp.

    From the TI SDK, above application is not supported for the C7x core?

    Please refer to pdk/packages/ti/drv/udma/udma_component.mk file about the above application supported cores.
     

    Please check which application you are loading on C7x_1 core? Is it built for C7x_1 or not? 
    Also, as requested above, please share the command used to build the application and the binary loading on the C71x core.

    Best Regards,
    Sudheer

  • Hi Doredla, 

    I checked the Makefile in the UDMA folder and noticed that the code I wanted to run on the C7x core is not supported for my use case (I'm working on baremetal).

    Another question: are the UDMA codes supported on the C7x core when working baremetal on the J784S4 board?

    Regards, 

    Mélanie