Hi,
I have a S32K144 EvalBoard (version C) and I am trying to use CAN1, because I have another Board with a CAN-Transceiver.
My Evalboard is connected via USB to my PC.
CAN1_RX (PTA12 (J6_16)) and CAN1_TX (PTA13 (J6_14)) are connected to the RX/TX of the SBC (TLE9471).
I used the FlexCAN example and changed all CAN0 -> CAN1 and also updated the pin configuration (using PTA12/13 instead of PTA4/5).
Then every 500ms I call the function to send a CAN-Message (FLEXCAN1_transmit_msg() )
Now I have two issues:
1) after restart the programm, it crashes in the CAN-Initialisation
for(i=0; i<128; i++ )
{ /* CAN1: clear 32 msg bufs x 4 words/msg buf = 128 words */
CAN1->RAMn[i] = 0; /* Clear msg buf word */
}
DefaultISR:
b DefaultISR
.size DefaultISR, . - DefaultISR
When I comment out this part, it is not crashing.
2) On the PTA12 and PTA13 I have a logicanalyzer. But I can't see any signals.
I expected to see every 500ms a CAN message on the bus. Or at least to see some signals on the LogicAnalyzer
Is there anywhere a explanation how to initialize CAN1 correctly?
Using CAN0 with 5V via USB is not possible, right?