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.

[参考译文] SK-AM62-LP:为 CPSW3G AM62LP 配置引脚多路复用

Guru**** 2455560 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1378574/sk-am62-lp-configuring-pinmux-for-cpsw3g-am62lp

器件型号:SK-AM62-LP
主题中讨论的其他器件:SysConfig

工具与软件:

您好!

我尝试使用 SysConfig 1.20.0+3587为 AM62LP 配置 pinmux。 我基于 AM62 09_02_01_06的 MCU PLUS SDK。

我已选择所需的配置:

配置文件如下所示:

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "AM62x" --package "AMC" --part "Default" --context "a53ss0-0" --product "MCU_PLUS_SDK_AM62x@09.02.01"
 * @versions {"tool":"1.20.0+3587"}
 */

/**
 * Import the modules used in this configuration.
 */
const udma       = scripting.addModule("/drivers/udma/udma", {}, false);
const udma1      = udma.addInstance();
const debug_log  = scripting.addModule("/kernel/dpl/debug_log");
const mmu_armv8  = scripting.addModule("/kernel/dpl/mmu_armv8", {}, false);
const mmu_armv81 = mmu_armv8.addInstance();
const mmu_armv82 = mmu_armv8.addInstance();

/**
 * Write custom configuration values to the imported modules.
 */
udma1.$name = "CONFIG_UDMA0";

debug_log.enableUartLog        = true;
debug_log.uartLog.$name        = "CONFIG_UART_CONSOLE";
debug_log.uartLog.UART.$assign = "USART0";

mmu_armv81.size  = 0x80000000;
mmu_armv81.$name = "SOC_MEM_REGION";

mmu_armv82.vAddr     = 0x80000000;
mmu_armv82.pAddr     = 0x80000000;
mmu_armv82.size      = 0x80000000;
mmu_armv82.attribute = "MAIR7";
mmu_armv82.$name     = "DDR_REGION";

/**
 * These are the reserved peripherals and settings in this configuration
 */
const iCPSW3G1             = scripting.addPeripheral("CPSW3G");
iCPSW3G1.$name             = "MyCPSW3G1";
iCPSW3G1.$assign           = "CP_GEMAC_CPTS0";
iCPSW3G1.HW1TSPUSH.$assign = "SPI0_D0";
iCPSW3G1.HW2TSPUSH.$assign = "SPI0_D1";
iCPSW3G1.RFT_CLK.$assign   = "EXT_REFCLK1";
iCPSW3G1.TS_COMP.$assign   = "SPI0_CS1";
iCPSW3G1.TS_SYNC.$assign   = "SPI0_CLK";
const iMDIO1               = scripting.addPeripheral("MDIO");
iMDIO1.$name               = "MyMDIO1";
iMDIO1.$assign             = "MDIO0";
iMDIO1.MDC.$assign         = "MDIO0_MDC";
iMDIO1.MDIO.$assign        = "MDIO0_MDIO";
const iRGMII1              = scripting.addPeripheral("RGMII");
iRGMII1.$name              = "MyRGMII1";
iRGMII1.RD0.$assign        = "RGMII1_RD0";
iRGMII1.RD1.$assign        = "RGMII1_RD1";
iRGMII1.RD2.$assign        = "RGMII1_RD2";
iRGMII1.RD3.$assign        = "RGMII1_RD3";
iRGMII1.RXC.$assign        = "RGMII1_RXC";
iRGMII1.RX_CTL.$assign     = "RGMII1_RX_CTL";
iRGMII1.TD0.$assign        = "RGMII1_TD0";
iRGMII1.TD1.$assign        = "RGMII1_TD1";
iRGMII1.TD2.$assign        = "RGMII1_TD2";
iRGMII1.TD3.$assign        = "RGMII1_TD3";
iRGMII1.TXC.$assign        = "RGMII1_TXC";
iRGMII1.TX_CTL.$assign     = "RGMII1_TX_CTL";

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
debug_log.uartLog.UART.RXD.$suggestSolution = "UART0_RXD";
debug_log.uartLog.UART.TXD.$suggestSolution = "UART0_TXD";
iRGMII1.$suggestSolution                    = "RGMII1";

但是、生成的 ti_pinmux_config.c 不会反映我的更改:

/*
 *  Copyright (C) 2021 Texas Instruments Incorporated
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * Auto generated file
 */
#include "ti_drivers_config.h"
#include <drivers/pinmux.h>

static Pinmux_PerCfg_t gPinMuxMainDomainCfg[] = {
            /* USART0 pin config */
    /* UART0_RXD -> UART0_RXD (A13) */
    {
        PIN_UART0_RXD,
        ( PIN_MODE(0) | PIN_INPUT_ENABLE | PIN_PULL_DISABLE )
    },
    /* UART0_TXD -> UART0_TXD (E11) */
    {
        PIN_UART0_TXD,
        ( PIN_MODE(0) | PIN_PULL_DISABLE )
    },

    {PINMUX_END, PINMUX_END}
};

static Pinmux_PerCfg_t gPinMuxMcuDomainCfg[] = {
        
    {PINMUX_END, PINMUX_END}
};

/*
 * Pinmux
 */
void Pinmux_init(void)
{
    Pinmux_config(gPinMuxMainDomainCfg, PINMUX_DOMAIN_ID_MAIN);
    Pinmux_config(gPinMuxMcuDomainCfg, PINMUX_DOMAIN_ID_MCU);
}

我缺少什么?  

BR

Wojciech Jaśko ć

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好  Wojciech、

    感谢您的提问。

    但是、生成的 ti_pinmux_config.c 不能反映我的更改:

    是否尝试在 SysConfig 的"Reserve Peripheral"选项卡下配置外设?

    "Reserved Peripherals"选项卡用于保留您自己的自定义代码将处理的任何特定硬件资源、并通知 SysConfig 工具不要使用该外设。 该选项卡不应用于需要由该工具配置的任何外设。

    SysConfig 工具不会为"Reserve Peripheral"选项卡下添加的资源生成代码。

    此致、

    Tushar

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    那么、如何为 CPSW 和 RMGII 配置引脚多路复用器?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好  Wojciech、

    感谢您的答复。

    我明白了、如何为 CPSW 和 RMGII 配置 pinmux?

    我们的 MCU+SDK 产品目前不支持 RGMII 和 CPSW 等功能。 请参阅  release_notes 。

    此致、

    Tushar