My whole application is very complex. Also it is company property so I can not send it. I will add some examples for interrupt code too. Are you sure that your CAN bus is physically working. I can tell you for certain that you can not use just one device and scope the pins. You need another working CAN device on the bus. Or, put your device in loopback mode. My app was configured for 1MBit bus, is that the speed you are using?
1MBit CAN Init (comment in the loopback line if required):
Transmit interrupt. This is not used in my code, but I enabled it for some debugging I did.
void USBTOCAN_CanTxISRHandler(void)
{
// Check if is a real interrupt. Sometimes an interrupt occurs when the NVIC CAN1 interrupt is enabled even though all RQCPx bits are 0. This happens after a debugger reset but not on first power up.
The CAN-Controller is configured in Loopback-Mode, but there is no signal on the output pin.
Are you sure that Loopback mode toggles the hardware pins?? Double-check the Reference manual of this microcontroller. There are all modes listed together with effect on the pins.
Thank you very much for your help. But my application is still not working right. The CAN-Controller is configured in Loopback-Mode, but there is no signal on the output pin. There is only one thing which I don't understand in your code. What are you doing with the sentID?