Trying to get two MCP2515 working with the MCP2515_CAN driver.
sccoupe
Posts: 118
I have a single propeller hooked up to two MCP2515/MCP2551 combinations on two different CAN networks. The network being the MCP2515 and a CAN analyzer to generate traffic. I tried to modify the driver file to run two MCP2515's but couldn't figure it out, so I just figured I'd run two different driver files, one via CAN1 and one via CAN2. Both drivers are the same aside from the SPI pins and the clock generator pins. All the drivers are set to do is when a CAN message arrives from any ID, it re-transmits the data. So CAN1 re-transmits on CAN ID 0x222 and CAN2 re-transmitts on CAN ID 0x333. My CAN analyzer is generating traffic with CAN ID 0x111. So, running DUAL_MCP2515_NEW, if I only run one at a time, everything works as it should. If I try to run both at the same time, then only the first one that is called is running correctly. The second never does. Its probably each driver stepping on each other, but I did try running one as PASM and the second as SPIN and no luck there either. By the way, the CAN analyzer is only connected to one network at a time. I'm just swapping back and forth to see if data is re-transmitted.
Any ideas?
Any ideas?
Comments
That said, I think you're making this way too complicated. Try this instead:
Thanks!!!