Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Dear TI experts,
We encountered a problem during testing custom board enet layer 2 communication with AM2612:
The environment is:
SDK: mcu_plus_sdk_am261x_10_00_01_10
Syscfg: sysconfig_1.23.0
ti-cgt-armllvm_4.0.1.LTS
ccs1281
The problem is:
Application boot from FLASH. Boot mode is OSPI 1S. We use RGMII 1G to communication. Application can receive layer2 messages and send out it, but tx messages can't be captured by Wireshark monitoring, .
With same application running by JTAG, both rx and tx messages can be captured by Wireshark.
We measured rx and tx RGMII clock and found rx freq is 125MHz, tx freq is 6.25MHz when boot from flash and both rx and tx freq is 125MHz when using JTAG.
And we printed some registers about RGMII:
JTAG:
MSS_RCM_MSS_RGMII_CLK_DIV_VAL 0x111
MSS_RCM_CPSW_5_50_250_CLK_MUX_CTRL 0x333
MSS_RCM_MSS_CPTS_CLK_SRC_SEL 0x222
MSS_RCM_MSS_CPTS_CLK_DIV_VAL 0x0
FLASH:
MSS_RCM_MSS_RGMII_CLK_DIV_VAL 0x111
MSS_RCM_CPSW_5_50_250_CLK_MUX_CTRL 0x0
MSS_RCM_MSS_CPTS_CLK_SRC_SEL 0x222
MSS_RCM_MSS_CPTS_CLK_DIV_VAL 0x0
You can see the register MSS_RCM_CPSW_5_50_250_CLK_MUX_CTRL(i.e. 0x53208220) value is incorrect when boot from flash.
I tried to set the register in application source code:
Then the problem is solved. Tx and rx messages can be captured by wireshark when boot from flash.
But my concern is: the changes is not enough. Has any other initialization work been forgotten? Could you please have a complete check for clock initialization during SBL period?
The following structure is abstracted from ti_power_clock_config.c for your reference.
SOC_ModuleClockFrequency gSocModulesClockFrequency[] = {
{ SOC_RcmPeripheralId_I2C, SOC_RcmPeripheralClockSource_DPLL_PER_HSDIV0_CLKOUT0, 48000000},
{ SOC_RcmPeripheralId_ICSSM0_CORE, SOC_RcmPeripheralClockSource_DPLL_ETH_HSDIV0_CLKOUT0, 225000000},
{ SOC_RcmPeripheralId_ICSSM0_UART0, SOC_RcmPeripheralClockSource_DPLL_PER_HSDIV0_CLKOUT2, 160000000},
{ SOC_RcmPeripheralId_ICSSM1_CORE, SOC_RcmPeripheralClockSource_DPLL_ETH_HSDIV0_CLKOUT0, 225000000},
{ SOC_RcmPeripheralId_ICSSM1_UART0, SOC_RcmPeripheralClockSource_DPLL_PER_HSDIV0_CLKOUT2, 160000000},
{ SOC_RcmPeripheralId_CPTS, SOC_RcmPeripheralClockSource_SYS_CLK, 250000000},
{ SOC_RcmPeripheralId_LIN0_UART0, SOC_RcmPeripheralClockSource_DPLL_PER_HSDIV0_CLKOUT2, 160000000},
{ SOC_MODULES_END, SOC_MODULES_END, SOC_MODULES_END },
};
Best Regards,
LY