I have quite some issues with sending messages via CAN bus using the NucleoG474RE with mbed OS 6.15 (current version in github).
In the meantime I believe I could nail down the issue to the following:
I try to send a message (CANExtended Format, CANData Frame) with NucleoG474RE board over a short cable connection.
The opposite side (LPC4088 with an older mbed OS, of course) interrupts the transmission after about 110 Bits and sends a CAN error frame (6 consecutive dominant bits).
The connection speed does not make a difference (10kHz, 100kHz, 125kHz) - all checked with same, unsucessful result. For the NucleoG474RE I use a MCP2562 as transceiver, for the LPC4088 it is the MCP2515.
In my setup, the LPC4088 also has a second and working CAN bus connection to a different CAN system which uses an ATMega644 with an MCP2515 as CAN controller (no mbed system, of course).
Working means that sending and receiving between these CAN nodes works without any issues.
Even when switching the CAN bus connections on LPC4088 side, the issues remains. So, I think it is not the LPC4088 - it is somehow related to the NucleoG474RE (HW or SW configuration).
Whenever the LPC4088 sends its error frame, the NucleoG474RE CAN controller is configured by mbed to automatically repeat its sending attempts several times until the Nucleo CAN controller gives up and disconnects itself from the CAN bus.
Of course, the automatic retransmission can be disabled in the mbed sources, but I believe that this certainly is not the issue.
With a scope I checked the transmission and I could see that the transmission from NucleoG474RE to LPC4088 as such works correctly, i.e. TX signal on Nucleo side and RX side signal on LPC side show the same result - until the LPC4088 starts with its error frame transmission.
Additionally, receiving on the NucleoG474RE side also works, i.e. the same CAN frame format sent by the LPC4088 is correctly received by the NucleoG474RE. The scope shows a working transmission, i.e. the CAN frame shipment from the LPC4088 is acknowledged by the NucleoG474RE CAN controller.
Apparently, the CAN frame created on Nucleo G474RE side cannot be understood by the LPC4088 CAN controller, but vice versa it can.
I am wondering how this is “achievable” by configuring or using the CAN controller on Nucleo side - or whether there is any other reason I am just too blind to see.
Neither the STM32G474RE nor the LPC4088 errata sheet shows something related.
Is there anybody who ever experienced such an issue?