Hi Jordi,
Function of the CAN_LDD is correct, when a transmitting Frame isn’t received by some node (= it isn’t acknowledged), CAN device try send the frame again with OnError() event calling.
Aborting a transmission frame is possible do by CAN_PDD_SetMessageBufferCode() macro (it is macro defined in CAN_PDD.h library, must be included).
Example:
CAN_PDD_SetMessageBufferCode(CAN1_BASE_PTR, 1U, CAN_PDD_MB_TX_ABORT); // aborts a transmitting frame for CAN1 device, Message buffer 1
Best Regards,
J.R.