cancel
Showing results for 
Search instead for 
Did you mean: 

I2s USART conflict??

pccmd
Associate II
Posted on May 13, 2013 at 00:12

I am successfully using I2C control and I2S to send data to the CS43L22 and producing simple sawtooth--> musical notes(see

http://www.mind-dump.net/configuring-the-stm32f4-discovery-for-audio#comment-1344

).

When I try to use USART3(interrupt) using Arduino serial monitor with Arduino/Software Serial to send character to change musical note I get no sound. I've avoided using pins assigned to the I2's, and can toggle LED's and echo characters both demonstrating successful communication and 'understanding' of the character data I'm sending, but not sound.

Is there some inherent conflict possible?
3 REPLIES 3
Posted on May 13, 2013 at 00:43

You look to be making assumptions about the alignment of the RXNE of the USART, and the TXE of the I2S in the USART_IRQHandler

The code presentation is a bit messy on the web page, post clearly here within Format Code Block.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
pccmd
Associate II
Posted on May 13, 2013 at 01:18

FormatCodeBlock did not work so I've attached .txt file with main.c, codec.c and codec.h

________________

Attachments :

AUDIO_I2C_I2S.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzzK&d=%2Fa%2F0X0000000bRn%2Fxkyoe5TEMsjvoMl5r.2P32oZIO7Tp.LWymRTyY.5UdI&asPdf=false
pccmd
Associate II
Posted on May 14, 2013 at 04:53

SOLUTION: I had stupidly neglected to make sure that '\n' sent from serial monitor was not allowed to confuse the issue. So the if statements would not only test the intended character but also     != '\n'  was needed.