in the HAL_CAN_IRQHandler, the checks for ALST and TERR errors are only done if RQCP is Set, meaning successful transmission:
The hardware indicates a successful transmission by setting the RQCP and TXOK bits in the CAN_TSR
If the transmission fails, the cause is indicated by the ALST bit in the CAN_TSR register in
case of an Arbitration Lost, and/or the TERR bit, in case of transmission error detection.
(reference manual page 1359)
So no error can be detected, if they are only checked when transmission was successful..
Is that right?
Please fix if neccessary!