this should fix the bitrate error
This commit is contained in:
parent
ec954fcb16
commit
d4163c5021
@ -31,7 +31,7 @@ async fn main(_spawner: Spawner) {
|
|||||||
va416xx_embassy::init(dp.tim15, dp.tim14, &clocks);
|
va416xx_embassy::init(dp.tim15, dp.tim14, &clocks);
|
||||||
defmt::info!("creating CAN peripheral driver");
|
defmt::info!("creating CAN peripheral driver");
|
||||||
defmt::info!("clocks: {}", clocks);
|
defmt::info!("clocks: {}", clocks);
|
||||||
let clk_config = ClockConfig::from_bitrate_and_segments(&clocks, 250.kHz(), 16, 4, 4)
|
let clk_config = ClockConfig::from_bitrate_and_segments(&clocks, 250.kHz(), 4, 14, 5)
|
||||||
.expect("CAN clock config error");
|
.expect("CAN clock config error");
|
||||||
let mut can = Can::new(dp.can0, clk_config);
|
let mut can = Can::new(dp.can0, clk_config);
|
||||||
can.set_loopback(true);
|
can.set_loopback(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user