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.
| 3196 | // |
| 3197 | //***************************************************************************** |
| 3198 | void |
| 3199 | EMACTimestampConfigSet(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 | // |