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.

[FAQ] TDA4VM: How to change peripheral initialization from remote core firmware using board library?

Part Number: TDA4VM

I want to initialize some additional peripherals for my custom firmware on R5F and remove some redundant initializations. How do I do this using board library in the SDK?

  • Modification to the board library

    Top level call: Board_init()

    Source code: ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/board/src/j721e_evm/board_init.c

    Relevant flag(s): BOARD_INIT_MODULE_CLOCK or BOARD_INIT_MODULE_CLOCK_MCU or BOARD_INIT_MODULE_CLOCK_MAIN

    Functions: Board_moduleClockInitMcu() and Board_moduleClockInitMain() finally calling Board_moduleClockInit() with an array.

    Source code: ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/board/src/j721e_evm/board_clock.c

    The array passed to Board_moduleClockInit() tell what peripherals are being initialized. Change one of the below mentioned arrays accordingly:

    1. gBoardClkModuleMcuIDInitGroupl[]
    2. gBoardClkModuleMcuIDInitGroup2[]
    3. gBoardClkModuleMcuIDDeinitGroupl[]
    4. gBoardClkModuleMainIDGroup1[]
    5. gBoardClkModuleMainIDDeinitGroup1[]
    6. gBoardClkModuleMainIDGroup2[]

    Once modification is made, the board library needs to be re-built and re-linked (in case the firmware code is outside of the SDK and uses a copy of the board library. (mostly in case of AUTOSAR on R5F)

    Rebuilding the board library

    Once you make your updates run the below:

    cd pdk/packages/ti/build

    /* Clean the board library, this cleans the ti.board.aer5f at pdk/packages/ti/board/lib/j721e/r5f/release/ti.board.aer5f */

    make board_clean -sj

    /* rebuild the board library, this will rebuild the ti.board.aer5f, you can verify by checking the time stamp of this */

    make board -sj

    If you are using the SDK then you don't need anything else. But if you are using this library outside of the SDK where you need to explicitly link this, then link the new ti.board.aer5f.

    Regards,

    Karan