AnsweredAssumed Answered

problems with back-door keys access for MCU security

Question asked by Mohammad Ali Bahar on Jun 9, 2019
Latest reply on Jun 18, 2019 by lama

Hi every body.
i am working on s12xhy using codewarrior 5.1. i know that these steps must be performed for securing micro-controller.
1- backup the sector contains the flash configuration registers.
2- erase the sector.
3- make the desired manipulations:
3-1- clear ACCERR and PVIOL in FSTAT register.
3-2- program the back-door registers using write command (0x06) .
3-3- launch the command (FSTAT = 0x80).
4- restore the rest of flash sector.
is it correct?
now the problem appears: i cant program the configuration registers because their addresses locate on protected region:
FPROT = 0xCF means that the ranges with 0x7F_F000–0x7F_FFFF addresses are protected and backdoor keys locate in 0x7F_FF00 – 0x7F_FF07.
on the other hand it seems that i am not allowed to disable protection of this region. so how can i set the back-door keys?

another question: the the value of FSEC register is 0xFE. it means that MCU is unsecured and the backdoor access is disabled.
is it necessary to enable the backdoor access before securing operations?

Outcomes