2013-01-20 06:12 AM
Hi all,
I use the STM32F4Discovery Audio playback and recording example. I sound 1KHz from speakers and record the audio. The wav file I get is filled with click sounds. Also if I modify the code and keep everything in RAM, export it to Matlab I see distortions in the waveform (though maybe the problem is write speed to USB Stick). What could be the problem? Thank you2013-01-23 11:09 PM
No one has any ideas?
2013-01-24 12:09 AM
Also if I modify the code and keep everything in RAM, export it to Matlab I see distortions in the waveform (though maybe the problem is write speed to USB Stick).
What could be the problem?
Without any code or more detailed description, this is hard to judge. But your suspicion might be correct. Flash writes (that's what your USB stick is) can take a rather long time if a block erase is involved. You might need some more elaborate buffering mechanism. I would sample a lower frequency, and view the results in Matlab or whatever. The size of the gaps should give a measure of the delays involved. And second, you could set a GPIO signal while a USB Flash write is in progress, and observe this signal with a scope.
2013-05-23 12:13 AM
I have made a PCB with STM32F207IGT with complete audio section including CS43L22 & TS472IQT .Now i am recording some audio using mic on this board and storing it on Pen drive connected on the USB port available on the board.Now Iam trying to play it on the speaker connected on the Speaker pins (Pin No. 4,6,7,9) configured in mono mode i.e pin no.6&4 are short and pin no. 7&9 shorted as connected in evaluation board.Further I am using same code as available for Evaluation board and this same code is working properly on the evaluation board.?No Iam unable to hear the recorded file from the speaker,What i am hearing is only the Bump sound(like THAK-THAK) with membrane of the speaker going IN & OUT. Even we have accessed the status registers of the Codec and their status is also same they have in the evaluation board.Can someone please help me out ans suggest some thing for this problem.
Thanks in advance. Sadatan2013-05-23 04:27 AM
Examine the data that you have recorded, make sure the samples are valid/useful.
Examine the output signal with a scope. Generate test data on the PC, say sine waves with different frequency and amplitudes, check them on the board, and with a scope.2013-05-23 09:14 PM
Thanks for the reply Clive,But same file is working on the Evaluation board properly which is not working on my board.
2013-05-30 05:17 AM
This is an old post but I thought for future reference I should update you all regarding the solution.
ST was kind enough to give me a working example, apparently there was an error in the I2C interrupt, it took too long, and so the solution incorporates double buffer which is in use by the filter outside of the ISR