UM1900 STMICROELECTRONICS | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 19

Technical content

Datasheet sections

  • 1 Getting started
  • 1.1 Hardware requirements
  • 2 System requirements
  • 3 Hardware description
  • 3.1 Nucleo 144 support
  • 3.2 USB connector and power source
  • 3.3 Audio acquisition strategy
  • 3.3.1 DFSDM microphone acquisition
  • 3.3.2 I²S and SPI microphone acquisition
  • 3.4 Solder bridge configurations
  • 3.4.1 Solder bridge roles
  • 3.4.2 Sample use cases
  • 4 Connectors
  • 5 Board schematics
  • 6 Layout
  • 7 Revision history

Getting started with the digital MEMS microphones expansion board based on MP34DT01-M for STM32 Nucleo Introduction The X-NUCLEO-CCA02M1 is an evaluation board based on digital MEMS microphones. It is compatible with the Morpho connector layout and is designed around STMicroelectronics MP34DT01 -M digital microphones. It has two microphones soldered on board and it is compatible with digital microphone coupon boards such as STEVAL-MKI129Vx and STEVAL-MKI155Vx. The X-NUCLEO-CCA02M1 allows synchronized acquisition and streaming of up to 4 microphones through peripherals I²S, SPI or DFSDM. It represents a quick and easy solution for the development of microphone -based applications, as well as a starting point for audio algorithm implementation. Figure 1: X-NUCLEO-CCA02M1 evaluation board

1 Getting started

This section describes the hardware requirements for the X-NUCLEO-CCA02M1 evaluation board.

1.1 Hardware requirements

The X-NUCLEO-CCA02M1 is an expansion board for use with STM32 Nucleo boards (refer to UM1724 on www.st.com for further information). The STM32 Nucleo board must be connected to the X-NUCLEO-CCA02M1 board, as shown in Figure 2: "X-NUCLEO-CCA02M1 on STM32 Nucleo board". Figure 2: X-NUCLEO-CCA02M1 on STM32 Nucleo board The connection between the STM32 Nucleo and the X-NUCLEO-CCA02M1 is designed for use with any STM32 Nucleo board. When mounting the X-NUCLEO-CCA02M1 on the STM32 Nucleo, ensure that all the pins are aligned with their corresponding connector. It is very important to handle both boards carefully during this operation to avoid damaging or bending the male/female pins and connectors. ESD prevention measures must also be implemented to avoid damaging any X -NUCLEO- CCA02M1 board components.

System requirements UM1900

2 System requirements

Using the Nucleo boards with the X-NUCLEO-CCA02M1 expansion board requires the following software and hardware:  a Windows® (XP, Vista, 7, 8) PC for the software  a USB type A to Mini-B USB cable to connect the Nucleo to the PC for installation of the board firmware package (order code: X-CUBE-MEMSMIC1); a utility running on the user's PC will complete the demo. The user's PC must have the following characteristics:  at least 128 MB of RAM  40 MB of available hard disk space for the X-CUBE-MEMSMIC1 firmware package and relative documentation, available on www.st.com.

UM1900 Hardware description

3 Hardware description

The board allows the user to test the function of the STMicroelectronics MEMS microphones. For this purpose two MP34DT01-M digital MEMS microphone are mounted on the board and 6 headers (4 mounted with 2 additional footprints) are available for connecting additional microphones using digital microphone coupon boards (STEVAL - MKI129Vx or STEVAL-MKI155Vx), for further information refer to www.st.com. The connection between the X-NUCLEO-CCA02M1 and the STEVAL-MKI155V1 is shown in Figure 3: "Connection with STEVAL-MKI155V1". The board interfaces with the STM32 Nucleo microcontrollers via the I²S, SPI or DFSDM peripherals for the synchronized acquisition of up to 4 microphones. The board also provides USB streaming using the STM32 Nucleo microcontroller USB peripheral; for this purpose, a USB connector is available as well as the footprint to mount a dedicated oscillator that can be used to feed the host MCU through the OSC_IN pin. Solder bridges are used in order to choose from different options, depending on the number of microphones and the MCU peripherals involved. Figure 3: Connection with STEVAL-MKI155V1

3.1 Nucleo 144 support

In order to accept Nucleo-144 boards, morpho header connectors must be soldered on the relevant footprint available on the Nucleo. A pair of 2 x 38 pin stripline is enough to plug the expansion board, so it is not necessary to solder the whole 2 x 80 pin header.

Hardware description UM1900

3.2 USB connector and power source

A USB connector available on the board supports audio streaming to the host PC. It can also be used to power the whole system, Nucleo board included. To enable system power sourcing from the X-NUCLEO-CCA02M1 expansion board USB connector:  close Jumper J1 on the X-NUCLEO-CCA02M1 expansion board  place JP5 in position E5 on the STM32 Nucleo board

