mirror of https://github.com/ARMmbed/mbed-os.git
Fixing the problem where the CAN is initialized to the wrong frequency at startup regardless of the value set in the constructor. Issue #3863
parent
a39ac60305
commit
f7d76b5d29
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue