The interface between controllers will use the CAN protocol.
Need to decide on how to transmit:
- Automatically send information at a set frequency
- Only send information upon request from another controller (e.g. a master controller)
Sending data at a set frequency can result in simultaneous transmissions. The CAN protocol handles this with built-in arbitration (read more here and here), which is based on the priority of the identifier. This is a non-destructive method of arbitration, meaning that the highest priority message will be transmitted first and the other senders will stop attempting to send their message for the duration of the message. The F28377S microcontroller has the default functionality of automatically transmitting messages in the case of lost arbitration or error.
Simultaneous transmission can be avoided altogether by having a master controller (either dedicated controller, or can be a sub-system power electronics controller) which prompts for information from other controllers sequentially. The requested information can be transmitted to all controllers on the bus. This results in a more managed communications bus, albeit with a greater amount of “waste” in terms of extra messages being sent.
Can transceiver: Texas Instruments SN65HVD234aD.
Between Computer (HMI) and Controllers
CAN transceiver and RS-232 transceiver interfacing with on-chip CAN and UART respectively.
Can have a master controller which is the only device the computer communicates with. Options:
- Serial over USB on the F28377S LaunchPad.
- Serial with dedicated RS-232 port (meaning the microcontroller needs to drive a serial transceiver), and the computer needs a R-S232-serial interface (as most modern computers won’t have a serial port).
- CAN, where the master controller has 2 CAN ports – 1 for the communications between controllers, and another for communications with the computer.
- CAN, where the computer communicates on the same bus as all controllers. This needs more thought (timing of messages to avoid simultaneous transmissions, or arbitration built in to the CAN protocol).