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
Now added generate Saw Wave to DAC function in generate(); You will hear Stereo saw wave sound now.
more info: http://www.geocities.jp/micro_diys/i2s_test_sample/i2s_test_sample.html
Diff: stm32f4xx_it.cpp
- Revision:
- 0:dc88722ab141
diff -r 000000000000 -r dc88722ab141 stm32f4xx_it.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stm32f4xx_it.cpp Thu Jul 03 11:59:07 2014 +0000 @@ -0,0 +1,65 @@ +/** + ****************************************************************************** + * @file stm32f4xx_it.c + * @date 22/06/2014 09:00:07 + * @brief Interrupt Service Routines. + ****************************************************************************** + * + * COPYRIGHT(c) 2014 STMicroelectronics + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +#include "synthesizer.h" +extern DigitalOut myled; +extern DMA_HandleTypeDef hdma_i2s2_ext_tx; + +/******************************************************************************/ +/* Cortex-M4 Processor Interruption and Exception Handlers */ +/******************************************************************************/ + +/** +* @brief This function handles System tick timer. +*/ +/* +void SysTick_Handler(void) +{ + HAL_IncTick(); + HAL_SYSTICK_IRQHandler(); +} +*/ + +/** +* @brief This function handles DMA1 Stream4 global interrupt. +*/ +void DMA1_Stream4_IRQHandler(void) +{ + HAL_NVIC_ClearPendingIRQ(DMA1_Stream4_IRQn); + HAL_DMA_IRQHandler(&hdma_i2s2_ext_tx); +// myled = ~myled; +} + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ +