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

Function EMACTimestampConfigSet

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

Configures the Ethernet MAC's IEEE 1588 timestamping options. \param ui32Base is the base address of the controller. \param ui32Config contains flags selecting particular configuration options. \param ui32SubSecondInc is the number that the IEEE 1588 subsecond clock should increment on each tick. This function is used to configure the operation of the Ethernet MAC's internal timestamping clock.

Source from the content-addressed store, hash-verified

3196//
3197//*****************************************************************************
3198void
3199EMACTimestampConfigSet(uint32_t ui32Base, uint32_t ui32Config,
3200 uint32_t ui32SubSecondInc)
3201{
3202 //
3203 // Parameter sanity check.
3204 //
3205 ASSERT(ui32Base == EMAC0_BASE);
3206
3207 //
3208 // Ensure that the PTP module clock is enabled.
3209 //
3210 HWREG(ui32Base + EMAC_O_CC) |= EMAC_CC_PTPCEN;
3211
3212 //
3213 // Write the subsecond increment value.
3214 //
3215 HWREG(ui32Base + EMAC_O_SUBSECINC) = ((ui32SubSecondInc <<
3216 EMAC_SUBSECINC_SSINC_S) &
3217 EMAC_SUBSECINC_SSINC_M);
3218
3219 //
3220 // Set the timestamp configuration.
3221 //
3222 HWREG(ui32Base + EMAC_O_TIMSTCTRL) = ui32Config;
3223}
3224
3225//*****************************************************************************
3226//

Callers 1

tivaif_hwinitFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected