mbed

Fork of mbed-dev by mbed official

Revision:
171:19eb464bc2be
Parent:
167:e84263d55307
Child:
173:7d866c31b3c5
--- a/targets/TARGET_STM/can_api.c	Wed Jul 19 17:31:21 2017 +0100
+++ b/targets/TARGET_STM/can_api.c	Thu Aug 03 13:13:39 2017 +0100
@@ -85,8 +85,8 @@
         error("Cannot initialize CAN");
     }
 
-    // Set initial CAN frequency to 100 kb/s
-    if (can_frequency(obj, 100000) != 1) {
+    // Set initial CAN frequency to specified frequency
+    if (can_frequency(obj, hz) != 1) {
         error("Can frequency could not be set\n");
     }