Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
959 Views

MCP2515 CANbus implementation in NIOS using alt_avalon_spi_command on 10M50DA

Hello, 

 

Straight off, I am a newbie to the FPGA game, but am (trying to) temporarily help fill a hole on our team. 

 

I have an Altera 10m50da, and am attempting to implement canbus communication using an mcp2515 controller through the alt_avalon_spi commands. 

 

  1. The main FPGA code was developed by someone other than me, and we have someone to support that, including the Qsys setup for the CANbus on SPI (3 Wire Serial) and CAN_interrupt on PIO (Parallel I/O). 

  2. I was given example NIOS2 code, I have the MCP2515 .c and .h files, and am able to send a CANbus message, but the message keeps repeating itself. 

  3. I cannot read CANbus messages yet. 

  4. I also need to be able to eventually read and write to the FPGA registers on the I2C Master (opencores.org). 

 

 

If anyone has some example NIOS code (reference design), I would appreciate it. 

 

My code is included in the attachments (if they attached correctly). I think some of this code was referenced from http://www.alteraforum.com/forum/showthread.php?t=44264

 

Thanks for any help!
0 Kudos
1 Reply
Altera_Forum
Honored Contributor I
121 Views

Hi, I have started to work on MCP25625, which is similar to your MCP2515. Were you able to get it to work for you with nios? 

 

Thanks,
Reply