Design of a safety-critical drive-by-wire system using FlexCAN