Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Automotive ECUs use cyclic communication and are event driven. ECUs send their signals over CAN at a defined message rate, regardless of whether the state has changed. Other ECUs set up their hardware to monitor the signals they care about, and trigger a hardware interrupt when the signal is received.


ECUs do both cyclic and event-driven, but typically the software logic is event driven, the communication is cyclic.

There's cyclic communication by sending messages over CAN (if reliability doesn't matter that much) or FlexRay (if reliability matters), so if you examine the network, you'll typically see the same PDUs repeat in a cyclic manner. But an individual ECU will handle the bulk of its logic in an event-driven way. An interrupt will trigger for the incoming CAN frame (and that's an event-driven thing!) but a couple of layers up it will most likely just set a flag for what changed, and it will actually be taken care on a logical level when the relevant task's loop runs next time.


> […] and trigger a hardware interrupt when the signal is received.

That is the definition of event driven.

The same is not only true for the CAN-based, and CAN FD-based communication, but also for the Automotive Ethernet-based communication.

There were tries with Time-triggered protocols like TTP/C (used by Daimler for exactly one model) and FlexRay which had cyclic communication. The communication cycle required that the ECUs are synced to the communication cycle because they needed to have to correct data available at exactly their time slot. If they missed the time slot, the data got marked as stale. The same problem on the receiving side.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: