Selectable CAN bus rate
Posted: Tue Sep 20, 2011 12:59 am
Hello
I am working on a project where I try to have a selectable CAN bus rate. What I would like to do is to be able to read alternative values for the CNF1, CNF2 and CNF3 settings from EEPROM and send the values to the MCP2515 CAN controller.
The approach that I've been trying is this sequense.
Do a first standard Initiation of the CAN.
Read values from EEPROM
Set the CAN controller in configuration mode
Send the new CNF1, CNF2 and CNF3 values
End CAN controller configuration mode
So far I have tried to do custom C code for the CAN controller configuration and sending the values but I can't get it to work. It won't even compile.
Has anyone tried something like this and made it work?
Should I be using a different approach?
Ideas please.....
I am working on a project where I try to have a selectable CAN bus rate. What I would like to do is to be able to read alternative values for the CNF1, CNF2 and CNF3 settings from EEPROM and send the values to the MCP2515 CAN controller.
The approach that I've been trying is this sequense.
Do a first standard Initiation of the CAN.
Read values from EEPROM
Set the CAN controller in configuration mode
Send the new CNF1, CNF2 and CNF3 values
End CAN controller configuration mode
So far I have tried to do custom C code for the CAN controller configuration and sending the values but I can't get it to work. It won't even compile.
Has anyone tried something like this and made it work?
Should I be using a different approach?
Ideas please.....