Skip to content

embassy-stm32: bxcan nart flag may be inverted #5369

@hatomist

Description

@hatomist

If i understand the register setting logic here, embassy does not apply the automatic retransmit flag correctly. enable flag should be inverted to set non automatic retransmission flag to desired mode

/// Enables or disables automatic retransmission of messages.
///
/// If this is enabled, the CAN peripheral will automatically try to retransmit each frame
/// until it can be sent. Otherwise, it will try only once to send each frame.
///
/// Automatic retransmission is enabled by default.
pub fn set_automatic_retransmit(&self, enabled: bool) {
self.0.mcr().modify(|reg| reg.set_nart(enabled));
}

From stm32 reference manual:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions