CMSIS-SVD: Peripherals Level

| CMSIS-SVD Version 1.3.1 CMSIS System View Description

- Main Page
- Usage and Description
- Reference

Peripherals Level
SVD File Schema Levels

All peripherals of a device are enclosed within the tag <peripherals>. At least one peripheral has to be defined. Each peripheral is enclosed in the tag <peripheral>.

- Each peripheral describes all registers belonging to that peripheral.
- The address range allocated by a peripheral is defined through one or more address blocks.
- An address block and register addresses are specified relative to the base address of a peripheral. The address block information can be used for constructing a memory map for the device peripherals.

Starting version 1.3 of the SVD specification arrays of peripherals can be specified. The single peripheral description gets duplicated automatically into an array. The number of array elements is specified by the <dim> element. The peripheral name needs to be of the format myPeripheral[s]. The <dimIncrement> specifies the address offset between two peripherals. The <dimIndex> is ignored. If you want to create copies of a peripheral using different names, please use the derivedFrom attribute.

Remarks
  The memory map does not contain any information about physical memory. The memories of a device are described as part of the CMSIS-PACK device description.

     <peripherals>

        <peripheral derivedFrom=identifierType>

            <name>identifierType</name>
            <version>xs:string</version>
            <description>xs:string</description>

            <groupName>identifierType</groupName>
            <prependToName>identifierType</prependToName>
            <appendToName>identifierType</appendToName>
            <disableCondition>xs:string</disableCondition>

            <baseAddress>scaledNonNegativeInteger</baseAddress>

             <!-- registerPropertiesGroup -->
            <size>scaledNonNegativeInteger</size>
            <access>accessType</access>
            <resetValue>scaledNonNegativeInteger</resetValue>
            <resetMask>scaledNonNegativeInteger</resetMask>
             <!-- end of registerPropertiesGroup -->

            <addressBlock>
                <offset>scaledNonNegativeInteger</offset>
                <size>scaledNonNegativeInteger</size>
                <usage>usageType</usage>
                <protection>protectionStringType</protection>
            </addressBlock>
            ...
            <addressBlock>
                <offset>scaledNonNegativeInteger</offset>
                <size>scaledNonNegativeInteger</size>
                <usage>usageType</usage>
                <protection>protectionStringType</protection>
            </addressBlock>

            <interrupt>
                <name>identifierType</name>
                <value>scaledNonNegativeInteger</value>
            </interrupt>

            <registers>
                ...
            </registers>

        </peripheral>
        ...
        <peripheral>
           ...
        </peripheral>

    </peripherals>

Attribute Name | Description | Type | Occurrence
--- | --- | --- | ---
derivedFrom | Specifies the name of a peripheral from which this peripheral will be derived. Values are inherit. Elements specified underneath will override inherited values. | xs:Name | 0..1
Element Name | Description | Type | Occurrence
name | The name string is used to identify the peripheral. Peripheral names are required to be unique for a device. The name needs to be an ANSI C identifier to allow header file generation. | xs:Name | 1..1
version | The string specifies the version of this peripheral description. | xs:string | 0..1
description | The string provides an overview of the purpose and functionality of the peripheral. | xs:string | 0..1
groupName |  | xs:string | 0..1
prependToName | All register names of this peripheral have their names prefixed with this string. | xs:string | 0..1
appendToName | All register names of this peripheral have their names suffixed with this string. | xs:string | 0..1
disableCondition | Is a C-language compliant logical expression returning a TRUE or FALSE result. If TRUE, refreshing the display for this peripheral is disabled and related accesses by the debugger are suppressed. Only constants and references to other registers contained in the description are allowed: <peripheral>-><register>-><field>, for example, (System->ClockControl->apbEnable == 0). The following operators are allowed in the expression [&&,||, ==, !=, >>, <<, &, |]. Attention Use this feature only in cases where accesses from the debugger to registers of un-clocked peripherals result in severe debugging failures. SVD is intended to provide static information and does not include any run-time computation or functions. Such capabilities can be added by the tools, and is beyond the scope of this description language. | xs:string | 0..1
baseAddress | Lowest address reserved or used by the peripheral. | scaledNonNegativeInteger | 1..1
See registerPropertiesGroup for details.
size | Defines the default bit-width of any register contained in the device (implicit inheritance). | scaledNonNegativeInteger | 0..1
access | Defines the default access rights for all registers. | accessType | 0..1
protection | Defines the protection rights for all registers. | protectionStringType | 0..1
resetValue | Defines the default value for all registers at RESET. | scaledNonNegativeInteger | 0..1
resetMask | Identifies which register bits have a defined reset value. | scaledNonNegativeInteger | 0..1
addressBlock | Specifies an address range uniquely mapped to this peripheral. A peripheral must have at least one address block, but may allocate multiple distinct address ranges. If a peripheral is derived form another peripheral, the addressBlock is not mandatory. | addressBlockType | 1..*
offset | Specifies the start address of an address block relative to the peripheral baseAddress. | scaledNonNegativeInteger | 1..1
size | Specifies the number of addressUnitBits being covered by this address block. The end address of an address block results from the sum of baseAddress, offset, and (size - 1). | scaledNonNegativeInteger | 1..1
usage | The following predefined values can be used: registers, buffer, or reserved. | scaledNonNegativeInteger | 1..1
interrupt | A peripheral can have multiple associated interrupts. This entry allows the debugger to show interrupt names instead of interrupt numbers. | interruptType | 0..*
name | The string represents the interrupt name. | XS:string | 1..1
value | Is the enumeration index value associated to the interrupt. | xs:integer | 1..1
registers | See Registers Level for details. |  | 0..1

# Example:

...
<peripheral>
<name>Timer0</name>
<version>1.0.32</version>
<description>Timer 0 is a simple 16 bit timer counting down ... </description>
<baseAddress>0x40000000</baseAddress>
<addressBlock>
<offset>0x0</offset>
<size>0x400</size>
<usage>registers</usage>
<protection>s</protection>
</addressBlock>
<interrupt><name>TIM0_INT</name><value>34</value></interrupt>
<registers>
...
</registers>
</peripheral>
<peripheral derivedFrom="Timer0">
<name>Timer1</name>
<baseAddress>0x40000400</baseAddress>
</peripheral>
...