PDM — Pulse density modulation interface

The pulse density modulation (PDM) module enables input of pulse density modulated signals from external audio frontends, for example, digital microphones. The PDM module generates the PDM clock and supports single-channel or dual-channel (left and right) data input. Data is transferred directly to RAM buffers using EasyDMA.

The main features of PDM are:

The PDM module illustrated below is interfacing up to two digital microphones with the PDM interface. EasyDMA is implemented to relieve the real-time requirements associated with controlling of the PDM slave from a low priority CPU execution context. It also includes all the necessary digital filter elements to produce pulse code modulation (PCM) samples. The PDM module allows continuous audio streaming.

Figure 1. PDM module
PDM module

Master clock generator

The master clock generator's PRESCALER register allows adjusting the PDM clock's frequency.

The master clock generator does not add any jitter to the HFCLK source chosen. It is recommended (but not mandatory) to use the Xtal as HFCLK source.

The PDM frequency can be adjusted by using PRESCALER, even while the clock generator is running. The PDM clock frequency CLK = PCLK32M/(2*PRESCALER)

Table 1. Configuration examples
Requested PDM frequency fpdm [Hz]fsource [Hz]RATIOPRESCALERActual PDM frequency factual [Hz]Sample frequency [Hz]Error [%]
102400032000000 (PCLK32M)64311032258161290.81
128000032000000 (PCLK32M)80251280000160000.0
80000032000000 (PCLK32M)5040800000160000.0

Module operation

By default, bits from the left PDM microphone are sampled on PDM_CLK falling edge, and bits for the right are sampled on the rising edge of PDM_CLK, resulting in two bitstreams. Each bitstream is fed into a digital filter which converts the PDM stream into 16-bit PCM samples, then filters and down-samples them to reach the appropriate sample rate.

The EDGE field in the MODE register allows swapping left and right, so that left will be sampled on rising edge, and right on falling.

The PDM module uses EasyDMA to store the samples coming out from the filters into one buffer in RAM. Depending on the mode chosen in the OPERATION field in the MODE register, memory either contains alternating left and right 16-bit samples (Stereo), or only left(or only right, depending on the value of the EDGE field) 16-bit samples (Mono). To ensure continuous PDM sampling, it is up to the application to update the EasyDMA destination address pointer as the previous buffer is filled.

The continuous transfer can be started or stopped by sending the START and STOP tasks. STOP becomes effective after the current frame has finished transferring, which will generate the STOPPED event. The STOPPED event indicates that all activity in the module is finished, and that the data is available in RAM (EasyDMA has finished transferring as well). Attempting to restart before receiving the STOPPED event may result in unpredictable behavior.

Decimation filter

In order to convert the incoming data stream into PCM audio samples, a decimation filter is included in the PDM interface module.

The input of the filter is the two-channel PDM serial stream (with left channel on clock high, right channel on clock low). Its output is 2 × 16-bit PCM samples at a sample rate lower than the PDM clock rate at a ratio depending on the RATIO register.

The filter stage of each channel is followed by a digital volume control, to attenuate or amplify the output samples in a range of -20 dB to +20 dB around the default (reset) setting, defined by GPDM,default. The gain is controlled by the GAINL and GAINR registers.

As an example, if the goal is to achieve 2500 RMS output samples (16-bit) with a 1 kHz 90 dBA signal into a -26 dBFS sensitivity PDM microphone, do the following:
  • Sum the PDM module's default gain (GPDM,default) and the gain introduced by the microphone and acoustic path of his implementation (an attenuation would translate into a negative gain)
  • Adjust GAINL and GAINR by the above summed amount. Assuming that only the PDM module influences the gain, GAINL and GAINR must be set to -GPDM,default dB to achieve the requirement.

With GPDM,default = 3.2 dB, and as GAINL and GAINR are expressed in 0.5 dB steps, the closest value to program would be 3.0 dB, which can be calculated as:

GAINL = GAINR = (DefaultGain - (2 * 3))

Remember to check that the resulting values programmed into GAINL and GAINR fall within MinGain and MaxGain.

EasyDMA

Samples will be written directly to RAM, and EasyDMA must be configured accordingly.

The address pointer for the EasyDMA channel is set in SAMPLE.PTR register. If the destination address set in SAMPLE.PTR is not pointing to the Data RAM region, an EasyDMA transfer may result in a HardFault or RAM corruption. See Memory for more information about the different memory regions.

Note: The value programmed in SAMPLE.PTR register should be 32bit aligned

The DMA transfer supports Stereo (left and right 16-bit samples) and Mono (left only) data transfer as configured in the OPERATION field of the MODE register. The samples are stored little endian.

Table 2. DMA sample storage
MODE.OPERATIONBits per sampleResult stored per RAM wordPhysical RAM allocated (32-bit words)Result boundary indexes in RAMNote
Stereo32 (2x16)L+Rceil(SAMPLE.MAXCNT/2)R0=[31:16]; L0=[15:0]Default
Mono162xLceil(SAMPLE.MAXCNT/2)L1=[31:16]; L0=[15:0]

The destination buffer in RAM consists of one block, the size of which is set in SAMPLE.MAXCNT register. Format is number of bytes used by the samples that will be stored in the memory. The physical RAM allocated is always:

(RAM allocation, in bytes) = SAMPLE.MAXCNT * 2;

(but the mapping of the samples depends on MODE.OPERATION.

If OPERATION=Stereo, RAM will contain a succession of left and right samples.

If OPERATION=Mono, RAM will contain a succession of left only samples.

For a given value of SAMPLE.MAXCNT, the buffer in RAM can contain half the stereo sampling time as compared to the mono sampling time.

The PDM acquisition can be started by the START task, after the SAMPLE.PTR and SAMPLE.MAXCNT registers have been written. When starting the module, it will take some time for the filters to start outputting valid data. Transients from the PDM microphone itself may also occur. The first few samples (typically around 50) might hence contain invalid values or transients. It is therefore advised to discard the first few samples after a PDM start.

As soon as the STARTED event is received, the firmware can write the next SAMPLE.PTR value (this register is double-buffered), to ensure continuous operation.

When the buffer in RAM is filled with samples, an END event is triggered. The firmware can start processing the data in the buffer. Meanwhile, the PDM module starts acquiring data into the new buffer pointed to by SAMPLE.PTR, and sends a new STARTED event, so that the firmware can update SAMPLE.PTR to the next buffer address.

Hardware example

PDM can be configured with a single microphone (mono), or with two microphones.

When a single microphone is used, connect the microphone clock to CLK, and data to DIN.

The following figures show a single PDM microphone, wired as left.

Figure 2. Left wired microphone

The following figures show a single PDM microphone, wired as right.

Figure 3. Right wired microphone

Note that in a single microphone (mono) configuration, depending on the microphone’s implementation, either the left or the right channel (sampled at falling or rising CLK edge respectively) will contain reliable data.

If two microphones are used, one of them has to be set as left, the other as right (L/R pin tied high or to GND on the respective microphone). It is strongly recommended to use two microphones of exactly the same brand and type so that their timings in left and right operation match.

Figure 4. Example of two PDM microphones

Pin configuration

The CLK and DIN signals associated to the PDM module are mapped to physical pins according to the configuration specified in the PSEL.CLK and PSEL.DIN registers respectively. If the CONNECT field in any PSEL register is set to Disconnected, the associated PDM module signal will not be connected to the required physical pins, and will not operate properly.

The PSEL.CLK and PSEL.DIN registers and their configurations are only used as long as the PDM module is enabled, and retained only as long as the device is in System ON mode. See POWER — Power control for more information about power modes. When the peripheral is disabled, the pins will behave as regular GPIOs, and use the configuration in their respective OUT bit field and PIN_CNF[n] register.

To ensure correct behavior in the PDM module, the pins used by the PDM module must be configured in the GPIO peripheral as described in GPIO configuration before enabling peripheral before enabling the PDM module. This is to ensure that the pins used by the PDM module are driven correctly if the PDM module itself is temporarily disabled or the device temporarily enters System OFF. This configuration must be retained in the GPIO for the selected I/Os as long as the PDM module is supposed to be connected to an external PDM circuit.

Only one peripheral can be assigned to drive a particular GPIO pin at a time. Failing to do so may result in unpredictable behavior.

Table 3. GPIO configuration before enabling peripheral
PDM signalPDM pinDirectionOutput valueComment
CLKAs specified in PSEL.CLKOutput0
DINAs specified in PSEL.DINInputNot applicable

Registers

Instances

InstanceDomainBase addressTrustZoneSplit accessDescription
MapAttDMA

PDM20 : S
PDM20 : NS

GLOBAL

0x500D0000
0x400D0000

USSSANo

Pulse density modulation (digital microphone) interface PDM20

PDM21 : S
PDM21 : NS

GLOBAL

0x500D1000
0x400D1000

USSSANo

Pulse density modulation (digital microphone) interface PDM21

Configuration

InstanceDomainConfiguration

PDM20 : S
PDM20 : NS

GLOBAL

Use GPIO port P1

Supports 8, 16, 32, 48 kHz sample rate.

CURRENTAMOUNT register included.

PDM21 : S
PDM21 : NS

GLOBAL

Use GPIO port P1

Supports 8, 16, 32, 48 kHz sample rate.

CURRENTAMOUNT register included.

Register overview

RegisterOffsetTZDescription
TASKS_START0x000

Starts continuous PDM transfer

TASKS_STOP0x004

Stops PDM transfer

SUBSCRIBE_START0x080

Subscribe configuration for task START

SUBSCRIBE_STOP0x084

Subscribe configuration for task STOP

EVENTS_STARTED0x100

PDM transfer has started

EVENTS_STOPPED0x104

PDM transfer has finished

EVENTS_END0x108

The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM

EVENTS_DMA.BUSERROR0x110

This event is generated if an error occurs during the bus transfer.

PUBLISH_STARTED0x180

Publish configuration for event STARTED

PUBLISH_STOPPED0x184

Publish configuration for event STOPPED

PUBLISH_END0x188

Publish configuration for event END

PUBLISH_DMA.BUSERROR0x190

Publish configuration for event DMA.BUSERROR

INTEN0x300

Enable or disable interrupt

INTENSET0x304

Enable interrupt

INTENCLR0x308

Disable interrupt

INTPEND0x30C

Pending interrupts

ENABLE0x500

PDM module enable register

MODE0x508

Defines the routing of the connected PDM microphone signals

GAINL0x518

Left output gain adjustment

GAINR0x51C

Right output gain adjustment

RATIO0x520

Selects the decimation ratio between PDM_CLK and output sample rate.

Change PRESCALER accordingly.

PSEL.CLK0x540

Pin number configuration for PDM CLK signal

PSEL.DIN0x544

Pin number configuration for PDM DIN signal

SAMPLE.PTR0x560

RAM address pointer to write samples to with EasyDMA

SAMPLE.MAXCNT0x564

Number of bytes to allocate memory for in EasyDMA mode

PRESCALER0x580

The prescaler is used to set the PDM frequency

DMA.TERMINATEONBUSERROR0x700

Terminate the transaction if a BUSERROR event is detected.

DMA.BUSERRORADDRESS0x704

Address of transaction that generated the last BUSERROR event.

TASKS_START

Address offset: 0x000

Starts continuous PDM transfer

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

W

TASKS_START

Starts continuous PDM transfer

Trigger

1

Trigger task

TASKS_STOP

Address offset: 0x004

Stops PDM transfer

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

W

TASKS_STOP

Stops PDM transfer

Trigger

1

Trigger task

SUBSCRIBE_START

Address offset: 0x080

Subscribe configuration for task START

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that task START will subscribe to

B

RW

EN

Disabled

0

Disable subscription

Enabled

1

Enable subscription

SUBSCRIBE_STOP

Address offset: 0x084

Subscribe configuration for task STOP

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that task STOP will subscribe to

B

RW

EN

Disabled

0

Disable subscription

Enabled

1

Enable subscription

EVENTS_STARTED

Address offset: 0x100

PDM transfer has started

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

EVENTS_STARTED

PDM transfer has started

NotGenerated

0

Event not generated

Generated

1

Event generated

EVENTS_STOPPED

Address offset: 0x104

PDM transfer has finished

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

EVENTS_STOPPED

PDM transfer has finished

NotGenerated

0

Event not generated

Generated

1

Event generated

EVENTS_END

Address offset: 0x108

The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

EVENTS_END

The PDM has written the last sample specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM

NotGenerated

0

Event not generated

Generated

1

Event generated

EVENTS_DMA

Peripheral events.

EVENTS_DMA.BUSERROR

Address offset: 0x110

This event is generated if an error occurs during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

BUSERROR

This event is generated if an error occurs during the bus transfer.

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

NotGenerated

0

Event not generated

Generated

1

Event generated

PUBLISH_STARTED

Address offset: 0x180

Publish configuration for event STARTED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that event STARTED will publish to

B

RW

EN

Disabled

0

Disable publishing

Enabled

1

Enable publishing

PUBLISH_STOPPED

Address offset: 0x184

Publish configuration for event STOPPED

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that event STOPPED will publish to

B

RW

EN

Disabled

0

Disable publishing

Enabled

1

Enable publishing

PUBLISH_END

Address offset: 0x188

Publish configuration for event END

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that event END will publish to

B

RW

EN

Disabled

0

Disable publishing

Enabled

1

Enable publishing

PUBLISH_DMA

Publish configuration for events

PUBLISH_DMA.BUSERROR

Address offset: 0x190

Publish configuration for event DMA.BUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

Bit number313029282726252423222120191817161514131211109876543210
IDBAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

CHIDX

[0..255]

DPPI channel that event DMA.BUSERROR will publish to

B

RW

EN

Disabled

0

Disable publishing

Enabled

1

Enable publishing

INTEN

Address offset: 0x300

Enable or disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

STARTED

Enable or disable interrupt for event STARTED

Disabled

0

Disable

Enabled

1

Enable

B

RW

STOPPED

Enable or disable interrupt for event STOPPED

Disabled

0

Disable

Enabled

1

Enable

C

RW

END

Enable or disable interrupt for event END

Disabled

0

Disable

Enabled

1

Enable

D

RW

DMABUSERROR

Enable or disable interrupt for event DMABUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

Disabled

0

Disable

Enabled

1

Enable

INTENSET

Address offset: 0x304

Enable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW
W1S

STARTED

Write '1' to enable interrupt for event STARTED

Set

1

Enable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

B

RW
W1S

STOPPED

Write '1' to enable interrupt for event STOPPED

Set

1

Enable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

C

RW
W1S

END

Write '1' to enable interrupt for event END

Set

1

Enable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

D

RW
W1S

DMABUSERROR

Write '1' to enable interrupt for event DMABUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

Set

1

Enable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

INTENCLR

Address offset: 0x308

Disable interrupt

Bit number313029282726252423222120191817161514131211109876543210
IDDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW
W1C

STARTED

Write '1' to disable interrupt for event STARTED

Clear

1

Disable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

B

RW
W1C

STOPPED

Write '1' to disable interrupt for event STOPPED

Clear

1

Disable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

C

RW
W1C

END

Write '1' to disable interrupt for event END

Clear

1

Disable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

D

RW
W1C

DMABUSERROR

Write '1' to disable interrupt for event DMABUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

Clear

1

Disable

Disabled

0

Read: Disabled

Enabled

1

Read: Enabled

INTPEND

Address offset: 0x30C

Pending interrupts

Bit number313029282726252423222120191817161514131211109876543210
IDDCBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

R

STARTED

Read pending status of interrupt for event STARTED

NotPending

0

Read: Not pending

Pending

1

Read: Pending

B

R

STOPPED

Read pending status of interrupt for event STOPPED

NotPending

0

Read: Not pending

Pending

1

Read: Pending

C

R

END

Read pending status of interrupt for event END

NotPending

0

Read: Not pending

Pending

1

Read: Pending

D

R

DMABUSERROR

Read pending status of interrupt for event DMABUSERROR

When this event is generated, the address which caused the error can be read from the BUSERRORADDRESS register.

Errors occurring while the EVENTS_BUSERROR register is set are ignored.

NotPending

0

Read: Not pending

Pending

1

Read: Pending

ENABLE

Address offset: 0x500

PDM module enable register

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

ENABLE

Enable or disable PDM module

Disabled

0

Disable

Enabled

1

Enable

MODE

Address offset: 0x508

Defines the routing of the connected PDM microphone signals

Bit number313029282726252423222120191817161514131211109876543210
IDBA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

OPERATION

Mono or stereo operation

Stereo

0

Sample and store one pair (left + right) of 16-bit samples per RAM word R=[31:16]; L=[15:0]

Mono

1

Sample and store two successive left samples (16 bits each) per RAM word L1=[31:16]; L0=[15:0]

B

RW

EDGE

Defines on which PDM_CLK edge left (or mono) is sampled.

The right channel is sampled on the opposide edge of the left channel. When EDGE is set to 1 (LeftRising) and stereo input is used the right and left channels are swapped relative to EDGE set to 0 (LeftFalling).

LeftFalling

1

Left (or mono) is sampled on falling edge of PDM_CLK

LeftRising

0

Left (or mono) is sampled on rising edge of PDM_CLK

GAINL

Address offset: 0x518

Left output gain adjustment

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAA
Reset 0x0000002800000000000000000000000000101000
IDR/WFieldValue IDValueDescription
A

RW

GAINL

Left output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)

