According to the
memory controller and the
microcontroller chip provided by the invention, on the basis of a
memory controller architecture with an ECC (Error
Correction Code)
verification logic module, an intelligent
copying control module is additionally added, and when a CPU (
Central Processing Unit) reads corresponding contents in a first memory, the corresponding contents in the first memory are copied; according to the method, the soft failure position can be accurately identified through the ECC
verification logic module, errors of 1 bit or 2 bit or several bits can be corrected, and when the error correction capability range of ECC
verification is exceeded, the error correction requirements of the soft failure position and the
system can be corrected by the intelligent
copy control module according to the conditions of different ECC verification errors and the condition of the soft failure position. Different error correction
modes are selected to process the soft failure in the first memory, and it is not necessary to generate reset to destroy coherent execution of a program when the error correction capability range of ECC verification is exceeded every time, so that quick correction of soft failure errors is realized under different soft failure conditions, the
system operation coherence is improved, and the error correction efficiency is improved. And high reliability of
system operation is considered, and various reliability demand scenes are covered.