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

Function EMACTimestampAddendSet

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

Adjusts the system time update rate when using the fine correction method. \param ui32Base is the base address of the controller. \param ui32Increment is the number to add to the accumulator register on each tick of the 25-MHz main oscillator. This function is used to control the rate of update of the system time when in fine update mode. Fine correction mode is selected if \e EMAC_TS_UPDATE_FI

Source from the content-addressed store, hash-verified

3561//
3562//*****************************************************************************
3563void
3564EMACTimestampAddendSet(uint32_t ui32Base, uint32_t ui32Increment)
3565{
3566 //
3567 // Parameter sanity check.
3568 //
3569 ASSERT(ui32Base == EMAC0_BASE);
3570
3571 HWREG(ui32Base + EMAC_O_TIMADD) = ui32Increment;
3572
3573 //
3574 // Wait for any previous update to complete.
3575 //
3576 while(HWREG(ui32Base + EMAC_O_TIMSTCTRL) & EMAC_TIMSTCTRL_ADDREGUP)
3577 {
3578 //
3579 // Spin for a while.
3580 //
3581 }
3582
3583 //
3584 // Force the system clock to update by the value provided.
3585 //
3586 HWREG(ui32Base + EMAC_O_TIMSTCTRL) |= EMAC_TIMSTCTRL_ADDREGUP;
3587}
3588
3589//*****************************************************************************
3590//

Callers 1

tivaif_hwinitFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected