Jump to content

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


Tangent

Recommended Posts

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
Link to comment
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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...