I was assigned a task to try out can bus on samv71 chip. and the can bus we used is MCAN0.
Thus, I have tried on SAMV71 Xplained Ultra eval kit with the example project "MCAN_QUICK_START"
the code is using MCAN1, and it is able to transmit and receive correctly.
Then I switch to MCAN0 by changing the MCAN1 to MCAN0 in init function and interrupt init function and interrupt handler function.
However, this time, it keeps complaining "bus off error, re-initialize "
I checked datasheet, only MCAN1 is connected to the CAN tranceiver, thus I connect MCAN0 in the way without transceivers. eg. RX of board A to RX of board B.
in this way, MCAN1 is also able to communicate, but MCAN0 still gives error of "bus off".
I think it is because I did not init the can bus correctly. But I did not know what I have missed.
any idea on how can I init MCAN0 and use it?