Part of MicroGen4 Music Synthesizer Program. (But not test it yet.) I2S ,DMA ,Stereo ,16Bit Dac(PCM1781) See detail: http://www.geocities.jp/micro_diys/index2

Dependencies:   mbed

Now added generate Saw Wave to DAC function in generate(); You will hear Stereo saw wave sound now. /media/uploads/p_igmon/i2s_sample_test_audacity.png

more info: http://www.geocities.jp/micro_diys/i2s_test_sample/i2s_test_sample.html

Committer:
p_igmon
Date:
Thu Jul 03 11:59:07 2014 +0000
Revision:
0:dc88722ab141
Part of MicroGen4 Music Syntesizer program.
; I2S DMA Stereo DAC (PCM1781)
; http://www.geocities.jp/micro_diys/index2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
p_igmon 0:dc88722ab141 1 /**
p_igmon 0:dc88722ab141 2 ******************************************************************************
p_igmon 0:dc88722ab141 3 * @file stm32f4xx_it.c
p_igmon 0:dc88722ab141 4 * @date 22/06/2014 09:00:07
p_igmon 0:dc88722ab141 5 * @brief Interrupt Service Routines.
p_igmon 0:dc88722ab141 6 ******************************************************************************
p_igmon 0:dc88722ab141 7 *
p_igmon 0:dc88722ab141 8 * COPYRIGHT(c) 2014 STMicroelectronics
p_igmon 0:dc88722ab141 9 *
p_igmon 0:dc88722ab141 10 * Redistribution and use in source and binary forms, with or without modification,
p_igmon 0:dc88722ab141 11 * are permitted provided that the following conditions are met:
p_igmon 0:dc88722ab141 12 * 1. Redistributions of source code must retain the above copyright notice,
p_igmon 0:dc88722ab141 13 * this list of conditions and the following disclaimer.
p_igmon 0:dc88722ab141 14 * 2. Redistributions in binary form must reproduce the above copyright notice,
p_igmon 0:dc88722ab141 15 * this list of conditions and the following disclaimer in the documentation
p_igmon 0:dc88722ab141 16 * and/or other materials provided with the distribution.
p_igmon 0:dc88722ab141 17 * 3. Neither the name of STMicroelectronics nor the names of its contributors
p_igmon 0:dc88722ab141 18 * may be used to endorse or promote products derived from this software
p_igmon 0:dc88722ab141 19 * without specific prior written permission.
p_igmon 0:dc88722ab141 20 *
p_igmon 0:dc88722ab141 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
p_igmon 0:dc88722ab141 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
p_igmon 0:dc88722ab141 23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
p_igmon 0:dc88722ab141 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
p_igmon 0:dc88722ab141 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
p_igmon 0:dc88722ab141 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
p_igmon 0:dc88722ab141 27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
p_igmon 0:dc88722ab141 28 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
p_igmon 0:dc88722ab141 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
p_igmon 0:dc88722ab141 30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
p_igmon 0:dc88722ab141 31 *
p_igmon 0:dc88722ab141 32 ******************************************************************************
p_igmon 0:dc88722ab141 33 */
p_igmon 0:dc88722ab141 34
p_igmon 0:dc88722ab141 35 #include "synthesizer.h"
p_igmon 0:dc88722ab141 36 extern DigitalOut myled;
p_igmon 0:dc88722ab141 37 extern DMA_HandleTypeDef hdma_i2s2_ext_tx;
p_igmon 0:dc88722ab141 38
p_igmon 0:dc88722ab141 39 /******************************************************************************/
p_igmon 0:dc88722ab141 40 /* Cortex-M4 Processor Interruption and Exception Handlers */
p_igmon 0:dc88722ab141 41 /******************************************************************************/
p_igmon 0:dc88722ab141 42
p_igmon 0:dc88722ab141 43 /**
p_igmon 0:dc88722ab141 44 * @brief This function handles System tick timer.
p_igmon 0:dc88722ab141 45 */
p_igmon 0:dc88722ab141 46 /*
p_igmon 0:dc88722ab141 47 void SysTick_Handler(void)
p_igmon 0:dc88722ab141 48 {
p_igmon 0:dc88722ab141 49 HAL_IncTick();
p_igmon 0:dc88722ab141 50 HAL_SYSTICK_IRQHandler();
p_igmon 0:dc88722ab141 51 }
p_igmon 0:dc88722ab141 52 */
p_igmon 0:dc88722ab141 53
p_igmon 0:dc88722ab141 54 /**
p_igmon 0:dc88722ab141 55 * @brief This function handles DMA1 Stream4 global interrupt.
p_igmon 0:dc88722ab141 56 */
p_igmon 0:dc88722ab141 57 void DMA1_Stream4_IRQHandler(void)
p_igmon 0:dc88722ab141 58 {
p_igmon 0:dc88722ab141 59 HAL_NVIC_ClearPendingIRQ(DMA1_Stream4_IRQn);
p_igmon 0:dc88722ab141 60 HAL_DMA_IRQHandler(&hdma_i2s2_ext_tx);
p_igmon 0:dc88722ab141 61 // myled = ~myled;
p_igmon 0:dc88722ab141 62 }
p_igmon 0:dc88722ab141 63
p_igmon 0:dc88722ab141 64 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
p_igmon 0:dc88722ab141 65