cancel
Showing results for 
Search instead for 
Did you mean: 

WAVE PLAYER AND RECORDER

sami
Associate II
Posted on April 16, 2013 at 21:57

Hi

My application depends on the discovery board design where I need to record  and play simultaneously.

It seems when it record only the recorded wave  is clear with low noise  , but when playing  wave at same time the recorded sound is full of noise and not clear .

I am debugging for hours but no way ..

can it be ?:
  • writting to usb (file system) is slow and cant handle playing and recording so it delays the recording .
  • a miss match between interrupts ..

Any suggestions?

Also I cant open the recorded file rec.wave in windows7 any suggestion here too .

Thank you in advanced

Esat

#stm32f4
7 REPLIES 7
frankmeyer9
Associate II
Posted on April 17, 2013 at 08:32

I am not an expert in USB, so I can't judge the viability of you design (which code you not revealed).

But to check if you have dropouts, or to measure noise, create a sine signal of reasonable frequency and level, and check the output signal. In case of visible/audible trouble, you can trace it's way back through the code.

sami
Associate II
Posted on April 17, 2013 at 11:12

The code  depends on the discovery code .. same code ..

I hope one of the discovery board people from ST reply because it is the heart of the design to play and record at same time .. if the stm32f4 cant handle that ( I dont think so ) so I need to change the design to use 2 MCU one for recording and other for playing.

Could be a problem in the Mic in case of wrong soldering ?

frankmeyer9
Associate II
Posted on April 17, 2013 at 11:46

I hope one of the discovery board people from ST reply because it is the heart of the design to play and record at same time ..

 

Could you explain what you mean ?

There is no audio/mic input to the STM32F4, at least I can't see any.

I understand sect. 4.6 ''On board audio capability'' that you can input audio data (from a mic) to the CS43L22 directly only, bypassing the MCU.

Otherwise, the audio DAC is driven by I2S, so I can't see a performance bottleneck in the MCU here.

To cite directly:

�? The sound can be output in different ways through audio DAC:

 

–     Using I2S protocol

–     Using the STM32F4 DAC to analog input AIN1x of the CS43L22

–     Using the microphone output directly via a low pass filter to analog input AIN4x of the CS43L22

sami
Associate II
Posted on April 17, 2013 at 14:24

Hi FM

There is MEM audio sensor (mic) on the board ..

However I guess I found the problem in my board I use speaker output not headphone output . it seems CS43L22 limits the signal and distroy the wave.

I am still debugging ..

but why I can still open the recorded wave in windows XP not in windows 7 ..

frankmeyer9
Associate II
Posted on April 17, 2013 at 14:53

There is MEM audio sensor (mic) on the board ..

 

Well, that makes sense. And there shouldn't be a performance problem to drive both at the same time. But perhaps you overload the output, and get clipping ?

but why I can still open the recorded wave in windows XP not in windows 7 ..

 

That seems a different story altogether...

Palacios.Bruno
Associate III
Posted on April 18, 2013 at 16:35

Why don't you try to save a chunk of data in the internal buffer and then reproduce it to ensure everything works ok in your code? Forget storage, for now.

Are you acquiring data and reproducing it at the correct sample rate?

Toggle a pin in the interrupt routine and then measure the time with an oscilloscope to ensure everything works fine.

sami
Associate II
Posted on April 22, 2013 at 10:08

Hello

The problem is fixed ; Thank you all ;

In my board I am using the speaker output not the headphones .. So when playing back the CS43l22 limits the output to some level so it looked that it was recording garbage.. after some tests we could change the limits and now it is ok .

Thank you all