Awkward Problems in Sending MP3 via Serial Port

Publisher:心语乐章Latest update time:2015-09-21 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
 Recently, I plan to build a device that sends MP3 file data from the PC serial port to STM32, and then STM32 compresses the data and sends it to vs1003 to decode and play the sound. The previous method was to read the file in the SD card through SPI and then send it out through SPI. Both methods are based on STM32 and then ask for data from two SPI devices and send data respectively. This method is very simple to implement. However, if the serial port is changed to send music data, then STM32 is very passive and must enter interrupts to stop other activities at all times. In this way, when sending voice data to vs003, the data has not been sent, and an interrupt hits, and it crashes. I tried to enter the interrupt directly and send the data to vs1003 in the interrupt, but in fact, the effect is better than before, but it is intermittent, which must be due to the asynchronous decoding and large time difference.

I was thinking, if there is no interruption, it must be a byte received, then there will be 512 interruptions in total to count as a full packet, and then send this packet to vs1003. If 512 bytes are sent before the next interruption, there will be 511 interruptions left, and vs1003 must be interrupted during this period. If the music is sent out before the 511th interruption, it will sound 512 times again, but it will still be intermittent, but it seems more coherent than before.

Reference address:Awkward Problems in Sending MP3 via Serial Port

Previous article:The problem of receiving large data packets on the serial port
Next article:FSMC only uses the data port address line and has no problem debugging

Recommended ReadingLatest update time:2024-11-15 14:41

MP3 complete circuit diagram
MP3 complete circuit diagram:
[Analog Electronics]
MP3 complete circuit diagram
Chinese menu MP3 song selector based on SC95F8616 microcontroller (2)
3.Key recognition Since the key recognizes the low level of the corresponding scan, P07 is set to output a low level. 1 ) Complete the program flow modification as shown in Figure 16 and make corresponding configuration modifications. Figure 16  Program flow            Figure 17  Modify configurati
[Microcontroller]
Chinese menu MP3 song selector based on SC95F8616 microcontroller (2)
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号