A method for reprogramming data of a software function executed by at least one execution core and at least one security core, the data to be reprogrammed being present in at least one non-volatile memory managed by an execution core and in at least one non-volatile memory managed by a security core, the at least one non-volatile memory managed by an execution core being physically separate from the at least one non-volatile memory managed by a security core, each non-volatile memory being managed by a set of management functions, comprising:
- when a reprogramming request is received,
- storing a second value in a first Boolean location,
- determining whether a value in the first Boolean location is equal to the second value and whether a value in a second Boolean location is equal to a first value,
- if this is the case, making an execution core transmit at least one reinitialization request via a bidirectional communication channel to the at least one security core managing a non-volatile memory comprising data to be reprogrammed and at least one initialization request to each set of management functions for the non-volatile memory managed by an execution core comprising data to be reprogrammed,
- after a predetermined period starting from the time of transmission of the at least one reinitialization request has elapsed, storing the second value in the second Boolean location,
- determining whether a predetermined reprogramming event has taken place,
- if this is the case, storing the first value in the first Boolean location, while at the same time keeping the second value in the second Boolean location, and making the at least one security core managing a non-volatile memory comprising data to be reprogrammed transmit a request to write predetermined and stored values to the set of management functions for the memory associated with the non-volatile memory managed by said at least one security core, such that predetermined and stored values considered to be blank and associated with the software function are written to said non-volatile memory managed by said at least one security core comprising data to be reprogrammed.