3.3 Audio acquisition strategy

This section summarizes the digital MEMS microphone acquisition strategies and principles used in the application. It can simplify the comprehension of the firmware structure and utilization. A digital MEMS microphone can be acquired via different peripherals, such as SPI, I²S, GPIO or DFSDM. It requires an input clock and it outputs a PDM stream at the same frequency of the input clock. This PDM stream is further filtered and decimated for conversion into PCM standard for audio transmission. Two different digital MEMS microphones can be connected on the same data line, configuring the first to generate valid data on the rising edge of the clock and the other on the falling edge, by setting the L/R pin of each microphone accordingly. On the X-NUCLEO-CCA02M1 expansion board, two microphones share the same data line and can be managed differently, depending on the MCU capabilities. If a DFSDM (Digital Filter for Sigma Delta Modulators) peripheral is available, the microphones can be routed to DFSDM channels, otherwise use the I²S peripheral (for the first and the second microphone) and SPI peripheral (for the third and the fourth).

3.3.1 DFSDM microphone acquisition

The DFSDM peripheral generates the precise clock needed by the microphones and reads the data on the rising and falling edges of each PDM line. Acquired signals are then input to DSFDM filters for hardware filtering and decimation to generate standard PCM streams. An additional software high pass filtering stage performed removes any DC offset in the output stream. DMA is adopted in order to reduce MCU load.

3.3.2 I²S and SPI microphone acquisition

In this scenario, a precise clock signal is generated by the I²S peripheral while the SPI is configured in slave mode and is fed by the same timing signal generated by I²S. This clock is then halved by a timer and input to the microphones. The SPI and I²S peripherals operate at twice the microphone frequency to read the data on both the rising and falling edges of the microphone clock, thus reading the bits of two microphones each. A software demuxing step separates the signal from the two microphones and allows further processing like PDM-to-PCM conversion. The simplified block diagram summarizes this acquisition process. For further information regarding MEMS microphone and PDM-to-PCM decimation, please refer to application note AN3998 on www.st.com.

UM1900 Hardware description Figure 4: General acquisition strategy using I²S and SPI For single microphone acquisition, the correct microphone timer is generated directly by I²S and one single microphone data line is read by the same peripheral.

3.4 Solder bridge configurations

Various board configurations are possible, depending on the use cases. MEM S microphones can be plugged into ST morpho pins, and thus to MCU peripherals, using ad hoc solder bridges. Clock routing can also be changed according to specific needs. This section helps the user understand the role of each solder bridge and analyzes so me of the more common use cases.

3.4.1 Solder bridge roles

In the table below, the solder bridge functions are summarized with respect to the audio acquisition strategies above. Table 1: Solder bridge description Function Solder Bridge Connects USB DM pin from connector to MCU SB1 Connects USB DP pin from connector to MCU SB2 Routes onboard oscillator output to OSC_IN MCU pin SB6 Connect MEMS clock to MCU timer output channel SB7 Routes I²S clock to SPI clock SB8 Merges onboard microphone PDMs in order to be acquired with 1 interface SB9

Hardware description UM1900 Function Solder Bridge Connects MIC34 PDM to MCU SPI SB10 Connects MIC12 PDM to MCU I2S SB11 Clock from the DFSDM peripheral SB12 I2S clock from MCU SB13 Connects I²S clock directly to MIC clock without passing through timer SB14 Connect I²S clock to MCU timer input channel SB15 Connects MIC12 PDM to MCU DFSDM SB16 Connects MIC34 PDM to MCU DFSDM SB17

3.4.2 Sample use cases

In this section, we analyze specific use cases together with the corresponding solder bridge configurations. Custom setups are also possible for ad-hoc functionalities. Note that SB1, SB2, SB6 are reserved for the USB or Oscillator pins and are not part of the audio acquisition process. These configurations depend on the acquisition peripherals involved. This section is divided according to the two possible scenarios: I²Sp lus SPI or DFSDM peripherals used.

3.4.2.1 Jumper settings for DFSDM-based systems

1 or 2 microphone acquisition The clock is generated by DFSDM peripheral and the PDM line of the first and second microphone is routed to the MCU. Table 2: Solder bridge configuration for 1 or 2 microphone acquisition SB Status SB7 Open SB8 Open SB9 Open/Close SB10 Open SB11 Open SB12 Close SB13 Open SB14 Open SB15 Open SB16 Close SB17 Open SB18 Open SB19 Open SB20 Open SB21 Open

