← index #8129PR #5665
Off-topic · high · value 1.138
QUERY · ISSUE

Document values of CAN bus Constants

openby keelung-yangopened 2021-12-31updated 2024-09-08
docs

Hi,
Since CAN.send() have no error code returned, I've to check CAN.state() and got 4. But what 4 stand for? Then I've to search code to figure out this error code.
So, it's very convenient if values of CAN bus Constants can be documented clearly.
image

CANDIDATE · PULL REQUEST

[STM32F446RE] NUCLEO board enable CAN bus support

closedby Sashkoivopened 2020-02-19updated 2021-07-22
port-stm32

I have declared CAN1 and CAN2 pins in mpconfigboard.h. It has compiled well and without errors or warnings.
The only issue is that I can't bring it up.
I have the Logic Analyser connected to CAN RX and CAN TX pins (also tried with TJA1050) which are PB8 and PB9. When running the code:

from pyb import CAN
can = CAN(1, CAN.NORMAL)
# can = CAN(1, CAN.NORMAL, prescaler=2, sjw=1, bs1=14, bs2=6)
can.send('message!', 123)

I see no reaction.

I'm curious if I have missed something or It's not that easy to enable an extra interface.
PS. There was no Crystal soldered, later I have soldered one with 8MHz but nothing changed.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied