Sorry for the extra post, but I thought that I should provide an update, since I previously indicated that the on-board microphone on the STM32F4DISCOVERY board was unusable.
I started exhaustively trying different modes of the SPI/I2S peripheral, and one of them produced more sensible digital data. So, this could be a ~$20 Codec2 demonstration board, but since the audio quality I'm getting out of the microphone isn't great, it wouldn't put Codec2 in the best light. Granted, it is probably not helped by my rudimentary pulse density modulation to LPCM conversion routine; I clock it at 2.048MHz and for each 256 bits of PDM data, I count the number of ones and scale that count up to a signed 16-bit value for each LPCM sample. (2.048MHz / 256 = 8kHz, the codec rate) So the demo firmware image (at present, 36,356 bytes in size) works like this: Talk into the onboard microphone, and hear the Codec2 encoded-decoded result via the headphone jack. Press and hold the blue button on the board (the only user button provided on the PCB), and it bypasses the Codec2 code. It becomes a simple audio pass-through (mic to headphone) so that one can hear what the uncompressed audio sounds like. Release the button, and the Codec2 code is switched back on. The red LED toggles for every audio frame (20mS). The green LED is asserted active high for the duration of the Codec2 processing (encode and decode). (Attaching a scope probe to PD12 allows this to be timed.) The orange LED shows the current state of "voiced1"; the blue LED shows the current state of "voiced2". (For those who don't already know this, these are part of the Codec2 compressed bitstream.) If nothing else, they are a bit reassuring, as they pulse in response to voices/harmonics. ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Freetel-codec2 mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freetel-codec2
