Integration Of Pdm Microphones Into Usb Audio - XMOS xCORE-200 Multi-channel Audio board Design Manual

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide
Figure 26:
PDM
microphone
data and
CLOCK
signal wires
DQ_PDM
The only port that is passed into lib_mic_array is the 8-bit data port. The library
assumes that the input port is clocked using the PDM clock and requires no
knowlege of the PDM clock source.
The input clock for the microphones can be generated in a multitude of ways. For
example, a 3.072MHz clock can be generated on the board, or the xCORE can
divide down 12.288 MHz master clock. Or, if clock accuracy is not important, the
internal 100 MHz reference can be divided down to provide an approximate clock.

3.13.2 Integration of PDM Microphones into USB Audio

A PDM microphone wrapper is called from main() and takes one channel argument
connecting it to the rest of the system:
The implemetation of this function can be found in the file pcm_pdm_mics.xc .
The first job of this function is to configure the ports/clocking for the microphones,
this divides the external audio master clock input (on port p_mclk ) and outputs the
divided clock to the microphones via the p_pdm_clk port:
c o n f i g u r e _ c l o c k _ s r c _ d i v i d e ( pdmclk , p_mclk , MC L K _ T O _ P D M _ C L K _D I V ) ;
c o n f i g u r e _ p o r t _ c l o c k _ o u t p u t ( p_pdm_clk , pdmclk ) ;
c o n f i gu r e _ i n _ p o r t ( p_pdm_mics , pdmclk ) ;
start_clock ( pdmclk ) ;
It then runs the various cores required for the PDM interface and PDM to PCM
conversion as discussed previously:
par
{
}
The pdm_process() task includes the main integration code, it takes audio from the
lib_mic_array cores, buffers it, performs optional local processing and outputs it
to the audio driver (TDM/I2S core).
XM0088546.1
Clock line, the PDM clock the used by the microphones to drive the data out.
The data from the PDM microphones on an 8 bit port.
pcm_pdm_mic(c_pdm_pcm);
m i c _ a r r a y _ p d m _ r x ( p_pdm_mics , c_4x_pdm_mic_0 , c_4x_pdm_mic_1 ) ;
m i c _ a r r a y _ d e c i m a t e _ t o _ p c m _ 4 c h ( c_4x_pdm_mic_0 , c_ds_output [0]) ;
m i c _ a r r a y _ d e c i m a t e _ t o _ p c m _ 4 c h ( c_4x_pdm_mic_1 , c_ds_output [1]) ;
pdm_process ( c_ds_output , c_pcm_out ) ;
41/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents