Product Specs

Table Of Contents
47 PWM Pulse width modulation
Page
505
ND
Table 117: Recommended GPIO configuration before starting PWM generation
PWM signal
PWM pin
Direction
Output value
Comment
OUT[n]
As specified in PSEL.OUT[n]
(n=0..3)
Output
0
Idle state defined in GPIO->OUT
47.5 Registers
Table 118: Instances
Base address
Peripheral
Instance
Description Configuration
0x4001C000
PWM
PWM0
Pulse Width Modulation Unit 0
0x40021000
PWM
PWM1
Pulse Width Modulation Unit 1
0x40022000
PWM
PWM2
Pulse Width Modulation Unit 2
Table 119: Register Overview
Register
Offset
Description
TASKS_STOP
0x004
Stops PWM pulse generation on all channels at the end of current PWM period, and stops sequence
playback
TASKS_SEQSTART[0]
0x008
Loads the first PWM value on all enabled channels from sequence 0, and starts playing that
sequence at the rate defined in SEQ[0]REFRESH and/or DECODER.MODE. Causes PWM generation to
start it was not running.
TASKS_SEQSTART[1]
0x00C
Loads the first PWM value on all enabled channels from sequence 1, and starts playing that
sequence at the rate defined in SEQ[1]REFRESH and/or DECODER.MODE. Causes PWM generation to
start it was not running.
TASKS_NEXTSTEP
0x010
Steps by one value in the current sequence on all enabled channels if DECODER.MODE=NextStep.
Does not cause PWM generation to start it was not running.
EVENTS_STOPPED
0x104
Response to STOP task, emitted when PWM pulses are no longer generated
EVENTS_SEQSTARTED[0]
0x108
First PWM period started on sequence 0
EVENTS_SEQSTARTED[1]
0x10C
First PWM period started on sequence 1
EVENTS_SEQEND[0]
0x110
Emitted at end of every sequence 0, when last value from RAM has been applied to wave counter
EVENTS_SEQEND[1]
0x114
Emitted at end of every sequence 1, when last value from RAM has been applied to wave counter
EVENTS_PWMPERIODE
0x118
Emitted at the end of each PWM period
EVENTS_LOOPSDONE
0x11C
Concatenated sequences have been played the amount of times defined in LOOP.CNT
SHORTS
0x200
Shortcut register
INTEN
0x300
Enable or disable interrupt
INTENSET
0x304
Enable interrupt
INTENCLR
0x308
Disable interrupt
ENABLE
0x500
PWM module enable register
MODE
0x504
Selects operating mode of the wave counter
COUNTERTOP
0x508
Value up to which the pulse generator counter counts
PRESCALER
0x50C
Configuration for PWM_CLK
DECODER
0x510
Configuration of the decoder
LOOP
0x514
Amount of playback of a loop
SEQ[0].PTR
0x520
Beginning address in Data RAM of this sequence
SEQ[0].CNT
0x524
Amount of values (duty cycles) in this sequence
SEQ[0].REFRESH
0x528
Amount of additional PWM periods between samples loaded into compare register
SEQ[0].ENDDELAY
0x52C
Time added after the sequence
SEQ[1].PTR
0x540
Beginning address in Data RAM of this sequence
SEQ[1].CNT
0x544
Amount of values (duty cycles) in this sequence
SEQ[1].REFRESH
0x548
Amount of additional PWM periods between samples loaded into compare register
SEQ[1].ENDDELAY
0x54C
Time added after the sequence
PSEL.OUT[0]
0x560
Output pin select for PWM channel 0
PSEL.OUT[1]
0x564
Output pin select for PWM channel 1
PSEL.OUT[2]
0x568
Output pin select for PWM channel 2
PSEL.OUT[3]
0x56C
Output pin select for PWM channel 3