1.2 Code Security Module (CSM)
The code security module (CSM) is a security feature incorporated in the C28x devices. It prevents access/
visibility to on-chip memory to unauthorized persons — that is, it prevents duplication/reverse engineering of
proprietary code.
The word "secure" means access to on-chip secure memory is protected. The word "unsecure" means access
to on-chip secure memory is not protected — that is, the contents of the memory could be read by any means
(through a debugging tool such as the Code Composer Studio
™
integrated development environment (IDE), for
example).
1.2.1 Functional Description
The security module restricts the CPU access to certain on-chip memory without interrupting or stalling CPU
execution. When a read occurs to a protected memory location, the read returns a zero value and CPU
execution continues with the next instruction. This, in effect, blocks read and write access to various memories
through the JTAG port or external peripherals. Security is defined with respect to the access of on-chip memory
and prevents unauthorized copying of proprietary code or data.
The device is secure when CPU access to the on-chip secure memory locations is restricted. When secure,
two levels of protection are possible, depending on where the program counter is currently pointing. If code
is currently running from inside secure memory, only an access through JTAG is blocked (that is, through the
debug probe). This allows secure code to access secure data. Conversely, if code is running from nonsecure
memory, all accesses to secure memories are blocked. User code can dynamically jump in and out of secure
memory, thereby allowing secure function calls from nonsecure memory. Similarly, interrupt service routines can
be placed in secure memory, even if the main program loop is run from nonsecure memory.
Security is protected by a password of 128-bits of data (eight 16-bit words) that is used to secure or unsecure
the device. This password is stored at the end of flash in 8 words referred to as the password locations.
The device is unsecured by executing the password match flow (PMF), described in
of security are shown in
.
Table 1-9. Security Levels
PMF Executed
With Correct
Password?
Operating Mode
Program Fetch
Location
Security Description
No
Secure
Outside secure memory
Only instruction fetches by the CPU are allowed to secure
memory. In other words, code can still be executed, but not
read
No
Secure
Inside secure memory
CPU has full access.
JTAG port cannot read the secured memory contents.
Yes
Not Secure
Anywhere
Full access for CPU and JTAG port to secure memory
The password is stored in code security password locations (PWL) in flash memory (0x3F 7FF8 - 0x3F 7FFF).
These locations store the password predetermined by the system designer.
If the password locations have all 128 bits as ones, the device is labeled unsecure. Since new flash devices
have erased flash (all ones), only a read of the password locations is required to bring the device into unsecure
mode. If the password locations have all 128 bits as zeros, the device is secure, regardless of the contents of
the KEY registers. Do not use all zeros as a password or reset the device during an erase of the flash. Resetting
the device during an erase routine can result in either an all zero or unknown password. If a device is reset when
the password locations are all zeros, the device cannot be unlocked by the password match flow described in
. Using a password of all zeros will seriously limit your ability to debug secure code or reprogram
the flash.
System Control and Interrupts
52
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......