The present invention relates to an electronic device comprising a first CPU, a second CPU, a first
delay stage and a second
delay stage for delaying data propagating on a
bus, a CPU compare unit, and wherein the first
delay stage is coupled to an output of the first CPU and a first input of the CPU compare unit, an input of the first CPU is coupled to a
system input
bus, the second delay stage is coupled to the
system input
bus and to an input of the second CPU, an output of the second CPU (CPU2) is coupled to the CPU compare unit, and wherein the first CPU and the second CPU are adapted to execute the same
program code and the CPU compare unit is adapted to compare an output
signal of the first delay stage, which is a delayed output
signal of the first CPU, with an output
signal of the second CPU. In one embodiment, the present invention relates to a method for lock-step comparison of CPU outputs of an electronic device, in particular a
microcontroller, having a dual
CPU architecture, the method comprising executing the same
program code on a first CPU and a second CPU in response to data provided via a
system input bus, delaying an output data of the first CPU by a predetermined first delay to receive a delayed output data, delaying the data to be input to the second CPU by a predetermined second delay, and comparing the output data of the second CPU with the delayed output data of the first CPU.