Skip to content

Commit f7d76b5

Browse files
author
Brad Perry
committed
Fixing the problem where the CAN is initialized to the wrong frequency at startup regardless of the value set in the constructor. Issue #3863
1 parent a39ac60 commit f7d76b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_STM/can_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ void can_init_freq (can_t *obj, PinName rd, PinName td, int hz)
8585
error("Cannot initialize CAN");
8686
}
8787

88-
// Set initial CAN frequency to 100 kb/s
89-
if (can_frequency(obj, 100000) != 1) {
88+
// Set initial CAN frequency to specified frequency
89+
if (can_frequency(obj, hz) != 1) {
9090
error("Can frequency could not be set\n");
9191
}
9292

0 commit comments

Comments
 (0)