How to configure 4x CAN ports? (CLKBLK) Topic is solved

If you have a simple question and just want an answer.
AndreM
Newbie
Posts: 1
Joined: Wed Apr 09, 2014 1:47 pm

How to configure 4x CAN ports? (CLKBLK)

Post by AndreM »

Hello,

Is it possible to configure more than one CAN to the same e.g. XS1_CLKBLK_3 clock block? (all 4 CAN channels have the same baudrate)

Or is there are more elegant way to do this?

Help is really appreciated!

AndreM

 

on tile[0]: can_ports canp  = { XS1_PORT_1C, XS1_PORT_1D, XS1_CLKBLK_3 };
on tile[0]: can_ports canp1 = { XS1_PORT_1E, XS1_PORT_1F, XS1_CLKBLK_3 };
on tile[0]: can_ports canp2 = { XS1_PORT_1G, XS1_PORT_1H, XS1_CLKBLK_3 };
on tile[0]: can_ports canp3 = { XS1_PORT_1A, XS1_PORT_1B, XS1_CLKBLK_3 };

xmap: Error: Symbol canp.cb is a duplicate clock declaration.
xmap: Error:   previously declared as canp1.cb.



View Solution
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

The current implementation requires a clock block for an instance. If you try to use the same clock block in multiple instances, you will get an parallel resource usage error.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

Have a look at the CAN to Ethernet Bridge application notes on how to configure the CAN component:https://www.xmos.com/download/public/AN ... ge%2...You will find all the Application notes in the Following section of XMOS website:https://www.xmos.com/support/appnotes