Open-CMSIS-SVD
System View Description
|
This section describes elements that occur on various levels and specifies the general rules. Specific requirements are mentioned in the place where these elements occur.
The elements below appear on various levels and can be used to define arrays and lists in the code. Single descriptions get duplicated automatically into an array or a list. The subsequent is true for all elements of type dimableIdentifierType.
Parent Element | Element Chain | ||
---|---|---|---|
peripheral | /device/peripherals/peripheral element | ||
register | /device/peripherals/peripheral/registers/.../register element | ||
cluster | /device/pripherals/peripheral/registers/.../cluster element | ||
field | /device/peripherals/peripheral/registers/.../fields/field element | ||
Grouped Elements | Description | Type | Occurrence |
dim | Defines the number of elements in an array or list. | scaledNonNegativeInteger | 1..1 |
dimIncrement | Specify the address increment between two neighboring array or list members in the address map. | scaledNonNegativeInteger | 1..1 |
dimIndex | Specify the strings that substitue the placeholder %s within <name> and <displayName>. By default, <dimIndex> is a value starting with 0. Remark: Do not define <dimIndex> when using the placeholder [%s] in <name> or <displayName>. | dimIndexType | 0..1 |
dimName | Specify the name of the C-type structure. If not defined, then the entry in the <name> element is used. | identifierType | 0..1 |
dimArrayIndex | Grouping element to create enumerations in the header file. | dimArrayIndexType | 0..1 |
Example: The examples creates definitions for registers.
The code above generates the list: => GPIO_A_CTRL, GPIO_B_CTRL, GPIO_C_CTRL, GPIO_D_CTRL, GPIO_E_CTRL, GPIO_Z_CTRL
The example above generates the list: => IRQ3, IRQ4, IRQ5, IRQ6
The example above generates the array: => MyArr[4]
This information is used for generating an enum in the device header file. The debugger may use this information to display the identifier string as well as the description. Just like symbolic constants making source code more readable, the system view in the debugger becomes more instructive.
Example:
/device/peripherals/peripheral/.../dimArrayIndex
Parent Element | Element Chain | ||
---|---|---|---|
peripheral | /device/peripherals/peripheral element | ||
register | /device/peripherals/peripheral/registers/.../register element | ||
cluster | /device/pripherals/peripheral/registers/.../cluster element | ||
Child Elements | Description | Type | Occurrence |
headerEnumName | Specify the base name of enumerations. Overwrites the hierarchical enumeration type in the device header file. User is responsible for uniqueness across description. The headerfile generator uses the name of a peripheral or cluster as the base name for enumeration types. If <headerEnumName> element is specfied, then this string is used. | identifierType | 0..1 |
enumeratedValue | Specify the values contained in the enumeration. | enumeratedValueType | 1..* |
The following elements are available on various levels. Element values defined on a lower level overwrite element values defined on a more general level. For example, <register>.<size> overwrites <peripheral>.<size>. Elements not defined on a more general level, must be defined at <register> level at the latest.
Special requirements are described on the level where the element occurs. Click on the parent element in the table below for details.
Example:
Default settings have been defined for <width>, <size>, <access>, and <protection> on device level. These settings can be refined on subsequent levels.
Parent Element | Element Chain | ||
---|---|---|---|
device | /device element | ||
peripheral | /device/peripherals/peripheral element | ||
register | /device/peripherals/peripheral/registers/.../register element | ||
cluster | /device/pripherals/peripheral/registers/.../cluster element | ||
Below: Parent elements that have a reference to a single element of this block | |||
field | /device/peripherals/peripheral/registers/.../fields/field element (only for element <access>) | ||
sauRegionsConfig | /device/cpu/sauRegionsConfig element (element <protection> for attribute <protectionWhenDisabled>) | ||
addressBlock | /device/peripherals/peripheral/addressBlock element (only for element <protection>) | ||
Elements | Description | Type | Occurrence |
size | Define the default bit-width of any device register (implicit inheritance). The value can be redefined on any lower level using the <size> element there. | scaledNonNegativeInteger | 0..1 |
access | Define access rights. Access rights can be redefined at any lower level. Use one of the following predefined values:
| accessType | 0..1 |
protection | Specify the security privilege to access an address region. This information is relevant for the programmer as well as the debugger when no universal access permissions have been granted. If no specific information is provided, an address region is accessible in any mode. The following values can be used to protect accesses by the programmer or debugger:
| protectionStringType | 0..1 |
resetValue | Define the default value for all registers at RESET. The value can be redefined on any lower level using the <resetValue> element there. The actual reset value is calculated from the <resetValue> and the <resetMask>. The mask is used to specify bits with an undefined reset value. | scaledNonNegativeInteger | 0..1 |
resetMask | Identify register bits that have a defined reset value. These bit positions are set to 1. Bit positions with an undefined reset value are set to 0. | scaledNonNegativeInteger | 0..1 |