nxp-pac

Crates

git

Versions

mcxa536

Flavors

MacTimestampControl

Struct MacTimestampControl 

Source
#[repr(transparent)]
pub struct MacTimestampControl(pub u32);
Expand description

F70RM Rev. 1 section 51.7.1.27; manual text line 151984.

Tuple Fields§

§0: u32

Implementations§

Source§

impl MacTimestampControl

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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.

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source§

fn clone(&self) -> MacTimestampControl

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MacTimestampControl

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MacTimestampControl

Source§

fn default() -> MacTimestampControl

Returns the “default value” for a type. Read more
Source§

impl PartialEq for MacTimestampControl

Source§

fn eq(&self, other: &MacTimestampControl) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for MacTimestampControl

Source§

impl Eq for MacTimestampControl

Source§

impl StructuralPartialEq for MacTimestampControl

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.