Tangent

MIOS32 app configuration for the embedded DAC's pinouts? (Discovery board)

4 posts in this topic

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 by Tangent
spelling

Share this post


Link to post
Share on other sites

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 by Antichambre

Share this post


Link to post
Share on other sites

Posted (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 by Tangent

Share this post


Link to post
Share on other sites

Posted (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.pdf
http://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 by Antichambre

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now