Below is a high level draft of switching logic that I want to implement on the 3 x CAN board. The “standard” firmware on any CAN Hub is that you forward CAN messages to/from USB or Ethernet, but we can do so much more than that by creating programmable switch logic.
I have called this “3 x CAN”, but as mentioned before it also have 4 x modules/links to extend functionality. The most obvious option is that we connect Link to Module1 on a different board and get a total of 6 x CAN port’s. CAN messages are standard on layer 2, we have a 11 or 29 bit ID + a 8 byte to 64 byte payload. So we switch on ID ranges + we need to implement something similar for Ethernet, USB and serial links. As mentioned the default, initial config is low latency remote IO.
The yellow arrows are to remind me about the number of FIFO queues I will need – more exactly 20 – I plan something like 5K on each FIFO, meaning we use ca 100Kb on Queues. I have ca 400Kb unused so I have plenty of SRAM including 32Kb for Ethernet.
The job of the switch is to read input messages and put them into an out queue with as low latency as possible. Due to the RTOS I am using I expect < 200uS (0.2ms) latency inside the Hub. Actual latency will vary with load obviously.
CLI – Command Line Interface means I can use tools like Putty to write read text commands as a low cost config tool. Simple text with a line-feed.
Link and Module are full duplex serial ports capable of at least 16Mbps speed – combine this with a low latency transport system we should have a pretty awesome Hub.