Tangent Posted September 27, 2019 Report Share Posted September 27, 2019 (edited) Hello Everyone! Is there an MIOS32 config setting that would allow me to output the audio of MIOS32 apps out of the embedded dac's pinouts, rather then the built-in Audio Jack (CN4) on the STM32F407 Discovery board? Based on what I've read, those would be pins A4 and A5. Is that correct? Any insight on how this could be achieved would be greatly appreciated. Thanks Edited September 27, 2019 by Tangent spelling Quote Link to comment Share on other sites More sharing options...
Antichambre Posted September 28, 2019 Report Share Posted September 28, 2019 (edited) You're right DAC_OUT of the STM are on PA4 and PA5. MIOS32 does not support STM DAC functions, only ADC via MIOS32_BOARD functions. But you can initialize these 2 pins yourself. Take care if PA4 is used by J5A for ADC, PA5 is used for MIOS32_SPI0_SCLK then you have to stop this SPI port by using MIOS32_DONT_USE_SPI0 in the config file. MIOS32 J16 SPI port will not be usable anymore, means no SD card for example. Best Bruno Edited September 28, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
Tangent Posted October 3, 2019 Author Report Share Posted October 3, 2019 (edited) Antichambre, Thank you so much for this info. I've been searching around through the programming document and other resources to determine what I might need to change or add in order to use the onboard DAC. I'm trying to determine if it's as simple as changing a small amount of code to alter the output pin, or if I'd need to implement some more complex functions to do the 'audio data to DAC' processing myself How difficult would it be to modify an existing MIOS32 example app to output audio from the internal DAC? If there's any way anyone could possible reply with a small list of how the general process would work, I could absolutely search around the documentation, source, and on google... to piece together a working solution myself. Thanks much! I'm sincerely having a lot of fun learning and using MIOS32 on STM32F407. Edited October 3, 2019 by Tangent Quote Link to comment Share on other sites More sharing options...
Antichambre Posted October 4, 2019 Report Share Posted October 4, 2019 (edited) Hi, you're welcome, If I was you I will read the DAC Application Note Then find some examples or a library to try with something basic...https://www.st.com/content/ccc/resource/technical/document/user_manual/59/2d/ab/ad/f8/29/49/d6/DM00023896.pdf/files/DM00023896.pdf/jcr:content/translations/en.DM00023896.pdfhttp://stm32f4-discovery.net/tag/dac/ Then try to adapt it to my need... Note: MIOS32 uses StdPeripheral Library and CMSIS located in Driver folder, no HAL Take care about the DMA and Timer already used. Good luck! Best regards Bruno Edited October 4, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.