mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
commit
feb0551629
@ -9,15 +9,9 @@ from pyb import CAN
|
|||||||
# NOTE: Set to False on receiving node.
|
# NOTE: Set to False on receiving node.
|
||||||
TRANSMITTER = True
|
TRANSMITTER = True
|
||||||
|
|
||||||
can = CAN(2, CAN.NORMAL)
|
can = CAN(2, CAN.NORMAL, baudrate=125_000, sampling_point=75)
|
||||||
# Set a different baudrate (default is 125Kbps)
|
# NOTE: uncomment to set bit timing manually, for example:
|
||||||
# NOTE: The following parameters are for the H7 only.
|
#can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3)
|
||||||
#
|
|
||||||
# can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3) # 125Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=16, sjw=1, bs1=8, bs2=3) # 250Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=8, sjw=1, bs1=8, bs2=3) # 500Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=4, sjw=1, bs1=8, bs2=3) # 1000Kbps
|
|
||||||
|
|
||||||
can.restart()
|
can.restart()
|
||||||
|
|
||||||
if (TRANSMITTER):
|
if (TRANSMITTER):
|
||||||
|
|||||||
@ -9,15 +9,9 @@ from pyb import CAN
|
|||||||
# NOTE: Set to False on receiving node.
|
# NOTE: Set to False on receiving node.
|
||||||
TRANSMITTER = True
|
TRANSMITTER = True
|
||||||
|
|
||||||
can = CAN(2, CAN.NORMAL)
|
can = CAN(2, CAN.NORMAL, baudrate=125_000, sampling_point=75)
|
||||||
# Set a different baudrate (default is 125Kbps)
|
# NOTE: uncomment to set bit timing manually, for example:
|
||||||
# NOTE: The following parameters are for the H7 only.
|
#can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3)
|
||||||
#
|
|
||||||
# can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3) # 125Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=16, sjw=1, bs1=8, bs2=3) # 250Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=8, sjw=1, bs1=8, bs2=3) # 500Kbps
|
|
||||||
# can.init(CAN.NORMAL, prescaler=4, sjw=1, bs1=8, bs2=3) # 1000Kbps
|
|
||||||
|
|
||||||
can.restart()
|
can.restart()
|
||||||
|
|
||||||
if (TRANSMITTER):
|
if (TRANSMITTER):
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 56fbbd4dcf919c1111468aabf3df2b44bf6bb9f0
|
Subproject commit e9d2be4d7945d81cef60336e8bb4ad30e662fdda
|
||||||
Loading…
Reference in New Issue
Block a user