aboutsummaryrefslogtreecommitdiffstats
path: root/src/atsamd/fdcan.c
diff options
context:
space:
mode:
authorLuke V <wulfstawulfsta@gmail.com>2023-06-16 16:41:08 -0400
committerGitHub <noreply@github.com>2023-06-16 16:41:08 -0400
commit9cb2656914ce90745a04048090cf512c7164e821 (patch)
tree7086c3521bb766dc689099e8766d4d19c733f40e /src/atsamd/fdcan.c
parent5ee72d320cade30aee62c532fbcac79f66c27258 (diff)
downloadkutter-9cb2656914ce90745a04048090cf512c7164e821.tar.gz
kutter-9cb2656914ce90745a04048090cf512c7164e821.tar.xz
kutter-9cb2656914ce90745a04048090cf512c7164e821.zip
atsamd: Fixes for samc21 and compiler optimizations (#6198)
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
Diffstat (limited to 'src/atsamd/fdcan.c')
-rw-r--r--src/atsamd/fdcan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/atsamd/fdcan.c b/src/atsamd/fdcan.c
index 7c3e6b65..5ad62c0f 100644
--- a/src/atsamd/fdcan.c
+++ b/src/atsamd/fdcan.c
@@ -119,7 +119,8 @@ canhw_send(struct canbus_msg *msg)
txfifo->dlc_section = (msg->dlc & 0x0f) << 16;
txfifo->data[0] = msg->data32[0];
txfifo->data[1] = msg->data32[1];
- barrier();
+ __DMB();
+ CANx->TXBAR.reg;
CANx->TXBAR.reg = ((uint32_t)1 << w_index);
return CANMSG_DATA_LEN(msg);
}