CMSIS-SVD  Version 1.10
CMSIS System View Description

All fields of a register are enclosed between the <fields> opening and closing tags

A bit-field has a name that is unique within the register. The position and size within the register is either described by the combination of the least significant bit's position (lsb) and the most significant bit's position (msb), or the lsb and the bit-width of the field. A field may define an enumeratedValue in order to make the display more intuitive to read.



<fields>
    <field derivedFrom="identifierType">
        <name>xs:Name</name>
        <description>xs:string</description>
        <choice>
             <!-- bitRangeLsbMsbStyle --> 
            <bitOffset>scaledNonNegativeInteger<bitOffset>
            <bitWidth>scaledNonNegativeInteger</bitWidth>
            or
             <!-- bitRangeOffsetWidthStyle --> 
            <lsb>scaledNonNegativeInteger</lsb> 
            <msb>scaledNonNegativeInteger</msb>
            or
             <!-- bitRangePattern --> 
            <bitRange>pattern</bitRange>
        </choice>
        
        <access>accessType</access>
        <modifiedWriteValues>writeValueType</modifiedWriteValues>
        <writeConstraint>writeConstraintType</writeConstraint>
        <readAction>readActionType</readAction>
        <enumeratedValues>
            ...
        </enumeratedValues>
    </field>
    ...
    <field>
       ...
    </field>
    
<fields>

Attribute Name Description Type Occurrence
derivedFrom The field is cloned from a previously defined field with a unique name. xs:Name 0..1
Element Name Description Type Occurrence
name Name string used to identify the field. Field names must be unique within a register. xs:string 1..1
description String describing the details of the register. xs:string 0..1
Choice of Three options exist to describe the field's bit-range. The options are to be used mutually exclusive: 1..1
1. bitRangeLsbMsbStyle
bitOffset Value defining the position of the least significant bit of the field within the register it belongs to. scaledNonNegativeInteger 1..1
bitWidth Value defining the bit-width of the bitfield within the register it belongs to. scaledNonNegativeInteger 0..1
2. bitRangeOffsetWidthStyle
lsb Value defining the bit position of the least significant bit within the register it belongs to. scaledNonNegativeInteger 1..1
msb Value defining the bit position of the most significant bit within the register it belongs to. scaledNonNegativeInteger 1..1
3. bitRangePattern
bitRange A string in the format: "[<msb>:<lsb>]" bitRangeType 0..1
access Predefined strings can be used to define the allowed access types for this field: read-only, write-only, read-write, writeOnce, and read-writeOnce. Can be omitted if it matches the access permission set for the parent register. accessType 0..1
modifiedWriteValues Describe the manipulation of data written to a field. If not specified, the value written to the field is the value stored in the field. The other options are bitwise operations:
  • oneToClear: write data bit of one shall clear (set to zero) the corresponding bit in the field.
  • oneToSet: write data bit of one shall set (set to one) the corresponding bit in the field.
  • oneToToggle: write data bit of one shall toggle (invert) the corresponding bit in the field.
  • zeroToClear: write data bit of zero shall clear (set to zero) the corresponding bit in the field.
  • zeroToSet: write data bit of zero shall set (set to one) the corresponding bit in the field.
  • zeroToToggle: write data bit of zero shall toggle (invert) the corresponding bit in the field.
  • clear: after a write operation all bits in the field are cleared (set to zero).
  • set: after a write operation all bits in the field are set (set to one).
  • modify: after a write operation all bit in the field may be modified (default).
modifiedWriteValuesType 0..1
writeConstraint Three options exist to set write-constraints: 0..1
1. writeAsRead If TRUE, only the last read value can be written. xs:boolean 0..1
2. useEnumeratedValues If TRUE, only the values listed in the enumeratedValues list are considered valid write values. xs:boolean 0..1
3. range Consists of the following two elements:   0..1
minimum Specifies the smallest number to be written to the field. scaledNonNegativeInteger 1..1
maximum Specifies the largest number to be written to the field. scaledNonNegativeInteger 1..1
readAction If set, it specifies the side effect following a read operation. If not set, the field is not modified after a read. The defined side effects are:
  • clear: The field is cleared (set to zero) following a read operation.
  • set: The field is set (set to ones) following a read operation.
  • modify: The field is modified in some way after a read operation.
  • modifyExternal: One or more dependent resources other than the current field are immediately affected by a read operation (it is recommended that the field description specifies these dependencies). Debuggers are not expected to read this field location unless explicitly instructed by the user.
readActionType 0..1 register
enumeratedValues Next lower level of description. See section Enumerated Values Level for details.   0..2

Example:

...
<field>
<name>TimerCtrl0_IntSel</name>
<description>Select interrupt line that is triggered by timer overflow.</description>
<bitOffset>1</bitOffset>
<bitWidth>3</bitWidth>
<access>read-write</access>
<resetValue>0x0</resetValue>
<modifiedWriteValues>oneToSet</modifiedWriteValues>
<writeConstraint>
<range>
<minimum>0</minimum>
<maximum>5</maximum>
</range>
</writeConstraint>
<readAction>clear</readAction>
<enumeratedValues>
...
</enumeratedValues>
</field>
...