Library to handle the X-NUCLEO-CCA02M1 MEMS Microphones Expansion Board.

Dependencies:   ST_I2S ST_FREQUENCY_DIVIDER USBDEVICE

Dependents:   HelloWorld_CCA02M1 HelloWorld_CCA02M1_mbedOS HelloWorld_CCA02M1 Karaoke_CCA01M1_CCA02M1_mbedOS

Fork of X_NUCLEO_CCA02M1 by ST Expansion SW Team

MEMS Microphones Library

Library to handle the X-NUCLEO-CCA02M1 MEMS Microphones Expansion Board. A single board allows to record a standard 2-channel stereo signal as an array of PCM samples (16 bit/sample); in principle, it could make use of six additional MEMS microphones to realize a 8-channel audio system.


Microphones configuration

Currently the configurations supported are the following:

  • Stereo@48KHz
  • Stereo@44.1KHz (CD audio quality)
  • Stereo@32KHz
  • Stereo@16KHz
  • Stereo@8KHz
  • Mono@48KHz
  • Mono@44.1KHz
  • Mono@32KHz
  • Mono@16KHz
  • Mono@8KHz

Mono configurations need a Jumper connecting PB_5 and PB_13 on the Morpho connector to properly work.


Platform compatibility

  • This board can be currently used with the Nucleo F4 Family only, please see the ST_I2S library compatibility for further information.
  • The library is compatible both with mbed OS 5.x and mbed classic 2.x (to work with mbed classic, the main application has to import the "events" library, which is not included into the "mbed" library).


I2S Peripheral Usage

By default this board makes use of the I2S peripheral available on Nucleo boards.


Acquiring through the USB

In order to acquire the recorded PCM audio channel with an audio SW on a PC, please connect the expansion board to a USB port of the PC, and the Nucleo board to a USB power supply.

