drivers: can: stm32: Change TX priority to chronological order

This commit changes the TX priority from ID based priority to
chronological order. The advantage is that when messages with
the same ID are sent, the order is retained.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
This commit is contained in:
Alexander Wachter 2019-07-02 12:39:19 +02:00 committed by Anas Nashif
commit 82a1661c99

View file

@ -354,10 +354,11 @@ static int can_stm32_init(struct device *dev)
LOG_ERR("Failed to enter init mode");
return ret;
}
/* Set TX priority to chronological order */
can->MCR |= CAN_MCR_TXFP;
can->MCR &= ~CAN_MCR_TTCM & ~CAN_MCR_TTCM & ~CAN_MCR_ABOM &
~CAN_MCR_AWUM & ~CAN_MCR_NART & ~CAN_MCR_RFLM &
~CAN_MCR_TXFP;
~CAN_MCR_AWUM & ~CAN_MCR_NART & ~CAN_MCR_RFLM;
ret = can_stm32_runtime_configure(dev, CAN_NORMAL_MODE, 0);
if (ret) {