test

Fork of CANnucleo by Zoltan Hudak

Revision:
5:b53e5ee15315
Parent:
1:eb04f7f0478d
Child:
6:c5a40d5fd9f1
--- a/stm32f1xx_hal_msp.c	Thu Jul 23 13:10:34 2015 +0000
+++ b/stm32f1xx_hal_msp.c	Tue Aug 04 11:58:09 2015 +0000
@@ -74,24 +74,11 @@
     _canHandle.Init.Mode = CAN_MODE_NORMAL;
 
     // 125kbps bit rate (default)
-#if defined(TARGET_NUCLEO_F103RB) || \
-    defined(TARGET_NUCLEO_F302R8) || \
-    defined(TARGET_NUCLEO_F303RE) || \
-    defined(TARGET_NUCLEO_F334R8) || \
-    defined(TARGET_DISCO_F334C8)
-    // APB1 pheripheral clock = 36000000Hz
+    // APB1 peripheral clock = 36000000Hz
     _canHandle.Init.Prescaler = 18;      // number of time quanta = 36000000/18/125000 = 16
     _canHandle.Init.SJW = CAN_SJW_1TQ;
     _canHandle.Init.BS1 = CAN_BS1_11TQ;  // sample point at (1 + 11) / 16 * 100 = 75%
     _canHandle.Init.BS2 = CAN_BS2_4TQ;
-#elif defined(TARGET_NUCLEO_F072RB) || \ 
-      defined(TARGET_NUCLEO_F091RC)
-    // APB1 pheripheral clock = 48000000Hz
-    _canHandle.Init.Prescaler = 24;     // number of time quanta = 48000000/24/125000 = 16
-    _canHandle.Init.SJW = CAN_SJW_1TQ;
-    _canHandle.Init.BS1 = CAN_BS1_11TQ; // sample point at: (1 + 11) / 16 * 100 = 75%
-    _canHandle.Init.BS2 = CAN_BS2_4TQ;   
-#endif
 
     HAL_CAN_Init(&_canHandle);
 }