UM1900 Hardware description In addition, J2 must be placed in position 1-2 for on-board microphone acquisition or 2-3 when using an external microphone while J3 must be left open. When acquiring on -board microphones, close SB9 to acquire both of them. 4 microphone acquisition In this case, the PDM line of the third and fourth microphone is also routed to the MCU. Table 3: Solder bridge configuration for 4 microphone acquisition SB Status SB7 Open SB8 Open SB9 Open SB10 Open SB11 Open SB12 Close SB13 Open SB14 Open SB15 Open SB16 Close SB17 Close SB18 Open SB19 Open SB20 Open SB21 Open In addition, J2 and J3 must be placed in position 2-3 for external microphone acquisition.

3.4.2.2 Jumper settings for I²S-plus-SPI-based systems

The I²S peripheral is used directly to give the right clock to the microphone and thus acquires the same microphone. For this use case, you need the following SB configuration. Table 4: Solder bridge configuration for 1 microphone acquisition SB Status SB7 Open SB8 Open SB9 Open SB10 Open SB11 Close SB12 Open SB13 Close SB14 Close SB15 Open

Hardware description UM1900 SB Status SB16 Open SB17 Open SB18 Open SB19 Open SB20 Open SB21 Open In addition, J2 must be placed in position 1-2 for on-board microphone acquisition or 2-3 when using an external microphone, while J3 must be left open. If using external microphones, do not plug anything in M2_EXT header. 2 microphone acquisition In this case, the I²S peripheral is used to generate twice the frequency needed by the microphones. In this scenario, the clock is then halved by the timer and routed to the microphones to give them the right clock. I²S therefore reads values from both edges of the merged PDM lines. For this use case you need the following SB configuration: Table 5: Solder bridge configuration for 2 microphone acquisition SB Status SB7 Close SB8 Open SB9 Open /Close SB10 Open SB11 Close SB12 Open SB13 Close SB14 Open SB15 Close SB16 Open SB17 Open SB18 Open SB19 Open SB20 Open SB21 Open In addition, J2 must be placed in position 1-2 for on-board microphone acquisition or 2-3 when using external microphones, while J3 must be left open. When acquiring on -board microphones, close SB9 to acquire both of them. 4 external microphone acquisition In this case, the I²S peripheral is used to generate a clock frequency that is twice the frequency needed by the microphones, and SPI is configured in slave mode in order to use such timing. As in the previous case, the clock is then halved by the timer and routed to the

UM1900 Hardware description microphones to give the right clock. I²S and SPI read values from both the edges of the merged PDM lines. For this use case you need the following SB configuration: Table 6: Solder bridge configuration for 4 microphone acquisition SB Status SB7 Close SB8 Close SB9 Open SB10 Close SB11 Close SB12 Open SB13 Close SB14 Open SB15 Close SB16 Open SB17 Open SB18 Open SB19 Open SB20 Open SB21 Open In addition, J2 and J3 must be placed in position 2-3 for external microphone acquisition. Other configurations are available, based on the MCU used.

4 Connectors

The pin assignments for the Arduino UNO R3 and the Morpho connectors are shown in Table 7: "Morpho connector table" and Table 8: "Arduino connector table" respectively. Table 7: Morpho connector table Connector Pin Signal Remarks CN7

1 MIC_CLKx2 If SB20 is close

3 MIC_PDM34 If SB20 is close

6 E5V

20 GND

22 GND

24 V_IN

29 OSC_CLK_OUT If SB6 is close

35 MIC_CLK_NUCLEO If SB12 is close

11 MIC_CLKx2 If SB8 is close

12 OTG_FS_DP_NUCLEO If SB1 is close

14 OTG_FS_DM_NUCLEO If SB2 is close

15 MIC_PDM34 If SB10 is close

25 MIC_PDM34 If SB17 is close

26 MIC_PDM12 If SB11 is close

27 MIC_CLKx2 If SB15 is close

28 MIC_PDM12 If SB16 is close

29 MIC_CLK_NUCLEO If SB7 is close

30 MIC_CLKx2 If SB13 is close

Table 8: Arduino connector table Connector Pin Signal Remarks CN6 2 3V3 4 3V3 5 5V

6 GND

7 GND

8 V_IN

6 MIC_CLKx2 If SB8 is close

4 MIC_PDM34 If SB10 is close

7 MIC_PDM34 If SB17 is close

6 MIC_CLKx2 If SB15 is close

5 MIC_CLK_NUCLEO If SB7 is close

5 Board schematics

Figure 5: Board schematic (Part 1) Figure 6: Board schematic (Part 2)

6 Layout

Figure 9: Top layout Figure 10: Bottom layout

7 Revision history

Table 9: Document revision history Date Revision Changes 28-May-2015 1 Initial release. 28-Jan-2016 2 Minor text edits throughout document Updated Section "Introduction" Updated Section 3.3: "Audio acquisition strategy" Updated Section 3.4: "Solder bridge configurations" 14-Jul-2016 3 Added Section 3.1: "Nucleo 144 support"