下载
![](https://oss-datasheet.aipcba.com/html/C77FCBB4D2EA23C42609AF9CB224B212/bg1.png)
1 Introduction
Some new Kinetis family devices include a feature that adds
access controls to the flash memory. Flash access controls
(FAC) are a configurable memory protection scheme designed
to allow end users to utilize software libraries while offering
programmable restrictions to these libraries. This allows
Freescale or third-party vendors to pre-program software
libraries into a chip and distribute parts to end customers who
can use the pre-programmed software libraries. The software
is distributed inside the chip, but does not provide end
customers the capability of reading the code from the device.
The FAC feature can be used to mark segments of the on-chip
flash memory as execute-only and/or supervisor/privileged-
only access. This document discusses usage of the FAC
feature to create execute-only regions in the flash, limitations
of the implementation, and recommendations to ensure
limitations are not exploited.
2
How flash access controls
work
The flash access control feature adds new registers to the flash
module. There are eight 8-bit XACC registers that define
which program flash segments are execute-only, and eight 8-
bit SACC registers that define which program flash segments
Freescale Semiconductor
Document Number: AN5112
Application Note
Rev. 0, 4/2015
Using the Kinetis Flash Execute-
Only Access Control Feature
© 2015 Freescale Semiconductor, Inc.
Contents
1 Introduction................................................................1
2 How flash access controls work................................ 1
3 Marking a segment as execute-only..........................2
4 Other effects of marking a region as
execute-only.............................................................. 3
5 Reasons for the inability to change an
execute-only segment back to data and code
access............................................................. ........... 4
6 Special considerations and limitations of
flash access controls................................... ...............4
7 References.................................................................8