0x00 -20 dB gain adjust

0x01 -19.5 dB gain adjust

(...)

0x27 -0.5 dB gain adjust

0x28 0 dB gain adjust

0x29 +0.5 dB gain adjust

(...)

0x4F +19.5 dB gain adjust

0x50 +20 dB gain adjust

MinGain

0x00

-20 dB gain adjustment (minimum)

DefaultGain

0x28

0 dB gain adjustment

MaxGain

0x50

+20 dB gain adjustment (maximum)

GAINR

Address offset: 0x51C

Right output gain adjustment

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAA
Reset 0x0000002800000000000000000000000000101000
IDR/WFieldValue IDValueDescription
A

RW

GAINR

Right output gain adjustment, in 0.5 dB steps, around the default module gain (see electrical parameters)

MinGain

0x00

-20 dB gain adjustment (minimum)

DefaultGain

0x28

0 dB gain adjustment

MaxGain

0x50

+20 dB gain adjustment (maximum)

RATIO

Address offset: 0x520

Selects the decimation ratio between PDM_CLK and output sample rate.

Change PRESCALER accordingly.

Bit number313029282726252423222120191817161514131211109876543210
IDAAA
Reset 0x0000000200000000000000000000000000000010
IDR/WFieldValue IDValueDescription
A

RW

