cancel
Showing results for 
Search instead for 
Did you mean: 

DAC to Audio Out

dreschel
Associate II
Posted on December 13, 2011 at 23:24

Has anyone been able to use the DAC output (PA4) to generate sound on the headphone port? It seemed like a trivial thing to do, set up the CS43L22 in analog pass-thru mode... but that was 3 days ago. I generate a 3.5kHz sine wave on PA4 and can scope it all the way to the Cirrus CS43L22 but nothing I have programmed to it over the I2C has worked. I even downloaded the scripts to Cirrus' eval board and mimic'd them in my code's I2C comands and that did not work.

I know the CS43L22 is alive because I was able to compile and run an abbreviated vesion of the Audio_playback_and_record demo. I tried modifying  waveplayer.c to choose the AUDIO_INTERFACE_DAC... no luck. Any insights would be appreciated.

By the way, the way the Discovery is configured (2.5V on the CS43L22 and 3.3V on the STM32F4 DAC) appears to apply a voltage above the max rating on the analog in (AIN1A & AIN1B) pin of the CS43L22... maybe I accidently smoked the analog input by using the DAC at full range...

THANKS...

#stm32f4discovery-dac-audio
1 REPLY 1
gbulmer
Associate II
Posted on February 12, 2012 at 03:07

Found the code in stm32f4_discovery_audio_codec.c

GB