Skip to content
Permalink
Browse files

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>
  • Loading branch information...
alexanderwachter authored and nashif committed Jul 2, 2019
1 parent 2b6b065 commit 82a1661c99c8557974e32ed295789b5aad9b42f9
Showing with 4 additions and 3 deletions.
  1. +4 −3 drivers/can/can_stm32.c
@@ -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) {

0 comments on commit 82a1661

Please sign in to comment.
You can’t perform that action at this time.