Merge pull request #4664 from bperry730/fix/st_can_api_freq

STM32: Fix the CAN initializing to the wrong frequency
pull/4792/head
Jimmy Brisson 2017-07-17 11:06:04 -05:00 committed by GitHub
commit a75f935348
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ void can_init_freq (can_t *obj, PinName rd, PinName td, int hz)
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");
}