Hello @Alice_Yang !
Sorry for the delay in answering you, but I was developing the code that I had previously commented based on the last messages. However I believe I didn't make it clear what problem I'm having here and we're going in another direction, so I'll try to explain again with more information.
I'm trying to connect MCANTX with MCANRX on CAN0 on the same OM13098 board. Because I only have one board.
My configuration is set up like this:
1 cable connected to CAN0_TD - Port 3 Pin 18 (coords: M6).
1 cable connected to CAN0_RD - Port 3 Pin 19 (coords: J3).
1 cable connected to GND.
1 USB cable connected to the J8 connector for DEBUG.
The cables of pins P3-18 and P3-19 are jumpered so that the data transfer from the TX port is received by the RX port. This jumper is being carried out by the oscilloscope probe, where I can read the packet I am sending.
I'm using the mcan_loopback example and I'm sending the following packet through MCANTX_0 straight to MCANRX_0 on the same OM13098 board.
Package: 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55;
Remembering that I am not doing the loopback of the balanced pair (after the transducers), but the loopback of the digital pair.
In this example I commented out the line that indicates the loopback ("mcanConfig.enableLoopBackExt = true") and I am using CAN Open in normal operation, considering the following defines below.
#define USE_CANFD (0U)
#define DLC (8)
#define BYTES_IN_MB kMCAN_8ByteDatafield
#define CAN_DATASIZE (8U)
On the oscilloscope (Photo OSCSCREEN_MCAN0), I can see that some communication between the RX/TX has taken place because the CAN packet is fully described on the bus.
Except in the serial terminal, I don't get the printfs saying the packet was sent. And, in DEBUG mode, it indicates that the code is looping the while of the MCAN_TransferSendBlocking(EXAMPLE_MCAN, 0, &txFrame) function. As if waiting for the message to be sent.
I am also sending the photos of the CAN0 registers when it is "stuck" inside that while. I don't know if this can help.
Thanks.
Best Regards.