SAMV71 Xplained Ultra eval kit can bus MCAN0 problem

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, all.

 

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will appreciate if anyone can share their experience on using MCAN0 on SAM V71

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am having two SAMV71 evaluation board I need to check CAN. Can you please help me. I downloaded software package from github from that I am using MCAN example code. Please help. 

Ujjwal Tambe

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ujjwaltambe wrote:

I am having two SAMV71 evaluation board I need to check CAN. Can you please help me. I downloaded software package from github from that I am using MCAN example code. Please help. 

yes mcan1 is working, i am using atmel studio, and you can start a project : File --> New --> Example Project --> select you board and search mcan. you will find "MCAN_QUICK_START".

flash the example program into 2 boards.  connect canH and canL on 2 boards (or connect mcan1 RX on the boards togather, you can check the datasheet where those pins are)

Then you can enter the command via uart to config one board into receiver, and send message from the other board.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the help. I wanted to check CAN using atmel software package's example code as I integrated whole project from that folder. All other drivers which I have used are from that folder. For CAN I configured one board as TX and one as RX but i am not able to get the data. 

Ujjwal Tambe