RATIO

Selects the decimation ratio between PDM_CLK and output sample rate

Ratio32

0

Ratio of 32

Ratio48

1

Ratio of 48

Ratio50

2

Ratio of 50

Ratio64

3

Ratio of 64

Ratio80

4

Ratio of 80

Ratio96

5

Ratio of 96

Ratio100

6

Ratio of 100

Ratio128

7

Ratio of 128

PSEL.CLK

Address offset: 0x540

Pin number configuration for PDM CLK signal

Bit number313029282726252423222120191817161514131211109876543210
IDCBBBAAAAA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
A

RW

PIN

[0..31]

Pin number

B

RW

PORT

[0..7]

Port number

C

RW

CONNECT

Connection

Disconnected

1

Disconnect

Connected

0

Connect

PSEL.DIN

Address offset: 0x544

Pin number configuration for PDM DIN signal

Bit number313029282726252423222120191817161514131211109876543210
IDCBBBAAAAA
Reset 0xFFFFFFFF11111111111111111111111111111111
IDR/WFieldValue IDValueDescription
A

RW

PIN

[0..31]

Pin number

B

RW

PORT

[0..7]

Port number

C

RW

CONNECT

Connection

Disconnected

1

Disconnect

Connected

0

Connect

SAMPLE.PTR

