Browse Source

1,修复由于stm32系列的hal库升级导致stm32f1和stm32f4平台的can驱动编译错误
2,关闭components/drivers/Kconfig中默认打开的can硬件滤波器选项
3,为了让can波特率设置匹配stm32f429的时钟,给stm32f429增加波特率表
4,以上修复在stm32f103-fire-arbitrary,stm32f407-atk-explorer,stm32f429-atk-apollo三个bsp中测试通过

zhangjun1996 5 years ago
parent
commit
537c2376f9

File diff suppressed because it is too large
+ 325 - 313
bsp/stm32/libraries/HAL_Drivers/drv_can.c


+ 6 - 4
bsp/stm32/libraries/HAL_Drivers/drv_can.h

@@ -36,10 +36,12 @@ struct stm_baud_rate_tab
 struct stm32_drv_can
 struct stm32_drv_can
 {
 {
     CAN_HandleTypeDef CanHandle;
     CAN_HandleTypeDef CanHandle;
-    CanTxMsgTypeDef TxMessage;
-    CanRxMsgTypeDef RxMessage;
-    CanRxMsgTypeDef Rx1Message;
-    CAN_FilterConfTypeDef FilterConfig;
+    CAN_TxHeaderTypeDef TxMessage;
+    CAN_RxHeaderTypeDef RxMessage;
+	  uint8_t RxMessage_Data[8];
+    CAN_RxHeaderTypeDef Rx1Message;
+	  uint8_t Rx1Message_Data[8];
+    CAN_FilterTypeDef FilterConfig;
 };
 };
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 1 - 1
components/drivers/Kconfig

@@ -48,7 +48,7 @@ config RT_USING_CAN
 if RT_USING_CAN
 if RT_USING_CAN
     config RT_CAN_USING_HDR
     config RT_CAN_USING_HDR
         bool "Enable CAN hardware filter"
         bool "Enable CAN hardware filter"
-        default y
+        default n
 endif
 endif
 
 
 config RT_USING_HWTIMER
 config RT_USING_HWTIMER

Some files were not shown because too many files changed in this diff