I was not able to reproduce your problem. I hooked a CAN Analzer (CANdoISO) up to the Evaluation board and was successfully able to transmit and receive messages. Let me describe my setup and point out some common pitfalls…
The Colibri Evaluationboard needs to
be configured properly. Please refer
to the document below for details:
On my PC I had 2 terminal programs running: one for
UARTA, one for UARTB
I booted the Colibri into U-Boot and started a dummy M4 application which does nothing but looping forever. This is my standard procedure to turn on all required clocks, so I can later easily hook up the JTAG debugger.
I started the CAN Analyzer, making sure that
- The baud rate was correctly set to 125kbps
- The analyzer was in “normal” mode (not in “ListenOnly”)
- I used VSCode to build the flexcan_network project in debug configuration, and to download and run it through the JTAG debugger.
Now I was able to see the debug messages on UARTB, showing that the application was transmitting a CAN message once every second.
Using the CAN analyzer I transmitted messages with ID 0x321 and was able to see on UARTB that these messages were received properly.
RX MB data: 0x9
RX MB data: 0xa
RX MB data: 0xff ff ff ff ff 0 0 0
Some common pitfalls could be:
- The CAN bus needs to be terminated
- It is crucial that there is an active second CAN device on the bus. This is required to acknowledge transmitted messages.
- If you abort the application while running (for example with the debugger), restarting the application is not always sufficient to bring the CAN controller back in a proper state. If you see inproper functioning, I recommend to do a power cycle and start over
- Linux could possibly lock some resources once it is started. Try to run the application from U-Boot.