Address offset: 0x560

RAM address pointer to write samples to with EasyDMA

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

SAMPLEPTR

Address to write PCM samples to over DMA

Note: See the memory chapter for details about which memories are available for EasyDMA.

SAMPLE.MAXCNT

Address offset: 0x564

Number of bytes to allocate memory for in EasyDMA mode

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

BUFFSIZE

[0..32767]

Length of DMA RAM allocation in number of bytes

PRESCALER

Address offset: 0x580

The prescaler is used to set the PDM frequency

The prescaler divides the clock by DIVISOR to make the PDM clock. The resulting frequency is given by the frequency of the 'core clock' divided by DIVISOR.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAA
Reset 0x0000000400000000000000000000000000000100
IDR/WFieldValue IDValueDescription
A

RW

DIVISOR

4..126

Core clock to PDM divisor

DMA.TERMINATEONBUSERROR

Address offset: 0x700

Terminate the transaction if a BUSERROR event is detected.

Bit number313029282726252423222120191817161514131211109876543210
IDA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

RW

ENABLE

Disabled

0

Disable

Enabled

1

Enable

DMA.BUSERRORADDRESS

Address offset: 0x704

Address of transaction that generated the last BUSERROR event.

Bit number313029282726252423222120191817161514131211109876543210
IDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Reset 0x0000000000000000000000000000000000000000
IDR/WFieldValue IDValueDescription
A

R

ADDRESS