2021-02-21 11:01 PM
Configurations :- STM32CubeMX M4-F446RE+ICS43432 mic
sysclk-168MHz HSE, DMA- circular,SPI2_RX ,half word
I2S2 - half duplex ,master receive mode 32KHz audio frequency
USART2 - 9600 B/s
PDM2PCM middleware use for conversion
..
1)Can Anyone suggest is there anything wrong with the configuration?
2) Now how do I acquire the PCM streaming data to print serially over UART?
3) And how I interface the BSP package before generating the code in the cubeMX
....
Thanks in advance.
2021-02-22 12:43 AM
Hello
9600 bps is not adequate rate for this job
32khz sample rate with 16 bit samples need at least 640kbps rate .
2021-02-22 01:02 AM
Hi @Vangelis Fortounas ,
Appreciate your reply thank you .
ok will look into it.
..
Further of the question any ideas answers if you have any experience please support.
2021-02-22 06:40 AM
Hello
I have no experience for audio over async serial transportation but i use serial ports.
UART can't send 16 bits and how the receiver will handle the situation that one byte is missing ? (everything is shifted and garbaged )
A "sync pattern" added every some words is fair solution for synchronization between transmitter and receiver but adds some data overhead.
if data integrity is crucial need a second layer tranportation protocol with packet counting , checksums, ACKs, resend, etc.
2021-02-22 07:25 AM
> 32khz sample rate with 16 bit samples need at least 640kbps rate .
This is a very optimistic estimate.
You need to add start/stop bits to each byte, and add redundancy to check for transmission errors and keep synchronicity.
And baudrates to external devices beyond 0,5Mbps are unrealistic in my experience.
I2S is made for this.
2021-02-22 08:47 PM
Hi @Ozone ,
Yes baud rate is taken care , but i want is 16 bit PCM and the UART is only 8bit +1 stop bit ... so how do I print 2 bytes on UART.?any suggestions
2021-02-22 08:51 PM
Hi @Vangelis Fortounas ,
Yes I got the point what you are explaining.
Thank you for your suggestion.
2021-02-23 12:08 AM
By sending multiple characters (bytes).
I would use text format, otherwise every lost or corrupted byte will desynchronize the reception.
Your protocol must be able to detect corrupted transmissions, and self-correct.
Otherwise, you will never get a stable communication, and errors can only be corrected by resetting one or both participants.