| CMSIS-Driver Peripheral Interface for Middleware and Application Code |

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations
Driver_Storage.h File Reference

## Data Structures
struct | ARM_STORAGE_BLOCK_ATTRIBUTES
| Attributes of the storage range within a storage block. More...
struct | ARM_STORAGE_BLOCK
| A storage block is a range of memory with uniform attributes. More...
struct | ARM_STORAGE_SECURITY_FEATURES
struct | ARM_STORAGE_INFO
struct | ARM_STORAGE_STATUS
| Operating status of the storage controller. More...
struct | ARM_STORAGE_CAPABILITIES
| Storage Driver API Capabilities. More...
struct | ARM_DRIVER_STORAGE

## Macros
#define | ARM_STORAGE_API_VERSION ARM_DRIVER_VERSION_MAJOR_MINOR(1,2) /* API version */
#define | _ARM_Driver_Storage_(n) Driver_Storage##n
#define | ARM_Driver_Storage_(n) _ARM_Driver_Storage_(n)
#define | ARM_STORAGE_INVALID_OFFSET (0xFFFFFFFFFFFFFFFFULL)
| Invalid address (relative to a storage controller's address space). A storage block may never start at this address.
#define | ARM_STORAGE_INVALID_ADDRESS (0xFFFFFFFFUL)
| Invalid address within the processor's memory address space. Refer to memory-mapped storage, i.e. ARM_DRIVER_STORAGE::ResolveAddress().
#define | ARM_STORAGE_ERROR_NOT_ERASABLE (ARM_DRIVER_ERROR_SPECIFIC - 1)
| Part (or all) of the range provided to Erase() isn't erasable.
#define | ARM_STORAGE_ERROR_NOT_PROGRAMMABLE (ARM_DRIVER_ERROR_SPECIFIC - 2)
| Part (or all) of the range provided to ProgramData() isn't programmable.
#define | ARM_STORAGE_ERROR_PROTECTED (ARM_DRIVER_ERROR_SPECIFIC - 3)
| Part (or all) of the range to Erase() or ProgramData() is protected.
#define | ARM_STORAGE_VALID_BLOCK(BLK) (((BLK)->addr != ARM_STORAGE_INVALID_OFFSET) && ((BLK)->size != 0))
#define | ARM_STORAGE_PROGRAMMABILITY_RAM (0U)
| Values for encoding storage memory-types with respect to programmability.
#define | ARM_STORAGE_PROGRAMMABILITY_ROM (1U)
| Read-only memory.
#define | ARM_STORAGE_PROGRAMMABILITY_WORM (2U)
| write-once-read-only-memory (WORM).
#define | ARM_STORAGE_PROGRAMMABILITY_ERASABLE (3U)
| re-programmable based on erase. Supports multiple writes.
#define | ARM_RETENTION_WHILE_DEVICE_ACTIVE (0U)
| Data is retained only during device activity.
#define | ARM_RETENTION_ACROSS_SLEEP (1U)
| Data is retained across processor sleep.
#define | ARM_RETENTION_ACROSS_DEEP_SLEEP (2U)
| Data is retained across processor deep-sleep.
#define | ARM_RETENTION_BATTERY_BACKED (3U)
| Data is battery-backed. Device can be powered off.
#define | ARM_RETENTION_NVM (4U)
| Data is retained in non-volatile memory.
#define | ARM_STORAGE_PROGRAM_CYCLES_INFINITE (0UL)

## Typedefs
typedef void(* | ARM_Storage_Callback_t) (int32_t status, ARM_STORAGE_OPERATION operation)

## Enumerations
enum | ARM_STORAGE_OPERATION { ARM_STORAGE_OPERATION_GET_VERSION , ARM_STORAGE_OPERATION_GET_CAPABILITIES , ARM_STORAGE_OPERATION_INITIALIZE , ARM_STORAGE_OPERATION_UNINITIALIZE , ARM_STORAGE_OPERATION_POWER_CONTROL , ARM_STORAGE_OPERATION_READ_DATA , ARM_STORAGE_OPERATION_PROGRAM_DATA , ARM_STORAGE_OPERATION_ERASE , ARM_STORAGE_OPERATION_ERASE_ALL , ARM_STORAGE_OPERATION_GET_STATUS , ARM_STORAGE_OPERATION_GET_INFO , ARM_STORAGE_OPERATION_RESOLVE_ADDRESS , ARM_STORAGE_OPERATION_GET_NEXT_BLOCK , ARM_STORAGE_OPERATION_GET_BLOCK }

## Data Structure Documentation

## ◆ ARM_STORAGE_SECURITY_FEATURES

struct ARM_STORAGE_SECURITY_FEATURES

Device Data Security Protection Features. Applicable mostly to EXTERNAL_NVM.

Data Fields
uint32_t | acls: 1 | Protection against internal software attacks using ACLs.
uint32_t | rollback_protection: 1 | Roll-back protection. Set to true if the creator of the storage can ensure that an external attacker can't force an older firmware to run or to revert back to a previous state.
uint32_t | tamper_proof: 1 | Tamper-proof memory (will be deleted on tamper-attempts using board level or chip level sensors).
uint32_t | internal_flash: 1 | Internal flash.
uint32_t | reserved1: 12 |
uint32_t | software_attacks: 1 | device software (malware running on the device). Encode support for hardening against various classes of attacks.
uint32_t | board_level_attacks: 1 | board level attacks (debug probes, copy protection fuses.)
uint32_t | chip_level_attacks: 1 | chip level attacks (tamper-protection).
uint32_t | side_channel_attacks: 1 | side channel attacks.
uint32_t | reserved2: 12 |

## Macro Definition Documentation

## ◆ ARM_STORAGE_API_VERSION

#define ARM_STORAGE_API_VERSION ARM_DRIVER_VERSION_MAJOR_MINOR(1,2) /* API version */

## ◆ _ARM_Driver_Storage_

#define _ARM_Driver_Storage_ | ( |  | n | ) | Driver_Storage##n

## ◆ ARM_Driver_Storage_

#define ARM_Driver_Storage_ | ( |  | n | ) | _ARM_Driver_Storage_(n)

## ◆ ARM_STORAGE_INVALID_OFFSET

#define ARM_STORAGE_INVALID_OFFSET (0xFFFFFFFFFFFFFFFFULL)

Invalid address (relative to a storage controller's address space). A storage block may never start at this address.

## ◆ ARM_STORAGE_INVALID_ADDRESS

#define ARM_STORAGE_INVALID_ADDRESS (0xFFFFFFFFUL)

Invalid address within the processor's memory address space. Refer to memory-mapped storage, i.e. ARM_DRIVER_STORAGE::ResolveAddress().

## ◆ ARM_STORAGE_ERROR_NOT_ERASABLE

#define ARM_STORAGE_ERROR_NOT_ERASABLE (ARM_DRIVER_ERROR_SPECIFIC - 1)

Part (or all) of the range provided to Erase() isn't erasable.

## ◆ ARM_STORAGE_ERROR_NOT_PROGRAMMABLE

#define ARM_STORAGE_ERROR_NOT_PROGRAMMABLE (ARM_DRIVER_ERROR_SPECIFIC - 2)

Part (or all) of the range provided to ProgramData() isn't programmable.

## ◆ ARM_STORAGE_ERROR_PROTECTED

#define ARM_STORAGE_ERROR_PROTECTED (ARM_DRIVER_ERROR_SPECIFIC - 3)

Part (or all) of the range to Erase() or ProgramData() is protected.

## ◆ ARM_STORAGE_VALID_BLOCK

#define ARM_STORAGE_VALID_BLOCK | ( |  | BLK | ) | (((BLK)->addr != ARM_STORAGE_INVALID_OFFSET) && ((BLK)->size != 0))

The check for a valid ARM_STORAGE_BLOCK.

## ◆ ARM_STORAGE_PROGRAMMABILITY_RAM

#define ARM_STORAGE_PROGRAMMABILITY_RAM (0U)

Values for encoding storage memory-types with respect to programmability.

Please ensure that the maximum of the following memory types doesn't exceed 16; we encode this in a 4-bit field within ARM_STORAGE_INFO::programmability.

## ◆ ARM_STORAGE_PROGRAMMABILITY_ROM

#define ARM_STORAGE_PROGRAMMABILITY_ROM (1U)

Read-only memory.

## ◆ ARM_STORAGE_PROGRAMMABILITY_WORM

#define ARM_STORAGE_PROGRAMMABILITY_WORM (2U)

write-once-read-only-memory (WORM).

## ◆ ARM_STORAGE_PROGRAMMABILITY_ERASABLE

#define ARM_STORAGE_PROGRAMMABILITY_ERASABLE (3U)

re-programmable based on erase. Supports multiple writes.

## ◆ ARM_RETENTION_WHILE_DEVICE_ACTIVE

#define ARM_RETENTION_WHILE_DEVICE_ACTIVE (0U)

Data is retained only during device activity.

Values for encoding data-retention levels for storage blocks.

Please ensure that the maximum of the following retention types doesn't exceed 16; we encode this in a 4-bit field within ARM_STORAGE_INFO::retention_level.

## ◆ ARM_RETENTION_ACROSS_SLEEP

#define ARM_RETENTION_ACROSS_SLEEP (1U)

Data is retained across processor sleep.

## ◆ ARM_RETENTION_ACROSS_DEEP_SLEEP

#define ARM_RETENTION_ACROSS_DEEP_SLEEP (2U)

Data is retained across processor deep-sleep.

## ◆ ARM_RETENTION_BATTERY_BACKED

#define ARM_RETENTION_BATTERY_BACKED (3U)

Data is battery-backed. Device can be powered off.

## ◆ ARM_RETENTION_NVM

#define ARM_RETENTION_NVM (4U)

Data is retained in non-volatile memory.

## ◆ ARM_STORAGE_PROGRAM_CYCLES_INFINITE

#define ARM_STORAGE_PROGRAM_CYCLES_INFINITE (0UL)

Infinite or unknown endurance for reprogramming.