RLP CAN Drivers for SPI CAN controller
This project employs the RLP feature from GHI Electronics on ChipworkX to make a native driver for the Microchip MCP2515 CAN controller. The ZIP file includes both driver native code and a C# .NET Micro Framework project that demonstrate how to use the driver.
The benefit of this code:
- CPU-interrupt-driven native driver (totally independent from .NET Micro Framework time cycle).
Very compact code since the code is compiled from a C file.
- The code is loaded at run time, thus it can be loaded from resources or file system media. In this project, the ELF file (the executable file) is loaded from the resources loaded with the application.
- User is free to increase or decrease the receive FIFO buffer to reach the 0% message loss according to the application. Possibly expand the driver to handle more work on native side like message filtering or even higher level protocols like CANopen.
I’m trying to get this going, I’ve gotten a MCP2515 shield and wired it up to a chipworkx dev board. It seems to hang in the init routine, specifically the line:
It seems to never get passed this line, looked in the header structs and don’t see any obvious issues.
Also I had to change the make file to use the latest version of the yagarto tool chain but that seems to work fine after that, and the managed code in the example is VS2008, I changed to VS2010, and target from MF3 -> MF 4.1.
This is a really old project that I moved from wiki. I would only used this project as a reference to make one from scratch. Start by simple RLP projects to make sure you have a good grip on RLP then start porting the code after.
I suppose that this it the typical way to get CAN / Bluethooth or whatever going:
- Using I2C, SPI or UART via Microsoft.SPOT…
- to communicate to another chip providing CAN / Bluetooth or whatever wanted.
Is that right?
Does GHI.IO or any other library from GHI provide further hardware-driver (e.g. for FEZ Cerbuino Net) making further external chips unecessary?
Will .NET Micro already be installed with such further GHI-libraries if I buy a FEZ Cerbuino Net Board?
What about updates? How can I get the actual GHI-library when I will already have such a nice board?
Thank you very much for all your answers!
Welcome Wutz. Please, your questions are general and not related to this codeshare post from 2 years ago, so it’s worth you creating your own “general” question rather than this.