Committer:
Davidroid
Date:
Fri Apr 28 15:42:58 2017 +0000
Revision:
13:90465220b75f
Parent:
11:b2f7f79026e4
Removed debug information.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
davide.aliprandi@st.com 6:9b8bc842aeb3 1 /**
davide.aliprandi@st.com 6:9b8bc842aeb3 2 ******************************************************************************
davide.aliprandi@st.com 6:9b8bc842aeb3 3 * @file XNucleoCCA02M1_config.h
davide.aliprandi@st.com 6:9b8bc842aeb3 4 * @author AST / Software Platforms and Cloud
davide.aliprandi@st.com 6:9b8bc842aeb3 5 * @version V1.0
davide.aliprandi@st.com 6:9b8bc842aeb3 6 * @date November 3rd, 2015
davide.aliprandi@st.com 6:9b8bc842aeb3 7 * @brief Configuration header file for the X_NUCLEO_CCA02M1 expansion board.
davide.aliprandi@st.com 6:9b8bc842aeb3 8 ******************************************************************************
davide.aliprandi@st.com 6:9b8bc842aeb3 9 * @attention
davide.aliprandi@st.com 6:9b8bc842aeb3 10 *
davide.aliprandi@st.com 6:9b8bc842aeb3 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
davide.aliprandi@st.com 6:9b8bc842aeb3 12 *
davide.aliprandi@st.com 6:9b8bc842aeb3 13 * Redistribution and use in source and binary forms, with or without modification,
davide.aliprandi@st.com 6:9b8bc842aeb3 14 * are permitted provided that the following conditions are met:
davide.aliprandi@st.com 6:9b8bc842aeb3 15 * 1. Redistributions of source code must retain the above copyright notice,
davide.aliprandi@st.com 6:9b8bc842aeb3 16 * this list of conditions and the following disclaimer.
davide.aliprandi@st.com 6:9b8bc842aeb3 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
davide.aliprandi@st.com 6:9b8bc842aeb3 18 * this list of conditions and the following disclaimer in the documentation
davide.aliprandi@st.com 6:9b8bc842aeb3 19 * and/or other materials provided with the distribution.
davide.aliprandi@st.com 6:9b8bc842aeb3 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
davide.aliprandi@st.com 6:9b8bc842aeb3 21 * may be used to endorse or promote products derived from this software
davide.aliprandi@st.com 6:9b8bc842aeb3 22 * without specific prior written permission.
davide.aliprandi@st.com 6:9b8bc842aeb3 23 *
davide.aliprandi@st.com 6:9b8bc842aeb3 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
davide.aliprandi@st.com 6:9b8bc842aeb3 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
davide.aliprandi@st.com 6:9b8bc842aeb3 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
davide.aliprandi@st.com 6:9b8bc842aeb3 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
davide.aliprandi@st.com 6:9b8bc842aeb3 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
davide.aliprandi@st.com 6:9b8bc842aeb3 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
davide.aliprandi@st.com 6:9b8bc842aeb3 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
davide.aliprandi@st.com 6:9b8bc842aeb3 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
davide.aliprandi@st.com 6:9b8bc842aeb3 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
davide.aliprandi@st.com 6:9b8bc842aeb3 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
davide.aliprandi@st.com 6:9b8bc842aeb3 34 *
davide.aliprandi@st.com 6:9b8bc842aeb3 35 ******************************************************************************
davide.aliprandi@st.com 6:9b8bc842aeb3 36 */
davide.aliprandi@st.com 6:9b8bc842aeb3 37
davide.aliprandi@st.com 6:9b8bc842aeb3 38
davide.aliprandi@st.com 6:9b8bc842aeb3 39 /* Generated with STM32CubeTOO -----------------------------------------------*/
davide.aliprandi@st.com 6:9b8bc842aeb3 40
davide.aliprandi@st.com 6:9b8bc842aeb3 41
davide.aliprandi@st.com 6:9b8bc842aeb3 42 /* Define to prevent recursive inclusion -------------------------------------*/
davide.aliprandi@st.com 6:9b8bc842aeb3 43
davide.aliprandi@st.com 6:9b8bc842aeb3 44 #ifndef __X_NUCLEO_CCA02M1_CONFIG_H
davide.aliprandi@st.com 6:9b8bc842aeb3 45 #define __X_NUCLEO_CCA02M1_CONFIG_H
davide.aliprandi@st.com 6:9b8bc842aeb3 46
davide.aliprandi@st.com 6:9b8bc842aeb3 47
davide.aliprandi@st.com 6:9b8bc842aeb3 48 /* Definitions ---------------------------------------------------------------*/
davide.aliprandi@st.com 6:9b8bc842aeb3 49
davide.aliprandi@st.com 6:9b8bc842aeb3 50 /* ACTION --------------------------------------------------------------------*
davide.aliprandi@st.com 6:9b8bc842aeb3 51 * Specify here a configuration for I/O and interrupts' pins. *
davide.aliprandi@st.com 6:9b8bc842aeb3 52 * *
davide.aliprandi@st.com 6:9b8bc842aeb3 53 * Example: *
davide.aliprandi@st.com 6:9b8bc842aeb3 54 * // I2C. *
davide.aliprandi@st.com 6:9b8bc842aeb3 55 * #define EXPANSIONBOARD_PIN_I2C_SCL (D15) *
davide.aliprandi@st.com 6:9b8bc842aeb3 56 * #define EXPANSIONBOARD_PIN_I2C_SDA (D14) *
davide.aliprandi@st.com 6:9b8bc842aeb3 57 * *
davide.aliprandi@st.com 6:9b8bc842aeb3 58 * // SPI. *
davide.aliprandi@st.com 6:9b8bc842aeb3 59 * #define EXPANSIONBOARD_PIN_SPI_MOSI (D11) *
davide.aliprandi@st.com 6:9b8bc842aeb3 60 * #define EXPANSIONBOARD_PIN_SPI_MISO (D12) *
davide.aliprandi@st.com 6:9b8bc842aeb3 61 * #define EXPANSIONBOARD_PIN_SPI_SCLK (D13) *
davide.aliprandi@st.com 6:9b8bc842aeb3 62 * *
davide.aliprandi@st.com 6:9b8bc842aeb3 63 * // Interrupts. *
davide.aliprandi@st.com 6:9b8bc842aeb3 64 * #define EXPANSIONBOARD_PIN_INT_1 (A2) *
davide.aliprandi@st.com 6:9b8bc842aeb3 65 *----------------------------------------------------------------------------*/
davide.aliprandi@st.com 6:9b8bc842aeb3 66 /**
davide.aliprandi@st.com 6:9b8bc842aeb3 67 * Enable to use the OpenPDM2PCM library, which can handle one microphone at
davide.aliprandi@st.com 6:9b8bc842aeb3 68 * 16KHz maximum.
davide.aliprandi@st.com 6:9b8bc842aeb3 69 */
davide.aliprandi@st.com 6:9b8bc842aeb3 70 #define USE_OPEN_PDM2PCM_LIBRARY
davide.aliprandi@st.com 6:9b8bc842aeb3 71
davide.aliprandi@st.com 6:9b8bc842aeb3 72 /**
davide.aliprandi@st.com 6:9b8bc842aeb3 73 * Enable to signal the duration of the PDM2PCM library utilization, which can
davide.aliprandi@st.com 6:9b8bc842aeb3 74 * be seen through an oscilloscope.
davide.aliprandi@st.com 6:9b8bc842aeb3 75 */
Davidroid 13:90465220b75f 76 //#define PDM2PCM_AUDIO_DEBUG
davide.aliprandi@st.com 6:9b8bc842aeb3 77
davide.aliprandi@st.com 6:9b8bc842aeb3 78 #endif /* __X_NUCLEO_CCA02M1_CONFIG_H */