MP3 files on SPI flash for YX5200-24SS MP3 chip - Page 1
Forum section: electronics / general

author: mr.LED
author_rank: Newbie
timestamp: October 10, 2017, 02:41:47 pm
content: Working on a very low budget project, so I've resorted to using a chinese YX5200-24SS MP3 player chip. It's most commonly used in the DFplayer module, which is a microSD based MP3 player, but the YX5200-24SS also supports flash, usb, etc.I am using a Winbond W25Q16JVSSIQ nor flash chip and programming it externally with a FlashcatUSB Classic.I have it hooked up exactly as the chinese schematic shows. (see attached)First off, I noticed that the Winbond W25Q16JVSSIQ supports Quad SPI, so /WP and /HOLD are disabled. I am using standard SPI, so do I leave the Quad SPI pins floating?Second problem is getting the MP3 file onto the flash chip. I used a binary file converter to convert the MP3 file to binary and loaded it onto the flash. However, the YX5200-24SS datasheet indicates that the files need to be named:Google translated from the datasheet:Flash stored in the fixed voice informationTrack 1) 0.mp3Track 2) 1.mp3Track 3) 2.mp3Track 4) 3.mp3...Note: which contains MP3, WAV format audio files are compressed without any audio files. Does not contain any folders,Located in the root of the file systemDoes the MP3 binary store the name of the track? (because I diffed the same track with different names and said no differences) If not, then how do I format the flash to have the MP3 file names? Does the file location on the flash matter? I've just written the file at the beginning of the flash.Thanks!

author: mariush
author_rank: Super Contributor
timestamp: October 10, 2017, 02:48:54 pm
content: Could it be the chip expect to have a file system like FAT16 or FAT32 for example?Maybe create a ram disk , format it with fat16 or fat32, copy the files there, then create a disk image and then write the disk image to the memory chip?

author: voltsandjolts
author_rank: Unknown
timestamp: October 11, 2017, 12:51:29 pm
content: From section 1.2 of the manual (via google translate):QuoteSD Card might be easier to experiment with and then convert the card to a disk image for writing to SPI FLASH.Could use Win32DiskImager or whatever.

author: pixelk
author_rank: Newbie
timestamp: October 29, 2017, 12:03:45 am
content: I don't know about the data format expected in the NOR flash, but I can add a bit of information (I just successfully used the DFRobot module with a Wemos DR1Mini) :For example, if we specify to play NORFLASH, we need to send: 7E FF 06 09 00 00 04 FF dd EF(extract from the datasheet).The chip doesn't store or decode the filename, it simply requests "file # x in foler y"

author: jmadison
author_rank: Newbie
timestamp: January 09, 2018, 09:36:56 pm
content: Yes, that's what it wants, a FAT file system. I just got it working with the DFPlayer (and some tricky soldering). If anyone wants an OS X app that creates a FAT file system with your selected files, coverts it to IntelHex, then downloads it to an Arduino to get it onto a NORFLASH chip, See:https://github.com/JonMackey/FatFsToHex.

author: Amir Hossein Fakehi
author_rank: Newbie
timestamp: October 29, 2021, 07:54:36 pm
content: Thanks dear Gorham for your valuable project on github, I have three questions:1- after making a hex file filled with some sort of mp3 files and writing that hex file to nor flash and connect it to DF player chip, have you ever checked the USB of the dfplayer chip as a usb device? you may know that this chip acts as a USB mass storage device when we connect its usb pins to a PC host and works as a SD card reader when using SD cards, and I really want to know if it works so when we use SPI flash also, or not?2- Unfortunately I have not a Apple system and just work with windows os. Is there any windows based versions of your FatFs to Hex project?3- and if not, is there any other ways to make a FatFs compatible file system on a W25qxx nor flash, for example with another arduino?Thanks alot.