|
Future Tesla cars will use a Ethernet bus to connect all sensors and actors.
CAN bus is discarded as a legacy bus.
Subsystems will be connected through a Ethernet switch and have local processing capabilities.
The latency is below 1 millisecond and is suitable for control by wire approaches.
The approach tremendously simplifies the wiring of the car.
|
Multiple devices connected to a bus are per nature asynchronous.
You cannot predict when a device will send a message.
Therefore, the reception and processing of a received message must be asynchronous and run in a separate thread.
Always provide send and receive queues for sending and receiving messages for sophisticated devices.
The queues are used to decouple the bus driver from the application.
All receive and transmit operations are asynchronous.
This design implies asynchronous handling of protocol error codes.
Small embedded systems shall use the RTOS-provided primitives for communication between the driver and the application.
Do not use abstraction layers to isolate the used realtime kernel.
It makes the code more complex and less efficient.
Modern development environments with powerful refactoring tools make the change of the RTOS simple.
Be honest.
You seldom replace the selected RTOS with another one in your device family.
If you have a complex realtime system, evaluate using a linux based operating system.
Use linux design patterns to implement your application.
Training will be easier.
Numerous external suppliers can provide support.