add support for multichannel and CAN-FD - #139
marckleinebudde wants to merge 14 commits into
Conversation
d1e0c57 to
203cfac
Compare
|
It's not yet stable, |
203cfac to
bb32688
Compare
|
changes:
|
bb32688 to
f3dbeec
Compare
|
changes:
|
f3dbeec to
0ec5d41
Compare
|
changes:
|
0ec5d41 to
adfa1f1
Compare
adfa1f1 to
7a9e176
Compare
7a9e176 to
dba4baa
Compare
|
FYI: @lichtfeind will now work on STM32G0 support. |
015b9a7 to
eef6f97
Compare
eef6f97 to
ca78d19
Compare
fdec4bf to
343714f
Compare
25726c4 to
eb15d9d
Compare
99d5695 to
7f6a8b2
Compare
a8a5d83 to
48b2f1d
Compare
| HAL_GPIO_Init(LEDRX_GPIO_Port, &GPIO_InitStruct); | ||
|
|
||
| /* FDCAN */ | ||
|
|
There was a problem hiding this comment.
FWIW - To get this to work with Adafruit "CAN Pal" TJA1051T/3 breakout board( https://www.adafruit.com/product/5708 ) , I needed to connected the transceiver silent (SLNT) pin to GND.
There was a problem hiding this comment.
In your board file you can implement the struct BoardConfig::phy_power_set callback and pull the transceiver's silent pin into the correct direction depending on the value of the enable parameter.
|
@marckleinebudde, is CANFD fully supported on G0 based devices ? I have recently purchased candleLight FD from linux automation and im looking for something that works out the box. |
The device comes pre-flashed with a working firmware. |
|
Hi all Can you pls clarify if this has finally been merged to main_dev - or - if we need to get code from [marckleinebudde]'s (https://github.com/marckleinebudde) fork? The discussion seems to indicate support for the G0 is mature, but it's unclear if/what's been merged to this main branch. Thanks, |
|
It's not mainline. Please use https://github.com/marckleinebudde/candleLight_fw/tree/multichannel for now |
Hi there! Multichannel means that this will rise can0 and can1 interfaces? |
|
This means on STM32G0B1 devices you have 2 interfaces, |
|
@marckleinebudde I have rebased this on top of current master. Most conflicts came from the alphabetical sorting that was done on config.h, I have solved them. I have the branch locally, do you want me to update the PR? |
|
@csanchezdll please push your rebased branch to your repo, then I'll force-push it over this PR. |
|
What blockers do we have? We need to (for now automatically) activate transceiver delay compensation for higher bitrates. The Linux driver currently activates it for > 2.5 MBit/s: https://github.com/torvalds/linux/blob/c072629f05d7bca1148ab17690d7922a31423984/drivers/net/can/m_can/m_can.c#L1433 See: https://github.com/Elmue/CANable-2.5-firmware-Slcan-and-Candlelight/blob/cc21ab908fcc4b4b6e263e744c90dbe60e62e091/Source/can.c#L216 for how to enable it on the µC. We also need (for now: automatically) bus off recovery, see cb4bd41 |
|
And I'm not happy with the LEDs interface. With the current code, a LED used for more than one purpose doesn't work properly. For example: a TX-LED shared by channels 0 and 1 effectively only shows the channel 1 status. As the code directly overwrites channel 0 by channel 1. I have something half-finished. Not sure about the performance impact. I have to setup a proper environment for testing first. |
|
multichannel rebased: https://github.com/csanchezdll/candleLight_fw/tree/multichannel I'll have a look at those blockers. Maybe we could split multichannel and FD support? Having them in the same PR makes it more difficult to get it merged. |
|
Oh! that's a good idea. Can you push your rebased branch somewhere, so that I can force push it here? |
|
This is the first split PR to of this branch: #217 |
This PR should add multichannel and CAN-FD support. Currently it's WIP.