Using the PHY RGMII Clock-to-Data Delay (Trion only)

For Trion devices, you can control the transmit and receive clock delay of the PHY through the Sapphire SoC software driver.

This is done using the PhyDlySetRXTX() function in the main.c file.

To adjust the TX_delay and RX_delay, modify the function call in: \embedded_sw\sapphire\software\standalone\tseDemo\src\main.c

This method allows flexible software-level tuning of the PHY delay values to achieve optimal RGMII clock-to-data alignment for both transmit and receive paths.

Figure 1. Defining Delay in main.c Function File
void main() {
    u32 prompt=0;
    u32 speed;

    PhyNego(1);	
    bsp_init();
    if(TEST_MODE == 1){
    	bsp_print("===   TSEMAC Example Design in Linked-Partner Mode   ===");
    } else {
    	bsp_print("===   TSEMAC Example Design in Normal Mode   ===");
    }
    PhyDlySetRXTX(8, 0); //change PHY RX_Delay and Tx_Delay settings here
    speed = PhyNormalInit();
    MacNormalInit(speed);
    StartRunning();
}
Table 1. RX_delay and TX_delay Delay Settings
Delays Values Description
RX_delay 0 – 15 Clock to data setup delay for RGMII RX path with 1000 Mbps. Recommended values:
  • 0: Smallest delay of around 0.81 ns
  • 2: Delay of around 1.1 ns
  • 8: Delay of around 2.17 ns
  • 15: Largest delay of around 2.92 ns
TX_delay 0 – 15 Clock to data setup delay for RGMII TX path with 1000 Mbps. Recommended values:
  • 0: Smallest delay of around 0.021 ns
  • 2: Delay of around 0.4 ns
  • 8: Delay of around 1.7 ns
  • 15: Largest delay of around 3.3 ns