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: 如何在电路板库中使用 Board_init() 修改 pinmux

Part Number: TDA4VM
Other Parts Discussed in Thread: SYSCONFIG

问:您能否提供一个示例,以说明如何使用 dev.ti.com 中的 SysConfig/Pinmux 工具为外设添加 Pinmux?

  • 答:让我们尝试使用一个示例来了解为外设添加 PinMux 的过程。

    在电路板库中修改 PinMux

    1.访问 https://dev.ti.com/ 并启动 PinMux 工具。

    2.加载 mcu_adc.syscfg,这提供了有关如何对 MCU 域的 ADC 进行引脚多路复用的示例。

    • 您将看到添加该文件会生成多个文件。要使用 Board_init(BOARD_INIT_PINMUX_CONFIG) 更新 PinMux,您需要使用c 文件。
    • 需要将生成的全部 4 个结构附加(而不是替换)到 SDK 中的原始位置。
      • 您可能需要根据您在哪个索引上添加 mcu_adc pinmux 来编辑 gJ721E_WkupPinmuxData{} 中第一个字段(索引)。

    3.要获得全景信息,请在工具中加载 SDK.syscfg。

    • 此处,我添加了大多数针对 WKUP 和 MCU 域进行引脚多路复用的外设,但未进行任何验证,仅供参考。
    • 您将看到连接了多个外设,并将看到包含所有选定外设的c。您可以添加所有外设(针对一个内核)并生成与该文件类似的文件。

    重要说明:如果特定信号的 SoC 焊盘有多个选项,请检查您的硬件原理图,以了解实际的引脚输出。

    如何加载 SysConfig 工程

    要加载 *.syscfg 文件,请从 dev.ti.com 打开 pinmux 工具,然后依次点击“File”->“Open”->“Upload”(这是一个小型云符号)-> 浏览您的 PC 并选择 *.syscfg 文件。

    /cfs-file/__key/communityserver-discussions-components-files/791/pinmux_5F00_tool_5F00_projects.zip

    重建电路板库

    进行更新之后,运行以下命令:

    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

    如果您在使用 SDK,则不需要任何其他资源。但是,如果您在 SDK 外部使用该库,而在此处则需要明确链接该库,则应链接新的 ti.board.aer5f。

    有关 Linux 器件树中的 PinMux,请参阅 https://e2e.ti.com/support/processors/f/791/t/927526