Merge pull request #1022 from openmv/can_update

Can update
This commit is contained in:
Ibrahim Abd Elkader 2020-12-06 21:11:32 +02:00 committed by GitHub
commit feb0551629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 19 deletions

View File

@ -9,15 +9,9 @@ from pyb import CAN
# NOTE: Set to False on receiving node.
TRANSMITTER = True
can = CAN(2, CAN.NORMAL)
# Set a different baudrate (default is 125Kbps)
# NOTE: The following parameters are for the H7 only.
#
# 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 = CAN(2, CAN.NORMAL, baudrate=125_000, sampling_point=75)
# NOTE: uncomment to set bit timing manually, for example:
#can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3)
can.restart()
if (TRANSMITTER):

View File

@ -9,15 +9,9 @@ from pyb import CAN
# NOTE: Set to False on receiving node.
TRANSMITTER = True
can = CAN(2, CAN.NORMAL)
# Set a different baudrate (default is 125Kbps)
# NOTE: The following parameters are for the H7 only.
#
# 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 = CAN(2, CAN.NORMAL, baudrate=125_000, sampling_point=75)
# NOTE: uncomment to set bit timing manually, for example:
#can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3)
can.restart()
if (TRANSMITTER):

@ -1 +1 @@
Subproject commit 56fbbd4dcf919c1111468aabf3df2b44bf6bb9f0
Subproject commit e9d2be4d7945d81cef60336e8bb4ad30e662fdda