Struct ChTr2
#[repr(transparent)]pub struct ChTr2(pub u32);Expand description
LPDMA channel x transfer register 2
Tuple Fields§
§0: u32Implementations§
§impl ChTr2
impl ChTr2
pub const fn reqsel(&self) -> u8
pub const fn reqsel(&self) -> u8
LPDMA hardware request selection (REQSEL[4:0] on STM32U5, REQSEL[5:0] on STM32WBA2, REQSEL[6:0] on STM32C5). These bits are ignored if channel x is activated (CH[x].CR.EN asserted) with SWREQ = 1 (software request for a memory-to-memory transfer). The user must not assign a same input hardware request (same REQSEL value) to different active LPDMA channels (CH[x].CR.EN = 1 and CH[x].TR2.SWREQ = 0 for these channels). LPDMA is not intended to hardware support the case of simultaneous enabled channels incorrectly configured with a same hardware peripheral request signal, and there is no user setting error reporting.
pub const fn set_reqsel(&mut self, val: u8)
pub const fn set_reqsel(&mut self, val: u8)
LPDMA hardware request selection (REQSEL[4:0] on STM32U5, REQSEL[5:0] on STM32WBA2, REQSEL[6:0] on STM32C5). These bits are ignored if channel x is activated (CH[x].CR.EN asserted) with SWREQ = 1 (software request for a memory-to-memory transfer). The user must not assign a same input hardware request (same REQSEL value) to different active LPDMA channels (CH[x].CR.EN = 1 and CH[x].TR2.SWREQ = 0 for these channels). LPDMA is not intended to hardware support the case of simultaneous enabled channels incorrectly configured with a same hardware peripheral request signal, and there is no user setting error reporting.
pub const fn swreq(&self) -> Swreq
pub const fn swreq(&self) -> Swreq
software request. This bit is internally taken into account when CH[x].CR.EN is asserted.
pub const fn set_swreq(&mut self, val: Swreq)
pub const fn set_swreq(&mut self, val: Swreq)
software request. This bit is internally taken into account when CH[x].CR.EN is asserted.
pub const fn breq(&self) -> Breq
pub const fn breq(&self) -> Breq
Block hardware request. If the channel x is activated (CH[x].CR.EN asserted) with SWREQ = 1 (software request for a memory-to-memory transfer), this bit is ignored.
pub const fn set_breq(&mut self, val: Breq)
pub const fn set_breq(&mut self, val: Breq)
Block hardware request. If the channel x is activated (CH[x].CR.EN asserted) with SWREQ = 1 (software request for a memory-to-memory transfer), this bit is ignored.
pub const fn pfreq(&self) -> bool
pub const fn pfreq(&self) -> bool
Hardware request in peripheral flow control mode. 0 = the block transfer completion is controlled by LPDMA (CH[x].BR1.BNDT), 1 = the block transfer can be early completed by the peripheral itself. Ignored if SWREQ = 1. Only on STM32C5, and only on the channels implemented with peripheral early termination (otherwise reserved).
pub const fn set_pfreq(&mut self, val: bool)
pub const fn set_pfreq(&mut self, val: bool)
Hardware request in peripheral flow control mode. 0 = the block transfer completion is controlled by LPDMA (CH[x].BR1.BNDT), 1 = the block transfer can be early completed by the peripheral itself. Ignored if SWREQ = 1. Only on STM32C5, and only on the channels implemented with peripheral early termination (otherwise reserved).
pub const fn trigm(&self) -> Trigm
pub const fn trigm(&self) -> Trigm
trigger mode. These bits define the transfer granularity for its conditioning by the trigger. If the channel x is enabled (CH[x].CR.EN asserted) with TRIGPOL[1:0] = 00 or 11, these TRIGM[1:0] bits are ignored. Else, a LPDMA transfer is conditioned by at least one trigger hit. The LPDMA monitoring of a trigger for channel x is started when the channel is enabled/loaded with a new active trigger configuration: rising or falling edge on a selected trigger (TRIGPOL[1:0] = 01 or respectively TRIGPOL[1:0] = 10). The monitoring of this trigger is kept active during the triggered and uncompleted (data or link) transfer; and if a new trigger is detected then, this hit is internally memorized to grant the next transfer, as long as the defined rising or falling edge is not modified, and the TRIGSEL is not modified, and the channel is enabled. Transferring a next LLIn+1 that updates the CH[x].TR2 with a new value for any of TRIGSEL or TRIGPOL[1:0], resets the monitoring, trashing the memorized hit of the formerly defined LLIn trigger. After a first new trigger hitn+1 is memorized, if another second trigger hitn+2 is detected and if the hitn triggered transfer is still not completed, hitn+2 is lost and not memorized. A trigger overrun flag is reported (CH[x].SR.TOF =1 ), and an interrupt is generated if enabled (CH[x].CR.TOIE = 1). The channel is not automatically disabled by hardware due to a trigger overrun.
pub const fn set_trigm(&mut self, val: Trigm)
pub const fn set_trigm(&mut self, val: Trigm)
trigger mode. These bits define the transfer granularity for its conditioning by the trigger. If the channel x is enabled (CH[x].CR.EN asserted) with TRIGPOL[1:0] = 00 or 11, these TRIGM[1:0] bits are ignored. Else, a LPDMA transfer is conditioned by at least one trigger hit. The LPDMA monitoring of a trigger for channel x is started when the channel is enabled/loaded with a new active trigger configuration: rising or falling edge on a selected trigger (TRIGPOL[1:0] = 01 or respectively TRIGPOL[1:0] = 10). The monitoring of this trigger is kept active during the triggered and uncompleted (data or link) transfer; and if a new trigger is detected then, this hit is internally memorized to grant the next transfer, as long as the defined rising or falling edge is not modified, and the TRIGSEL is not modified, and the channel is enabled. Transferring a next LLIn+1 that updates the CH[x].TR2 with a new value for any of TRIGSEL or TRIGPOL[1:0], resets the monitoring, trashing the memorized hit of the formerly defined LLIn trigger. After a first new trigger hitn+1 is memorized, if another second trigger hitn+2 is detected and if the hitn triggered transfer is still not completed, hitn+2 is lost and not memorized. A trigger overrun flag is reported (CH[x].SR.TOF =1 ), and an interrupt is generated if enabled (CH[x].CR.TOIE = 1). The channel is not automatically disabled by hardware due to a trigger overrun.
pub const fn trigsel(&self) -> u8
pub const fn trigsel(&self) -> u8
trigger event input selection (TRIGSEL[4:0] on STM32U5 and STM32WBA2, TRIGSEL[5:0] on STM32C5). These bits select the trigger event input of the LPDMA transfer, with an active trigger event if TRIGPOL[1:0] ≠ 00.
pub const fn set_trigsel(&mut self, val: u8)
pub const fn set_trigsel(&mut self, val: u8)
trigger event input selection (TRIGSEL[4:0] on STM32U5 and STM32WBA2, TRIGSEL[5:0] on STM32C5). These bits select the trigger event input of the LPDMA transfer, with an active trigger event if TRIGPOL[1:0] ≠ 00.
pub const fn trigpol(&self) -> Trigpol
pub const fn trigpol(&self) -> Trigpol
trigger event polarity. These bits define the polarity of the selected trigger event input defined by TRIGSEL.
pub const fn set_trigpol(&mut self, val: Trigpol)
pub const fn set_trigpol(&mut self, val: Trigpol)
trigger event polarity. These bits define the polarity of the selected trigger event input defined by TRIGSEL.
pub const fn tcem(&self) -> Tcem
pub const fn tcem(&self) -> Tcem
transfer complete event mode. These bits define the transfer granularity for the transfer complete and half transfer complete events generation. Note: If the initial LLI0 data transfer is null/void (directly programmed by the internal register file with CH[x].BR1.BNDT[15:0] = 0), then neither the complete transfer event nor the half transfer event is generated in block mode; in LLI mode the half transfer event is not generated, and the transfer complete event is generated when is completed the loading of the LLI1.
pub const fn set_tcem(&mut self, val: Tcem)
pub const fn set_tcem(&mut self, val: Tcem)
transfer complete event mode. These bits define the transfer granularity for the transfer complete and half transfer complete events generation. Note: If the initial LLI0 data transfer is null/void (directly programmed by the internal register file with CH[x].BR1.BNDT[15:0] = 0), then neither the complete transfer event nor the half transfer event is generated in block mode; in LLI mode the half transfer event is not generated, and the transfer complete event is generated when is completed the loading of the LLI1.