RoboMasterS1Challenge / robomaster_s1_can_hack

DJI RoboMaster S1 CAN Hack
MIT License
102 stars 23 forks source link

Can boudrate #4

Closed Duck-Development closed 4 years ago

Duck-Development commented 4 years ago

What is the can boudrate? I did not find it in the code. Is it 1 or 2 mega boud

JohnieBraaf commented 4 years ago

it's 1 mbit

JohnieBraaf commented 4 years ago

you can find it by opening the stm cube project and checking the can bus timing.

With periphials clock is at 54mhz this translates to: can.init(mode=pyb.CAN.NORMAL, extframe=False, prescaler=3, sjw=1, bs1=15, bs2=2, auto_restart=True) # 1mbps @216Mhz

Duck-Development commented 4 years ago

Thank you