Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12435 Discussions

MCP2515 CANbus implementation in NIOS using alt_avalon_spi_command on 10M50DA

Altera_Forum
Honored Contributor II
1,114 Views

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 II
276 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