Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

LP-AM261: TSN demo in am261 sdk

Part Number: LP-AM261
Other Parts Discussed in Thread: SYSCONFIG

Hi all,

Hope this email find you well. Here is china OEM MCU FAE. My customer, Li-auto, is evaluating our TSN demo in LP-AM261.

Path: mcu_plus_sdk_am261x_26_01_00_08\source\networking\enet\core\examples\tsn_demo

 

The customer used their own device as master, and use two LP-AM261 as slave. After running our tsn_demo, gPTP seems reach sync-stable; The menu in our demo has appeared.

    

However, the customer would like to measure the actual synchronization accuracy. Using the configuration and code below, I routed CPTS0_TS_SYNC to a GPIO and verified via an oscilloscope that the two slave nodes are synchronized within 10 ns.

/* SysConfig only muxes GPIO124 to CPTS0_TS_SYNC; the CPTS TS_OUTPUT_BIT_SELECT
* register resets to "disabled", so the pin stays silent until it is set.
* Bit 17 of the 250 MHz CPTS counter toggles every ~262.144us.(2^18). */
static void TsnDemoListener_enableTsSync(void)
{
Enet_IoctlPrms prms;
CpswCpts_OutputBitSel bitSelect = CPSW_CPTS_TS_OUTPUT_BIT_17; //TODO: BIT 17-31 for freq setting
int32_t status;

ENET_IOCTL_SET_IN_ARGS(&prms, &bitSelect);
ENET_IOCTL(gTsnDemo.hEnet, gTsnDemo.coreId,
CPSW_CPTS_IOCTL_SELECT_TS_OUTPUT_BIT, &prms, status);
if (status != ENET_SOK)
{
EnetAppUtils_print("Failed to set CPTS TS SYNC output bit: %d\r\n", status);
}
}

 

The issue is that the customer's master cannot generate the default 262us (3.81 kHz) high-frequency square wave, while my AM261 slave cannot generate an exact 1-second (PPS) square wave via TS_SYNC. Consequently, we cannot verify synchronization between the master and the slave.

Is there a way to generate a 1-s square wave(PPS) on the AM261? It appears GENF might be capable of this, but I cannot find how to route it to an external pin in SysConfig, nor can I find any corresponding pinmux options in the Datasheet.

If GENF can be used to generate a 1-second square wave, could you please provide the relevant configuration steps or sample code similar to the above? Thanks in advance.

 

Thanks & Best Regards,

Jenney Ni