#[repr(transparent)]pub struct MacTimestampControl(pub u32);Expand description
F70RM Rev. 1 section 51.7.1.27; manual text line 151984.
Tuple Fields§
§0: u32Implementations§
Source§impl MacTimestampControl
impl MacTimestampControl
Sourcepub const fn tsena(&self) -> bool
pub const fn tsena(&self) -> bool
Enable Timestamp. When this bit is set, the timestamp is added for Transmit and Receive packets. When disabled, timestamp is not added for transmit and receive packets and the Timestamp Generator is also suspended. You need to initialize the Timestamp (system time) after enabling this mode. On the Receive side, the MAC processes the 1588 packets only if this bit is set. 0b - Timestamp is disabled 1b - Timestamp is enabled
Sourcepub const fn set_tsena(&mut self, val: bool)
pub const fn set_tsena(&mut self, val: bool)
Enable Timestamp. When this bit is set, the timestamp is added for Transmit and Receive packets. When disabled, timestamp is not added for transmit and receive packets and the Timestamp Generator is also suspended. You need to initialize the Timestamp (system time) after enabling this mode. On the Receive side, the MAC processes the 1588 packets only if this bit is set. 0b - Timestamp is disabled 1b - Timestamp is enabled
Sourcepub const fn tscfupdt(&self) -> bool
pub const fn tscfupdt(&self) -> bool
Fine or Coarse Timestamp Update. When this bit is set, the Fine method is used to update system timestamp. When this bit is reset, Coarse method is used to update the system timestamp. 0b - Coarse method is used to update system timestamp 1b - Fine method is used to update system timestamp
Sourcepub const fn set_tscfupdt(&mut self, val: bool)
pub const fn set_tscfupdt(&mut self, val: bool)
Fine or Coarse Timestamp Update. When this bit is set, the Fine method is used to update system timestamp. When this bit is reset, Coarse method is used to update the system timestamp. 0b - Coarse method is used to update system timestamp 1b - Fine method is used to update system timestamp
Sourcepub const fn tsinit(&self) -> bool
pub const fn tsinit(&self) -> bool
Initialize Timestamp. When this bit is set, the system time is initialized (overwritten) with the value specified in the MAC_System_Time_Seconds_Update and MAC_System_Time_Nanoseconds_Update registers. This bit must be zero before it is updated. This bit is reset when the initialization is complete. The Timestamp Higher Word register (if enabled while configuration the IP) can only be initialized. When Media Clock Generation and Recovery is enabled MAC_Presn_Time_Updt must also be updated before setting this field. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp is not initialized 1b - Timestamp is initialized
Sourcepub const fn set_tsinit(&mut self, val: bool)
pub const fn set_tsinit(&mut self, val: bool)
Initialize Timestamp. When this bit is set, the system time is initialized (overwritten) with the value specified in the MAC_System_Time_Seconds_Update and MAC_System_Time_Nanoseconds_Update registers. This bit must be zero before it is updated. This bit is reset when the initialization is complete. The Timestamp Higher Word register (if enabled while configuration the IP) can only be initialized. When Media Clock Generation and Recovery is enabled MAC_Presn_Time_Updt must also be updated before setting this field. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp is not initialized 1b - Timestamp is initialized
Sourcepub const fn tsupdt(&self) -> bool
pub const fn tsupdt(&self) -> bool
Update Timestamp. When this bit is set, the system time is updated (added or subtracted) with the value specified in MAC_System_Time_Seconds_Update and MAC_System_Time_Nanoseconds_Update registers. This bit must be zero before updating it. This bit is reset when the update is complete in hardware. The Timestamp Higher Word register (if enabled while configuring the IP) is not updated. When Media Clock Generation and Recovery is enabled MAC_Presn_Time_Updt must also be updated before setting this field. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp is not updated 1b - Timestamp is updated
Sourcepub const fn set_tsupdt(&mut self, val: bool)
pub const fn set_tsupdt(&mut self, val: bool)
Update Timestamp. When this bit is set, the system time is updated (added or subtracted) with the value specified in MAC_System_Time_Seconds_Update and MAC_System_Time_Nanoseconds_Update registers. This bit must be zero before updating it. This bit is reset when the update is complete in hardware. The Timestamp Higher Word register (if enabled while configuring the IP) is not updated. When Media Clock Generation and Recovery is enabled MAC_Presn_Time_Updt must also be updated before setting this field. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp is not updated 1b - Timestamp is updated
Sourcepub const fn tstrig(&self) -> bool
pub const fn tstrig(&self) -> bool
Enable Timestamp Interrupt Trigger. When this bit is set, the timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register. This bit is reset after the Timestamp Trigger Interrupt is generated. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp Interrupt Trigger is not enabled 1b - Timestamp Interrupt Trigger is enabled
Sourcepub const fn set_tstrig(&mut self, val: bool)
pub const fn set_tstrig(&mut self, val: bool)
Enable Timestamp Interrupt Trigger. When this bit is set, the timestamp interrupt is generated when the System Time becomes greater than the value written in the Target Time register. This bit is reset after the Timestamp Trigger Interrupt is generated. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Timestamp Interrupt Trigger is not enabled 1b - Timestamp Interrupt Trigger is enabled
Sourcepub const fn tsaddreg(&self) -> bool
pub const fn tsaddreg(&self) -> bool
Update Addend Register. When this bit is set, the content of the Timestamp Addend register is updated in the PTP block for fine correction. This bit is cleared when the update is complete. This bit must be zero before it is set. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Addend Register is not updated 1b - Addend Register is updated
Sourcepub const fn set_tsaddreg(&mut self, val: bool)
pub const fn set_tsaddreg(&mut self, val: bool)
Update Addend Register. When this bit is set, the content of the Timestamp Addend register is updated in the PTP block for fine correction. This bit is cleared when the update is complete. This bit must be zero before it is set. Access restriction applies. Setting 1 sets. Self-cleared. Setting 0 has no effect. NOTE This field is not testable by an automated register test. 0b - Addend Register is not updated 1b - Addend Register is updated
Sourcepub const fn tsenall(&self) -> bool
pub const fn tsenall(&self) -> bool
Enable Timestamp for All Packets. When this bit is set, the timestamp snapshot is enabled for all packets received by the MAC. 0b - Timestamp for All Packets disabled 1b - Timestamp for All Packets enabled
Sourcepub const fn set_tsenall(&mut self, val: bool)
pub const fn set_tsenall(&mut self, val: bool)
Enable Timestamp for All Packets. When this bit is set, the timestamp snapshot is enabled for all packets received by the MAC. 0b - Timestamp for All Packets disabled 1b - Timestamp for All Packets enabled
Sourcepub const fn tsctrlssr(&self) -> bool
pub const fn tsctrlssr(&self) -> bool
Timestamp Digital or Binary Rollover Control. When this bit is set, the Timestamp Low register rolls over after 0x3B9A_C9FF value (that is, 1 nanosecond accuracy) and increments the timestamp (High) seconds. When this bit is reset, the rollover value of sub-second register is 0x7FFF_FFFF. The sub-second increment must be programmed correctly depending on the PTP reference clock frequency and the value of this bit. 0b - Timestamp Digital or Binary Rollover Control is disabled 1b - Timestamp Digital or Binary Rollover Control is enabled
Sourcepub const fn set_tsctrlssr(&mut self, val: bool)
pub const fn set_tsctrlssr(&mut self, val: bool)
Timestamp Digital or Binary Rollover Control. When this bit is set, the Timestamp Low register rolls over after 0x3B9A_C9FF value (that is, 1 nanosecond accuracy) and increments the timestamp (High) seconds. When this bit is reset, the rollover value of sub-second register is 0x7FFF_FFFF. The sub-second increment must be programmed correctly depending on the PTP reference clock frequency and the value of this bit. 0b - Timestamp Digital or Binary Rollover Control is disabled 1b - Timestamp Digital or Binary Rollover Control is enabled
Sourcepub const fn tsver2ena(&self) -> bool
pub const fn tsver2ena(&self) -> bool
Enable PTP Packet Processing for Version 2 Format. When this bit is set, the IEEE 1588 version 2 format is used to process the PTP packets. When this bit is reset, the IEEE 1588 version 1 format is used to process the PTP packets. The IEEE 1588 formats are described in ‘PTP Processing and Control’. 0b - PTP Packet Processing for Version 2 Format is disabled 1b - PTP Packet Processing for Version 2 Format is enabled
Sourcepub const fn set_tsver2ena(&mut self, val: bool)
pub const fn set_tsver2ena(&mut self, val: bool)
Enable PTP Packet Processing for Version 2 Format. When this bit is set, the IEEE 1588 version 2 format is used to process the PTP packets. When this bit is reset, the IEEE 1588 version 1 format is used to process the PTP packets. The IEEE 1588 formats are described in ‘PTP Processing and Control’. 0b - PTP Packet Processing for Version 2 Format is disabled 1b - PTP Packet Processing for Version 2 Format is enabled
Sourcepub const fn tsipena(&self) -> bool
pub const fn tsipena(&self) -> bool
Enable Processing of PTP over Ethernet Packets. When this bit is set, the MAC receiver processes the PTP packets encapsulated directly in the Ethernet packets. When this bit is reset, the MAC ignores the PTP over Ethernet packets. 0b - Processing of PTP over Ethernet Packets is disabled 1b - Processing of PTP over Ethernet Packets is enabled
Sourcepub const fn set_tsipena(&mut self, val: bool)
pub const fn set_tsipena(&mut self, val: bool)
Enable Processing of PTP over Ethernet Packets. When this bit is set, the MAC receiver processes the PTP packets encapsulated directly in the Ethernet packets. When this bit is reset, the MAC ignores the PTP over Ethernet packets. 0b - Processing of PTP over Ethernet Packets is disabled 1b - Processing of PTP over Ethernet Packets is enabled
Sourcepub const fn tsipv6ena(&self) -> bool
pub const fn tsipv6ena(&self) -> bool
Enable Processing of PTP Packets Sent over IPv6-UDP. When this bit is set, the MAC receiver processes the PTP packets encapsulated in IPv6-UDP packets. When this bit is clear, the MAC ignores the PTP transported over IPv6-UDP packets. 0b - Processing of PTP Packets Sent over IPv6-UDP is disabled 1b - Processing of PTP Packets Sent over IPv6-UDP is enabled
Sourcepub const fn set_tsipv6ena(&mut self, val: bool)
pub const fn set_tsipv6ena(&mut self, val: bool)
Enable Processing of PTP Packets Sent over IPv6-UDP. When this bit is set, the MAC receiver processes the PTP packets encapsulated in IPv6-UDP packets. When this bit is clear, the MAC ignores the PTP transported over IPv6-UDP packets. 0b - Processing of PTP Packets Sent over IPv6-UDP is disabled 1b - Processing of PTP Packets Sent over IPv6-UDP is enabled
Sourcepub const fn tsipv4ena(&self) -> bool
pub const fn tsipv4ena(&self) -> bool
Enable Processing of PTP Packets Sent over IPv4-UDP. When this bit is set, the MAC receiver processes the PTP packets encapsulated in IPv4-UDP packets. When this bit is reset, the MAC ignores the PTP transported over IPv4-UDP packets. This bit is set by default. 0b - Processing of PTP Packets Sent over IPv4-UDP is disabled 1b - Processing of PTP Packets Sent over IPv4-UDP is enabled
Sourcepub const fn set_tsipv4ena(&mut self, val: bool)
pub const fn set_tsipv4ena(&mut self, val: bool)
Enable Processing of PTP Packets Sent over IPv4-UDP. When this bit is set, the MAC receiver processes the PTP packets encapsulated in IPv4-UDP packets. When this bit is reset, the MAC ignores the PTP transported over IPv4-UDP packets. This bit is set by default. 0b - Processing of PTP Packets Sent over IPv4-UDP is disabled 1b - Processing of PTP Packets Sent over IPv4-UDP is enabled
Sourcepub const fn tsevntena(&self) -> bool
pub const fn tsevntena(&self) -> bool
Enable Timestamp Snapshot for Event Messages. When this bit is set, the timestamp snapshot is taken only for event messages (SYNC, Delay_Req, Pdelay_Req, or Pdelay_Resp). When this bit is reset, the snapshot is taken for all messages except Announce, Management, and Signaling. For more information about the timestamp snapshots, see Timestamp Snapshot Dependency on Register Bits Table. 0b - Timestamp Snapshot for Event Messages is disabled 1b - Timestamp Snapshot for Event Messages is enabled
Sourcepub const fn set_tsevntena(&mut self, val: bool)
pub const fn set_tsevntena(&mut self, val: bool)
Enable Timestamp Snapshot for Event Messages. When this bit is set, the timestamp snapshot is taken only for event messages (SYNC, Delay_Req, Pdelay_Req, or Pdelay_Resp). When this bit is reset, the snapshot is taken for all messages except Announce, Management, and Signaling. For more information about the timestamp snapshots, see Timestamp Snapshot Dependency on Register Bits Table. 0b - Timestamp Snapshot for Event Messages is disabled 1b - Timestamp Snapshot for Event Messages is enabled
Sourcepub const fn tsmstrena(&self) -> bool
pub const fn tsmstrena(&self) -> bool
Enable Snapshot for Messages Relevant to Master. When this bit is set, the snapshot is taken only for the messages that are relevant to the master node. Otherwise, the snapshot is taken for the messages relevant to the slave node. 0b - Snapshot for Messages Relevant to Master is disabled 1b - Snapshot for Messages Relevant to Master is enabled
Sourcepub const fn set_tsmstrena(&mut self, val: bool)
pub const fn set_tsmstrena(&mut self, val: bool)
Enable Snapshot for Messages Relevant to Master. When this bit is set, the snapshot is taken only for the messages that are relevant to the master node. Otherwise, the snapshot is taken for the messages relevant to the slave node. 0b - Snapshot for Messages Relevant to Master is disabled 1b - Snapshot for Messages Relevant to Master is enabled
Sourcepub const fn snaptypsel(&self) -> u8
pub const fn snaptypsel(&self) -> u8
Select PTP packets for Taking Snapshots. These bits, along with Bits 15 and 14, decide the set of PTP packet types for which snapshot needs to be taken. The encoding is given in Timestamp Snapshot Dependency on Register Bits Table.
Sourcepub const fn set_snaptypsel(&mut self, val: u8)
pub const fn set_snaptypsel(&mut self, val: u8)
Select PTP packets for Taking Snapshots. These bits, along with Bits 15 and 14, decide the set of PTP packet types for which snapshot needs to be taken. The encoding is given in Timestamp Snapshot Dependency on Register Bits Table.
Sourcepub const fn tsenmacaddr(&self) -> bool
pub const fn tsenmacaddr(&self) -> bool
Enable MAC Address for PTP Packet Filtering. When this bit is set, the DA MAC address (that matches any MAC Address register) is used to filter R the PTP packets when PTP is directly sent over Ethernet. When this bit is set, received PTP packets with DA containing a special multicast or unicast address that matches the one programmed in MAC address registers are considered for processing as indicated, when PTP is directly sent over Ethernet. For normal time stamping operation, MAC address registers 0 is considered for unicast destination address matching. 0b - MAC Address for PTP Packet Filtering is disabled 1b - MAC Address for PTP Packet Filtering is enabled
Sourcepub const fn set_tsenmacaddr(&mut self, val: bool)
pub const fn set_tsenmacaddr(&mut self, val: bool)
Enable MAC Address for PTP Packet Filtering. When this bit is set, the DA MAC address (that matches any MAC Address register) is used to filter R the PTP packets when PTP is directly sent over Ethernet. When this bit is set, received PTP packets with DA containing a special multicast or unicast address that matches the one programmed in MAC address registers are considered for processing as indicated, when PTP is directly sent over Ethernet. For normal time stamping operation, MAC address registers 0 is considered for unicast destination address matching. 0b - MAC Address for PTP Packet Filtering is disabled 1b - MAC Address for PTP Packet Filtering is enabled
Sourcepub const fn esti(&self) -> bool
pub const fn esti(&self) -> bool
External System Time Input. When this bit is set, the MAC uses the external 64-bit reference System Time input for the following: - To take the timestamp provided as status When this bit is reset, the MAC uses the internal reference System Time. 0b - External System Time Input is disabled 1b - External System Time Input is enabled
Sourcepub const fn set_esti(&mut self, val: bool)
pub const fn set_esti(&mut self, val: bool)
External System Time Input. When this bit is set, the MAC uses the external 64-bit reference System Time input for the following: - To take the timestamp provided as status When this bit is reset, the MAC uses the internal reference System Time. 0b - External System Time Input is disabled 1b - External System Time Input is enabled
Sourcepub const fn txtsstsm(&self) -> bool
pub const fn txtsstsm(&self) -> bool
Transmit Timestamp Status Mode. When this bit is set, the MAC overwrites the earlier transmit timestamp status even if it is not read by the software. The MAC indicates this by setting the TXTSSMIS bit of the MAC_Tx_Timestamp_Status_Nanoseconds register. When this bit is reset, the MAC ignores the timestamp status of current packet if the timestamp status of previous packet is not read by the software. The MAC indicates this by setting the TXTSSMIS bit of the MAC_Tx_Timestamp_Status_Nanoseconds register. 0b - Transmit Timestamp Status Mode is disabled 1b - Transmit Timestamp Status Mode is enabled
Sourcepub const fn set_txtsstsm(&mut self, val: bool)
pub const fn set_txtsstsm(&mut self, val: bool)
Transmit Timestamp Status Mode. When this bit is set, the MAC overwrites the earlier transmit timestamp status even if it is not read by the software. The MAC indicates this by setting the TXTSSMIS bit of the MAC_Tx_Timestamp_Status_Nanoseconds register. When this bit is reset, the MAC ignores the timestamp status of current packet if the timestamp status of previous packet is not read by the software. The MAC indicates this by setting the TXTSSMIS bit of the MAC_Tx_Timestamp_Status_Nanoseconds register. 0b - Transmit Timestamp Status Mode is disabled 1b - Transmit Timestamp Status Mode is enabled
Sourcepub const fn av8021asmen(&self) -> bool
pub const fn av8021asmen(&self) -> bool
AV 802.1AS Mode Enable. When this bit is set, the MAC processes only untagged PTP over Ethernet packets for providing PTP status and capturing timestamp snapshots, that is, IEEE 802.1AS mode of operation. 0b - AV 802.1AS Mode is disabled 1b - AV 802.1AS Mode is enabled
Sourcepub const fn set_av8021asmen(&mut self, val: bool)
pub const fn set_av8021asmen(&mut self, val: bool)
AV 802.1AS Mode Enable. When this bit is set, the MAC processes only untagged PTP over Ethernet packets for providing PTP status and capturing timestamp snapshots, that is, IEEE 802.1AS mode of operation. 0b - AV 802.1AS Mode is disabled 1b - AV 802.1AS Mode is enabled
Trait Implementations§
Source§impl Clone for MacTimestampControl
impl Clone for MacTimestampControl
Source§fn clone(&self) -> MacTimestampControl
fn clone(&self) -> MacTimestampControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more