I am trying to use the DP83640 chip to implement PTP-V1 in a FPGA embedded system architecture.
The issue encountered is that the DP83640 will not insert the transmit timestamp into the PTP sync message. The issue most likely lies in the configuration of the DP chip.
The chip is configured as follows:
// Configure PHY Chip
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PAGESEL, 0); // Page 0
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PHYCR, 0x8041 ); // Enable Auto-MDIX. Set LEDs to mode 3. Set Phy Port to 1clkSrc
clkSrc = 0; // Use internal 125MHz clock with no division
clkSrcPeriodNanoSec = 0;
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PAGESEL, 0x6); // Select Page 6
reg = (((uint16_t)clkSrc) << 14) | (uint16_t)clkSrcPeriodNanoSec;
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PTP_CLKSRC, reg);
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PAGESEL, 0x05);
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PTP_TXCFG0, 0xAEE1); //Sync 1 step = 1, delay req insertion = 1, ignore 2 step = 1, check one step = 1, crc correction = 1,
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PTP_RXCFG0, 0x01E1 ); //ip domain 224.0.1.129
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PTP_RXCFG3, 0x0D00 ); // PTP Rx Configuration Register 3: Set Rx timestamp insertion (bit 8) and keep TS on error
emac32_write_md( pDev->pEmac32Drv, PHY_REG_PTP_RXCFG4, 0x7B28 ); // timestamp seconds insert offset 40, nanoseconds offset 44
Thanks for your time all recommendations welcome.
--N