G80 Module CAN Timing; CAN Controler Clock Frequency needed

Hi to all,
thats my first question to the forum. Hope someone can help :slight_smile:

I need help with an G80TH Module. I need to establish a CAN Communication with a given CAN Installation (my Homeautomation, 12 nodes with mcp2515) operating at 20kbps.

Unfortunately the 20kbps is not provided by GHI ready to use. So i have to calculate the timing by myself. To do so i need to know the Frequency of the peripheral bus or let me say the operating frequency of the CAN Controler. Is it the full CPU Clock with 180 MHz or is it devided ?

Here is my first attempt to initialise the CAN1 Channel with the full 180 MHz CPU Clock. The timing matches the mcp2515 config (BRP has lower value of course). But it does not work. I cannot receive the traffic on the bus.

int Brp = 179;
int Phase1 = 8;
int Phase2 = 8;
int Propagation = 8;
int SynchronizationJumpWidth = 1;
bool UseMultiBitSampling = false;

var can_timing = new ControllerAreaNetwork.Timings(Propagation, Phase1, Phase2, Brp, SynchronizationJumpWidth, UseMultiBitSampling);

var can = new ControllerAreaNetwork(ControllerAreaNetwork.Channel.One, can_timing);
can.Enabled = true;
…
I am using the example provided by GHI: Can we use Linux or a Mac for development? – GHI Electronics

For now i need to know the operating Frequency for the CAN Controler, that would help a lot.

Anybody knows ?

Thanks for your help !
Roland

@ flyseven - The CAN clock is available from the static SourceClock property on the ControllerAreaNetwork class.

1 Like

Hi,
didn’t expect it’s so easy. Source Clock is 45 MHz.
@ John Thank you,