From 160d21b379a6a0dfe16e9c95305c0fa4c5a75f7e Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 11 Jan 2012 01:01:44 +0000 Subject: [PATCH] CAN request order priority git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4292 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_can.c | 6 +++++- configs/stm3240g-eval/include/board.h | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/stm32/stm32_can.c b/arch/arm/src/stm32/stm32_can.c index bf83773a97..5365601f75 100755 --- a/arch/arm/src/stm32/stm32_can.c +++ b/arch/arm/src/stm32/stm32_can.c @@ -1225,9 +1225,13 @@ static int can_cellinit(struct stm32_can_s *priv) regval &= ~CAN_MCR_SLEEP; can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + /* Configure CAN behavior. Priority driven request order, not message ID. */ + + regval |= CAN_MCR_TXFP; + can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); + /* Enter initialization mode */ - regval = can_getreg(priv, STM32_CAN_MCR_OFFSET); regval |= CAN_MCR_INRQ; can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); diff --git a/configs/stm3240g-eval/include/board.h b/configs/stm3240g-eval/include/board.h index f5a1ed2d53..bc11866f37 100755 --- a/configs/stm3240g-eval/include/board.h +++ b/configs/stm3240g-eval/include/board.h @@ -350,8 +350,8 @@ * TIM8_CH3OUT: PC8 MicroSDCard_D0 & MC * Daughterboard Extension Connector, CN3, pin 18 * - * TIM8_CH4OUT: PC9 MicroSDCard_D1 & I2S_CKIN (JP16) - * Daughterboard Extension Connector, CN3, pin 15 + * TIM8_CH4OUT: PC9 MicroSDCard_D1 & I2S_CKIN (Need JP16 open) + * Daughterboard Extension Connector, CN3, pin 17 * * Others * @@ -377,10 +377,13 @@ # define GPIO_TIM8_CH1OUT GPIO_TIM8_CH1OUT_1 # if !defined(CONFIG_STM32_SDIO) # define GPIO_TIM8_CH3OUT GPIO_TIM8_CH3OUT_1 -# define GPIO_TIM8_CH4OUT GPIO_TIM8_CH4OUT_1 # endif #endif +#if !defined(CONFIG_STM32_SDIO) +# define GPIO_TIM8_CH4OUT GPIO_TIM8_CH4OUT_1 +#endif + /* CAN * * Connector 10 (CN10) is DB-9 male connector that can be used with CAN1 or CAN2.