Improving vehicle passenger safety is of major importance in modern automotive industry. Within this framework, vehicle stability controllers play a key role, as they actively contribute to maintain vehicle driveability even in potentially dangerous situations. An example of such a controller is Electronic Stability Control (ESC), that brakes individual wheels to generate a direct yaw moment to stabilize the vehicle (e.g. from excessive understeer or oversteer). This paper presents the realtime implementation of a stability controller based on measured (and/or estimated) yaw rate and sideslip angle and on phase-plane related stability criteria. The control strategy is first developed in MATLAB-Simulink environment with a simplified vehicle model. Then, the controller is assessed via software-in-the-loop using a full vehicle model developed in Simcenter Amesim, before implementing it on a real-time platform. Results are promising, endorsing the implementation of hardware-in-the-loop using an Electronic Control Unit.