Open tomasjakubik opened 9 months ago
Hey @tomasjakubik,
I've cherry-picked and squashed @pgreenland's commit https://github.com/pgreenland/candleLight_fw/commit/4051608a60009072e7d2644a57f0802db70a135b into my https://github.com/marckleinebudde/candleLight_fw/tree/multichannel branch. Can you test, if this fixes your problem?
Cc: @lichtfeind
Hi, thanks. Now I can communicate at full 8 Mbps.
I missed that post on ST forum. Good idea to use DataTimeSeg1*DataPrescaler
as the TdcOffset
value. It should fit no matter the settings.
Maybe I spoke too soon. I think it can get stuck.
There is nothing wrong on the bus. Other devices communicate without issues. Rx and Tx LEDs do not blink. When trying to manually send something, cansend
says write: No buffer space available
. Nothing in dmesg
. It starts working again when unplugged and replugged again.
I have seen it several times and not once with firmware the candleLight FD had from factory.
This issue is specifically with candleLight FD and fork topic/candleLightFD, but that doesn't allow issues.
We are starting a CAN FD project. We bought some candleLight FDs to debug and perhaps to manage the network from Linux. The issue is that this firmware doesn't compensate for transceiver delay and so it cannot transmit over about 2 Mbps. Receive works fine with 1 & 8 Mbps, but when you try transmitting, the FDCAN peripheral cannot verify the bits it sent, fails, repeats and fails again. Without Tx delay compensation, my code was behaving in a similar way. Here is some code that works for me on G4 nucleo clocked at 160 MHz:
This is not ready to be a pull request. It will need different values at different speeds. Unfortunately, the documentation I have available is not good enough to have a proper solution. When I have Tag-Connect I may have a more deeper look into the firmware, but I cannot promise anything.
I guess that you are in process of merging the fork here, but any ideas on how or even if it should be incorporated into the firmware?