Using DCSM for Freedom From Interference (FFI)

group sdl_ex_dcsm_ffi

sdl_ex_dcsm_ffi

This example demonstrates how to configure and use DCSM and how the DCSM blocks writes from one secured zone to another, simulating the its use to create firewalls between code of different safety requirement criticality.

It uses the default passwords to allocate one LSRAM block and one flash sector to zone 1 and another to zone 2. In this example, zoning of memories is done by programming the DCSM OTP. The values that are programmed can be found in in dcsm.asm. Secured RAM blocks are partitioned to contain data arrays used in the example, and secured Flash sectors contain the program code. Once secure, both zone1LockedArray and zone2LockedArray are immutable outside of the safety functions residing in the same zone.

!!IMPORTANT!! By default, assignments in dcsm.asm are commented out and the sections mapped to OTP in dcsm.cmd are given the “type = DSECT” attribute to prevent programming of the OTP. In this state, this example is expected to fail (result = FAIL) because the memories won’t actually be secured. If you are sure you want to permanently update the zones’ link pointers and zone select blocks, uncomment the code in dcsm.asm and remove “type = DSECT” from dcsm.cmd.

Parts of this example where generated with assistance from the DCSM Tool. We strongly recommend using this tool to generate the code for your DCSM configuration. Refer to the following guide for more information: http://www.ti.com/lit/pdf/spracp8

External Connections

  • None.

Note

This example assumes you have not written to the DCSM OTP before and that the first zone select block is available for use. If this is not the case, you will need to update the link pointer, zone select block address, and passwords to use the next available zone select block.

Watch Variables

  • result - Status indicating success of blocking writes to secured zones.

  • errorZone1NotChanged, errorZone2NotChanged, errorZone1Changed, errorZone2Changed - Count of errors found during execution.

  • zone1LockedArray - Array located in zone 1 secured memory.

  • zone2LockedArray - Array located in zone 2 secured memory.