If the code-security feature is used, any one of the following directives must be used when a function residing in
secure memory calls another function which belongs to a different secure zone or to unsecure memory:
• Use unsecure memory as stack
• Switch stack to unsecure memory before calling the function
• Unlock security before calling the function
Note that the above directives apply for any address-based-parameters passed on to the called function,
basically making sure that the called function can read/write to these address-based parameters.
1.2.3.1 Environments That Require Security Unlocking
Following are the typical situations under which unsecuring may be required:
• Code development using debuggers (such as Code Composer Studio™ IDE).
This is the most common environment during the design phase of a product.
• Flash programming using TI's flash utilities such as Code Composer Studio™ Flash Programmer plug-in or
Uniflash.
Flash programming is common during code development and testing. Once the user supplies the necessary
password, the flash utilities disable the security logic before attempting to program the flash. The flash utilities
can disable the code security logic in new devices without any authorization, since new devices come with
an erased flash. However, reprogramming devices (that already contain a custom password) require the
password to be supplied to the flash utilities in order to unlock the device to enable programming. In custom
programming solutions that use the flash API supplied by TI unlocking the CSM can be avoided by executing
the flash programming algorithms from secure memory.
• Custom environment defined by the application
In addition to the above, access to secure memory contents can be required in situations such as:
• Using the on-chip bootloader to load code or data into secure SARAM or to erase/program the flash.
• Executing code from on-chip unsecure memory and requiring access to secure memory for lookup table. This
is not a suggested operating condition as supplying the password from external code could compromise code
security.
The unsecuring sequence is identical in all the above situations. This sequence is referred to as the
password
match flow (PMF)
for simplicity.
explains the sequence of operation that is required every time the
user attempts to unsecure a device. A code example is listed for clarity.
System Control and Interrupts
56
TMS320x2806x Microcontrollers
SPRUH18I – JANUARY 2011 – REVISED JUNE 2022
Copyright © 2022 Texas Instruments Incorporated
Содержание TMS320 2806 Series
Страница 2: ......