From b46b129bbf8d54b254c20fe65382685acbde3407 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 7 Jun 2015 13:13:44 -0600 Subject: [PATCH] Fix SAMA5 CAN frame construction. From Max Holtzberg. --- arch/arm/src/sama5/sam_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/sama5/sam_can.c b/arch/arm/src/sama5/sam_can.c index cb83d223fd..39a3694816 100644 --- a/arch/arm/src/sama5/sam_can.c +++ b/arch/arm/src/sama5/sam_can.c @@ -1170,7 +1170,7 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) /* The message buffer is probably not properaly aligned for 32-bit accesses */ ptr = msg->cm_data; - regval = CAN_MDL0(ptr[0]) | CAN_MDL1(ptr[1]) | CAN_MDL2(ptr[1]) | CAN_MDL3(ptr[1]); + regval = CAN_MDL0(ptr[0]) | CAN_MDL1(ptr[1]) | CAN_MDL2(ptr[2]) | CAN_MDL3(ptr[3]); can_putreg(priv, SAM_CAN_MnDL_OFFSET(mbndx), regval); regval = CAN_MDH4(ptr[4]) | CAN_MDH5(ptr[5]) | CAN_MDH6(ptr[6]) | CAN_MDH7(ptr[7]);