FXTH870xD
Sensors
26
Freescale Semiconductor, Inc.
4.8
Security
The FXTH870xD includes circuitry to prevent unauthorized access to the contents of FLASH and RAM memory. When security
is engaged, FLASH and RAM are considered secure resources. Direct-page registers, high-page registers, and the
BACKGROUND DEBUG controller are considered unsecured resources. Programs executing within secure memory have
normal access to any MCU memory locations and resources. Attempts to access a secure memory location with a program
executing from an unsecured memory space or through the BACKGROUND DEBUG interface are blocked (writes are ignored
and reads return all 0s).
Security is engaged or disengaged based on the state of two nonvolatile register bits (SEC0[1:0]) in the FOPT register. During
reset, the contents of the nonvolatile location NVOPT are copied from FLASH into the working FOPT register in high-page
register space. A user engages security by programming the NVOPT location, which can be done at the same time the FLASH
memory is programmed. The 1:0 state disengages security and the other three combinations engage security. Notice the erased
state (1:1) makes the MCU secure. During development, whenever the FLASH is erased, it is good practice to immediately
program the SEC00 bit to 0 in NVOPT so SEC[1:0] = 1:0. This would allow the MCU to remain unsecured after a subsequent
reset.
The on-chip debug module cannot be enabled while the MCU is secure. The separate BACKGROUND DEBUG controller can
still be used for background memory access commands, but the MCU cannot enter ACTIVE BACKGROUND mode except by
holding BKGD/MS low at the rising edge of reset.
A user can choose to allow or disallow a security unlocking mechanism through an 8-byte backdoor security key. If the nonvolatile
KEYEN bit in NVOPT/FOPT is 0, the backdoor key is disabled and there is no way to disengage security without completely
erasing all FLASH locations. If KEYEN is 1, a secure user program can temporarily disengage security by:
1.
Writing 1 to KEYACC in the FCNFG register. This makes the FLASH module interpret writes to the backdoor
comparison key locations (NVBACKKEY through NV7) as values to be compared against the key rather
than as the first step in a FLASH program or erase command.
2.
Writing the user-entered key values to the NVBACKKEY through NV7 locations. These writes must be
done in order starting with the value for NVBACKKEY and ending with NV7. STHX must not be used for
these writes because these writes cannot be done on adjacent bus cycles. User software normally would get the key
codes from outside the MCU system through a communication interface such as a serial I/O.
3.
Writing 0 to KEYACC in the FCNFG register. If the 8-byte key that was just written matches the key stored in the
FLASH locations, SEC[1:0] are automatically changed to 1:0 and security will be disengaged until the next reset.
The security key can be written only from secure memory (either RAM or FLASH), so it cannot be entered through
BACKGROUND commands without the cooperation of a secure user program.
The backdoor comparison key (NVBACKKEY through NV7) is located in FLASH memory locations in the nonvolatile
register space so users can program these locations exactly as they would program any other FLASH memory location. The
nonvolatile registers are in the same 512-byte block of FLASH as the reset and interrupt vectors, so block protecting that space
also block protects the backdoor comparison key. Block protects cannot be changed from user application programs, so if the
vector space is block protected, the backdoor security key mechanism cannot permanently change the block protect, security
settings, or the backdoor key.
Security can always be disengaged through the BACKGROUND DEBUG interface by taking these steps:
1.
Disable any block protections by writing FPROT. FPROT can be written only with BACKGROUND DEBUG commands,
not from application software.
2.
Mass erase FLASH if necessary.
3.
Blank check FLASH. Provided FLASH is completely erased, security is disengaged until the next reset.
To avoid returning to secure mode after the next reset, program NVOPT so SEC[1:0] = 1:0.
NOTE
Enabling the security feature disables Freescale ability to perform failure analysis without
first completely erasing all flash memory contents. If the security feature is implemented,
customer shall be responsible for providing to Freescale unsecured parts for any failure
analysis to begin or supplying the entire contents of the device flash memory data as part of
the return process, to allow Freescale to erase and subsequently restore the device to its
original condition.
Содержание FXTH870 D Series
Страница 86: ...FXTH870xD Sensors 84 Freescale Semiconductor Inc Figure 57 Data Flow For Measurements...
Страница 170: ...FXTH870xD Sensors 168 Freescale Semiconductor Inc 19 Package Outline Figure 127 QFN Case Outline...
Страница 171: ...FXTH870xD Sensors Freescale Semiconductor Inc 169 Figure 128 QFN Case Outline...
Страница 172: ...FXTH870xD Sensors 170 Freescale Semiconductor Inc Figure 129 QFN Case Outline...
Страница 173: ...FXTH870xD Sensors Freescale Semiconductor Inc 171...