pub struct Ctrl(pub u32);
Expand description
CTRL/STAT, Control/Status register (see ADI v5.2 B2.2.2)
Tuple Fields§
§0: u32
Implementations§
Source§impl Ctrl
impl Ctrl
Sourcepub fn csyspwrupack(&self) -> bool
pub fn csyspwrupack(&self) -> bool
System powerup acknowledge. Indicates the status of the CSYSPWRUPACK signal. See Power control requirements and operation on page B2-78.
Sourcepub fn csyspwrupreq(&self) -> bool
pub fn csyspwrupreq(&self) -> bool
System powerup request. This bit controls the CSYSPWRUPREQ signal. See Power control requirements and operation on page B2-78.
Sourcepub fn cdbgpwrupack(&self) -> bool
pub fn cdbgpwrupack(&self) -> bool
Debug powerup acknowledge. Indicates the status of the CDBGPWRUPACK signal. See Power control requirements and operation on page B2-78.
Sourcepub fn cdbgpwrupreq(&self) -> bool
pub fn cdbgpwrupreq(&self) -> bool
Debug powerup request. This bit controls the CDBGPWRUPREQ signal. See Power control requirements and operation on page B2-78.
Sourcepub fn cdbgrstack(&self) -> bool
pub fn cdbgrstack(&self) -> bool
Debug reset acknowledge. Indicates the status of the CDBGRSTACK signal. See Debug reset control behavior on page B2-81.
Sourcepub fn c_dbg_rst_req(&self) -> bool
pub fn c_dbg_rst_req(&self) -> bool
Debug reset request. This bit controls the CDBGRSTREQ signal. See Debug reset control request on page B2-82.
After a powerup reset, this bit is 0b0
.
Sourcepub fn errmode(&self) -> bool
pub fn errmode(&self) -> bool
Error mode. Indicates the reset behavior of the CTRL/STAT.STICKYERR field.
If true, CTRL/STAT.STICKYERR is cleared when a FAULT response is output.
After a powerup reset, the value of this field is false.
This bit only exists on DPv3 (see ADIv6 B2.2.3), it is RES0 on previous DP versions. Its value should therefore be ignored and written as 0.
Sourcepub fn trn_cnt(&self) -> u16
pub fn trn_cnt(&self) -> u16
Transaction counter. See The transaction counter on page B1-43. After a powerup reset, the value of this field is UNKNOWN.
It is IMPLEMENTATION DEFINED whether this field is implemented.
TRNCNT is not supported in MINDP configuration. In MINDP configuration, the effect of writing a value other than zero to TRNCNT or TRNMODE is UNPREDICTABLE. See also MINDP, Minimal DP extension on page B1-40.
Sourcepub fn mask_lane(&self) -> u8
pub fn mask_lane(&self) -> u8
For pushed operations, the DP performs a byte-by-byte comparison of the word that is supplied in an AP write transaction with the current word at the target AP address. The MASKLANE field is used to select the bytes to be included in this comparison. For more information about pushed operations, see Pushed-compare and pushed-verify operations on page B1-44.
Each of the four bits of the MASKLANE field corresponds to one of the four bytes of the words to be compared. Therefore, each bit is said to control one byte lane of the compare operation.
Table B2-8 shows how the bits of MASKLANE control the comparison masking.
Sourcepub fn w_data_err(&self) -> bool
pub fn w_data_err(&self) -> bool
This bit is set to 0b1
if one of the following Write Data Error occurs:
- A parity or framing error on the data phase of a write.
- A write that has been accepted by the DP is then discarded without being submitted to the AP. For more information, see Sticky flags and DP error responses on page B1-41.
Access to and how to clear this field are DATA LINK DEFINED:
JTAG-DP, all implementations
- Access is reserved, RES0.
SW-DP, all implementations, and JTAG-DP, DPv1 and higher
- Access is RO/WI.
- To clear WDATAERR to
0b0
, write 0b1 to the ABORT.WDERRCLR field in the ABORT register. A single write of the ABORT register can be used to clear multiple flags if necessary.
After clearing the WDATAERR flag, you must typically resend the corrupted data. After a powerup reset, WDATAERR is 0b0
.
Sourcepub fn read_ok(&self) -> bool
pub fn read_ok(&self) -> bool
This bit is DATA LINK DEFINED
- On JTAG-DP, the bit is reserved, RES0.\
- On SW-DP, access is RO/WI.
If the response to the previous AP read or RDBUFF read was OK, the bit is set to 0b1. If the response was not OK, it is cleared to 0b0
.
This flag always indicates the response to the last AP read access. See Protocol error response on page B4-114.
After a powerup reset, this bit is 0b0
.
Note
This field is defined for DPv1 and higher only.
Sourcepub fn sticky_err(&self) -> bool
pub fn sticky_err(&self) -> bool
This bit is set to 0b1 if an error is returned by an AP transaction. See Sticky flags and DP error responses on page B1-41.
Access to and how to clear this field are DATA LINK DEFINED:
JTAG-DP, all implementations
- Access is R/W1C.
- To clear STICKYERR to 0b0, write 0b1 to it, which signals the DP to clear the flag and set it to 0b0. A single write of the CTRL/STAT register can be used to clear multiple flags if necessary.
STICKYERR can also be cleared using the ABORT.STKERRCLR field.
SW-DP, all implementations, and JTAG-DP, DPv1 and higher
- Access is RO/WI.
- To clear STICKYERR to 0b0, write 0b1 to the ABORT.STKERRCLR field in the ABORT register. A single write of the ABORT register can be used to clear multiple flags if necessary.
After clearing CTRL/STAT.STICKYERR, you must find the location where the error that caused the flag to be set occurred.
After a powerup reset, this bit is 0b0
.
Sourcepub fn stick_cmp(&self) -> bool
pub fn stick_cmp(&self) -> bool
This bit is set to 0b1 when a mismatch occurs during a pushed-compare operation or a match occurs during a pushed-verify operation. See Pushed-compare and pushed-verify operations on page B1-44. It is IMPLEMENTATION DEFINED whether this field is implemented. See MINDP, Minimal DP extension on page B1-40. Access to and how to clear this field are DATA LINK DEFINED:
JTAG-DP, all implementations
- Access is R/W1C.
- To clear STICKYCMP to 0b0, write 0b1 to it, which signals the DP to clear the flag and set it to 0b0. A single write of the CTRL/STAT register can be used to clear multiple flags if necessary. STICKYCMP can also be cleared using the ABORT.STKERRCLR field.
SW-DP, all implementations, and JTAG-DP, DPv1 and higher
- Access is RO/WI. B2 DP Reference Information B2.2 DP register descriptions
- To clear STICKYCMP to 0b0, write 0b1 to the ABORT.STKCMPCLR field in the ABORT register. A single write of the ABORT register can be used to clear multiple flags if necessary. After clearing STICKYCMP, you must retrieve the value of the transaction counter to find the location where the error that caused the flag to be set occurred.
After a powerup reset, this bit is 0b0
.
Sourcepub fn trn_mode(&self) -> u8
pub fn trn_mode(&self) -> u8
This field sets the transfer mode for AP operations. In normal operation, AP transactions are passed to the AP for processing, as described in Using the AP to access debug resources on page A1-31. In pushed-verify and pushed-compare operations, the DP compares the value that is supplied in an AP write transaction with the value held in the target AP address. The AP write transaction generates a read access to the debug memory system as described in Pushed-compare and pushed-verify operations on page B1-44.
TRNMODE can have one of the following values:
0b00
: Normal operation.
0b01
: Pushed-verify mode.
0b10
: Pushed-compare mode.
0b11
: Reserved.
After a powerup reset, the value of this field is UNKNOWN.
Note
It is IMPLEMENTATION DEFINED whether this field is implemented.
TRNMODE is not supported in MINDP configuration. In MINDP configuration, the effect of writing a value other than zero to TRNCNT or TRNMODE is UNPREDICTABLE. See also MINDP, Minimal DP extension on page B1-40.
Sourcepub fn sticky_orun(&self) -> bool
pub fn sticky_orun(&self) -> bool
If overrun detection is enabled, this bit is set to 0b1 when an overrun occurs. See bit[0] of this register for details of enabling overrun detection. Access to and how to clear this field are DATA LINK DEFINED:
JTAG-DP, all implementations
- Access is R/W1C.
- To clear STICKYORUN to 0b0, write 0b1 to it, which signals the DP to clear the flag and set it to 0b0. A single write of the CTRL/STAT register can be used to clear multiple flags if necessary. STICKYORUN can also be cleared using the ABORT.STKERRCLR field. SW-DP, all implementations, and JTAG-DP, DPv1 and higher
- Access is RO/WI.
- To clear STICKYORUN to 0b0, write 0b1 to the ABORT.ORUNERRCLR field in the ABORT register.
A single write of the ABORT register can be used to clear multiple flags if necessary. After clearing STICKYORUN, you must find out which DP or AP transaction initiated the overrun that caused the flag to be set, and repeat the transactions for that DP or AP from the transaction pointed to by the transaction counter.
After a powerup reset, this bit is 0b0.
Sourcepub fn orun_detect(&self) -> bool
pub fn orun_detect(&self) -> bool
This bit can have one of the following values:
0b0
: Overrun detection is disabled.
0b1
: Overrun detection is enabled.
For more information about overrun detection, see Sticky flags and DP error responses on page B1-41.
After a powerup reset, this bit is 0b0.
Sourcepub fn set_csyspwrupreq(&mut self, value: bool)
pub fn set_csyspwrupreq(&mut self, value: bool)
System powerup request. This bit controls the CSYSPWRUPREQ signal. See Power control requirements and operation on page B2-78.
Sourcepub fn set_cdbgpwrupreq(&mut self, value: bool)
pub fn set_cdbgpwrupreq(&mut self, value: bool)
Debug powerup request. This bit controls the CDBGPWRUPREQ signal. See Power control requirements and operation on page B2-78.
Sourcepub fn set_c_dbg_rst_req(&mut self, value: bool)
pub fn set_c_dbg_rst_req(&mut self, value: bool)
Debug reset request. This bit controls the CDBGRSTREQ signal. See Debug reset control request on page B2-82.
After a powerup reset, this bit is 0b0
.
Sourcepub fn set_errmode(&mut self, value: bool)
pub fn set_errmode(&mut self, value: bool)
Error mode. Indicates the reset behavior of the CTRL/STAT.STICKYERR field.
If true, CTRL/STAT.STICKYERR is cleared when a FAULT response is output.
After a powerup reset, the value of this field is false.
This bit only exists on DPv3 (see ADIv6 B2.2.3), it is RES0 on previous DP versions. Its value should therefore be ignored and written as 0.
Sourcepub fn set_trn_cnt(&mut self, value: u16)
pub fn set_trn_cnt(&mut self, value: u16)
Transaction counter. See The transaction counter on page B1-43. After a powerup reset, the value of this field is UNKNOWN.
It is IMPLEMENTATION DEFINED whether this field is implemented.
TRNCNT is not supported in MINDP configuration. In MINDP configuration, the effect of writing a value other than zero to TRNCNT or TRNMODE is UNPREDICTABLE. See also MINDP, Minimal DP extension on page B1-40.
Sourcepub fn set_mask_lane(&mut self, value: u8)
pub fn set_mask_lane(&mut self, value: u8)
For pushed operations, the DP performs a byte-by-byte comparison of the word that is supplied in an AP write transaction with the current word at the target AP address. The MASKLANE field is used to select the bytes to be included in this comparison. For more information about pushed operations, see Pushed-compare and pushed-verify operations on page B1-44.
Each of the four bits of the MASKLANE field corresponds to one of the four bytes of the words to be compared. Therefore, each bit is said to control one byte lane of the compare operation.
Table B2-8 shows how the bits of MASKLANE control the comparison masking.
Sourcepub fn set_orun_detect(&mut self, value: bool)
pub fn set_orun_detect(&mut self, value: bool)
This bit can have one of the following values:
0b0
: Overrun detection is disabled.
0b1
: Overrun detection is enabled.
For more information about overrun detection, see Sticky flags and DP error responses on page B1-41.
After a powerup reset, this bit is 0b0.
Trait Implementations§
Source§impl<T> BitRangeMut<T> for Ctrlwhere
u32: BitRangeMut<T>,
impl<T> BitRangeMut<T> for Ctrlwhere
u32: BitRangeMut<T>,
Source§fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
Source§impl DpRegister for Ctrl
impl DpRegister for Ctrl
Source§const VERSION: DebugPortVersion = DebugPortVersion::DPv1
const VERSION: DebugPortVersion = DebugPortVersion::DPv1
Auto Trait Implementations§
impl Freeze for Ctrl
impl RefUnwindSafe for Ctrl
impl Send for Ctrl
impl Sync for Ctrl
impl Unpin for Ctrl
impl UnwindSafe for Ctrl
Blanket Implementations§
Source§impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.