A method is provided for controlling a microcontroller in a control unit
in a motor vehicle, having a processor core, at least one read-only
memory area and at least one rewritable memory area, at least one control
program which is intended to be processed by the processor core being
stored in the rewritable memory area. In order to provide a method for
controlling a microcontroller in a control unit that better protects the
verification of memories of the microcontroller against unauthorized
intervention, a verification program is stored in a write-once memory
area of the rewritable memory area and a service program is stored in the
read-only memory area. The verification program is called by the control
program via the service program at regular intervals and verifies at
least part of the rewritable memory area. In addition, the service
program resets a counter. A RESET of the control unit is triggered by the
verification program when manipulation of the verified memory area is
detected or by the counter in the event of counter overflow.