diff options
| author | Torin Cooper-Bennun <[email protected]> | 2024-02-27 10:38:40 +0000 |
|---|---|---|
| committer | Torin Cooper-Bennun <[email protected]> | 2024-02-27 10:38:40 +0000 |
| commit | 9a4f58fe158551bd0c38d23a71f6b719d4ce5130 (patch) | |
| tree | fd26699c73ba2504d45fb8767387cab409cfbc68 | |
| parent | e63b0d7a2f89e3b210569ce77f45e9cb14ac6ae8 (diff) | |
stm32: can: fd: only TX with BRS if also TXing with FDF
| -rw-r--r-- | embassy-stm32/src/can/fd/peripheral.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/can/fd/peripheral.rs b/embassy-stm32/src/can/fd/peripheral.rs index 8e4ecf4a5..9c29e4887 100644 --- a/embassy-stm32/src/can/fd/peripheral.rs +++ b/embassy-stm32/src/can/fd/peripheral.rs | |||
| @@ -739,7 +739,7 @@ fn put_tx_header(mailbox: &mut TxBufferElement, header: &Header) { | |||
| 739 | } else { | 739 | } else { |
| 740 | FrameFormat::Classic | 740 | FrameFormat::Classic |
| 741 | }; | 741 | }; |
| 742 | let brs = header.len() > 8 || header.bit_rate_switching(); | 742 | let brs = (frame_format == FrameFormat::Fdcan) && header.bit_rate_switching(); |
| 743 | 743 | ||
| 744 | mailbox.header.write(|w| { | 744 | mailbox.header.write(|w| { |
| 745 | unsafe { w.id().bits(id) } | 745 | unsafe { w.id().bits(id) } |
