2023-05-24 08:42 PM - edited 2023-11-20 04:39 AM
One VCU controller A, one USBCAN converter B, one my H7 device C.
A is sending, B and C are receiving. When C Stop FDCAN, both A and B report a bus failure.
One VCU controller A, two USBCAN converters B1 and B2, . A is transmitting, B1 and B2 are receiving. When B1 stops FDCAN, A and B2 are fine and do not report bus errors
USBCAN converters(B,B1,B2) are known to be a standard product and have passed the certification of many testing bodies.
So I think my H7 device caused a bus failure when it stopped FDCAN.
my code:
HAL_FDCAN_Stop(&hcan1);
Transceiver:MCP25612FD
CANFD configuration:
Classic CAN, 500K
2023-05-24 10:36 PM
Sorry I cannot help... but I'm curious:
what happens if you do not call HAL_FDCAN_Stop(), but:
?
And do the other devices recover from bus errors?
2023-05-24 10:44 PM
-->other device not report can bus errors.
2023-05-24 11:09 PM
Okay, that's bad.
Then the HAL CAN driver is doing something which it should not do.
Maybe check the RM again what's happening when HAL_FDCAN_Stop() is called, bit by bit.
2023-05-24 11:18 PM
Although it would be a kind of workaround, maybe before calling HAL_FDCAN_Stop() you could reset the CAN GPIOs to take it off the bus.
Before that check the idle state of the CAN TX pin and set the GPIO accordingly, unless there's a pull resistor.