MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / EMACTimestampEnable

Function EMACTimestampEnable

bsp/tm4c129x/libraries/driverlib/emac.c:3323–3345  ·  view source on GitHub ↗

Enables packet timestamping and starts the system clock running. \param ui32Base is the base address of the controller. This function is used to enable the system clock used to timestamp Ethernet frames and to enable that timestamping. \return None.

Source from the content-addressed store, hash-verified

3321//
3322//*****************************************************************************
3323void
3324EMACTimestampEnable(uint32_t ui32Base)
3325{
3326 //
3327 // Parameter sanity check.
3328 //
3329 ASSERT(ui32Base == EMAC0_BASE);
3330
3331 //
3332 // Enable IEEE 1588 timestamping.
3333 //
3334 HWREG(ui32Base + EMAC_O_TIMSTCTRL) |= EMAC_TIMSTCTRL_TSEN;
3335
3336 //
3337 // If necessary, initialize the timestamping system. This bit self-clears
3338 // once the system time is loaded. Only do this if initialization is not
3339 // currently ongoing.
3340 //
3341 if(!(HWREG(ui32Base + EMAC_O_TIMSTCTRL) & EMAC_TIMSTCTRL_TSINIT))
3342 {
3343 HWREG(ui32Base + EMAC_O_TIMSTCTRL) |= EMAC_TIMSTCTRL_TSINIT;
3344 }
3345}
3346
3347//*****************************************************************************
3348//

Callers 1

tivaif_hwinitFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected