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.
工具与软件:
您好!
我们要在定制板上使用 EtherCAT SYNC0信号的替代引脚、但无法看到该信号。
因此、我们尝试验证这在 AM243x LP 上是否有效。
使用 TI Beckhoff 子器件示例、我们可以使其在直流同步模式下运行、我们可以在默认引脚 PRG1_PRU0_GPO19/U3上看到 SYNC0信号。
在 AM243 LaunchPad 上、备用引脚 PRG1_PRU1_GPO19/AA13连接到 PHY 的 PWDN/int 引脚。
因此、为了测试备用 SYNC0引脚、我们为 PHY 禁用了 PWDN 功能、更改了 SysConfig 中的 SYNC0引脚、并使用逻辑分析仪查看引脚 AA13。
但这种行为与我们的预期不符:
PHY 配置正确、子器件进入直流同步 OP 状态。 但在默认引脚 U3上仍然看到 SYNC0信号。 我们在 SYSCONF (AA13)中设置的引脚仅被拉低且没有 SYNC0信号。
要在 SysConfig 中设置的引脚上获取 SYNC0、我们应该在 TI Beckhoff 子器件示例中更改什么?
我想我们可能需要更新时间路由器的寄存器、但如果是这种情况、我们会感谢您提供有关内容/方法的一些指导。
谢谢!
尊敬的 Erik:
以下是可用于将同步信号映射到的时间同步事件输出的引脚/信号 AM64x/AM243x TI EVM :
将 SYNC 信号路由到 J12的步骤:
在所需的头文件和宏定义中添加以下代码块
/* Include Macros */ #include <drivers/hw_include/cslr_soc.h> /* Sync Events*/ #define SYNC_OUT0 0 #define SYNC_OUT1 1 /* * PAD configuration for Ball.D18 * Required to configure SYNC0_OUT as pin out */ static Pinmux_PerCfg_t gTsrPinMuxMainDomainCfg[] = { { PIN_ECAP0_IN_APWM_OUT, ( PIN_MODE(1) | PIN_PULL_DISABLE ) /* PIN_MODE 1 is SYNC0_OUT */ }, {PINMUX_END, PINMUX_END} }; void TSR_config(uint8_t syncSignal);
/* Function Definition and Call */ /*! * \brief * Configuration for TSR. * * \details * This function configures pinmux required for TSR to route the sync signals to SYNC0_OUT pin * * \param[in] syncSignal Sync0/Sync1 signal to be routed to SYNC0_OUT pin * */ void TSR_config(uint8_t syncSignal) { // Call Pinmux_config API to max the required changes in pinmuxing. Pinmux_config(gTsrPinMuxMainDomainCfg, PINMUX_DOMAIN_ID_MAIN); /* PRU IEP Enable SYNC MODE */ CSL_REG32_WR(CSL_PRU_ICSSG1_PR1_CFG_SLV_BASE + CSL_ICSSCFG_IEPCLK, 1); CSL_REG32_WR(CSL_TIMESYNC_EVENT_INTROUTER0_CFG_BASE + 0x64, 0x0001001D + syncSignal); } int main(void) { uint8_t syncEvent = SYNC_OUT0; /* Additional configuration to route the sync0 or sync1 signal to SYNC0_OUT PIN */ TSR_config(syncEvent); }
此致、
亚伦