Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing rtr flag setup on embassy_stm32 #3413

Open
shestakovvv opened this issue Oct 11, 2024 · 1 comment
Open

Missing rtr flag setup on embassy_stm32 #3413

shestakovvv opened this issue Oct 11, 2024 · 1 comment

Comments

@shestakovvv
Copy link

embassy/embassy-stm32/src/can/bxcan/registers.rs:
...
    fn write_mailbox(&self, idx: usize, frame: &Frame) {
        debug_assert!(idx < 3);

        let mb = self.0.tx(idx);
        mb.tdtr().write(|w| w.set_dlc(frame.header().len() as u8));

        mb.tdlr()
            .write(|w| w.0 = u32::from_ne_bytes(unwrap!(frame.data()[0..4].try_into())));
        mb.tdhr()
            .write(|w| w.0 = u32::from_ne_bytes(unwrap!(frame.data()[4..8].try_into())));
        let id: IdReg = frame.id().into();
        mb.tir().write(|w| {
            w.0 = id.0;
            w.set_txrq(true);
            // if frame.header().rtr() {
            //    w.set_rtr(Rtr::REMOTE);
            // }
        });
    }
...
@Dirbaio
Copy link
Member

Dirbaio commented Oct 13, 2024

can you send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants