stm32: can: fd: only TX with BRS if also TXing with FDF

This commit is contained in:
Torin Cooper-Bennun 2024-02-27 10:38:40 +00:00
parent e63b0d7a2f
commit 9a4f58fe15

View file

@ -739,7 +739,7 @@ fn put_tx_header(mailbox: &mut TxBufferElement, header: &Header) {
} else { } else {
FrameFormat::Classic FrameFormat::Classic
}; };
let brs = header.len() > 8 || header.bit_rate_switching(); let brs = (frame_format == FrameFormat::Fdcan) && header.bit_rate_switching();
mailbox.header.write(|w| { mailbox.header.write(|w| {
unsafe { w.id().bits(id) } unsafe { w.id().bits(id) }