W25Q128FV Serial Flasher

Status
Not open for further replies.

Frank B

Senior Member
Hi,

i needed this for an other project, and maybe it is useful for others too (?!)
The sketch searches for a directory "SERFLASH" on sd-card, and flashes all files in it to the W25Q128FV on the Audio Shield.
The chip is erased before, and the contents are veryfied automatically.
Have fun :)

Edit: Newest version here: https://github.com/FrankBoesing/Arduino-Teensy-Codec-lib/tree/master/examples/sd2serialflash

Sample Output:
Code:
W25Q128FV Serial Flasher
Initializing SD card...initialization done.

FOREVERM.MP3                    2520884 Bytes
AAC2.M4A                        4159965 Bytes
K.FLA                   9427298 Bytes
                        3 File(s), 16108147 Bytes
Flash Status: 0x0, ID:0xEF,0x40,0x18,0x0  is ok.
File(s) fit(s) in serial flash, 669069 Bytes remaining.
Erasing chip....done.
1. Flashing "FOREVERM.MP3" at Position: 0x0...done.
2. Flashing "AAC2.M4A" at Position: 0x267734...done.
3. Flashing "K.FLA" at Position: 0x65F111...done.
Verify.
1. Verifying "FOREVERM.MP3" at Position: 0x0...ok.
2. Verifying "AAC2.M4A" at Position: 0x267734...ok.
3. Verifying "K.FLA" at Position: 0x65F111...ok.
Ready. All Done.

Regards,
Frank.
 
Last edited:
Hi,

i needed this for an other project, and maybe it is useful for others too (?!)
The sketch searches for a directory "SERFLASH" on sd-card, and flashes all files in it to the W25Q128FV on the Audio Shield.
The chip is erased before, and the contents are veryfied automatically.
Have fun :)

Edit: Newest version here: https://github.com/FrankBoesing/Arduino-Teensy-Codec-lib/tree/master/examples/sd2serialflash

Sample Output:
Code:
W25Q128FV Serial Flasher
Initializing SD card...initialization done.

FOREVERM.MP3                    2520884 Bytes
AAC2.M4A                        4159965 Bytes
K.FLA                   9427298 Bytes
                        3 File(s), 16108147 Bytes
Flash Status: 0x0, ID:0xEF,0x40,0x18,0x0  is ok.
File(s) fit(s) in serial flash, 669069 Bytes remaining.
Erasing chip....done.
1. Flashing "FOREVERM.MP3" at Position: 0x0...done.
2. Flashing "AAC2.M4A" at Position: 0x267734...done.
3. Flashing "K.FLA" at Position: 0x65F111...done.
Verify.
1. Verifying "FOREVERM.MP3" at Position: 0x0...ok.
2. Verifying "AAC2.M4A" at Position: 0x267734...ok.
3. Verifying "K.FLA" at Position: 0x65F111...ok.
Ready. All Done.

Regards,
Frank.

Thank you for sharing Frank, I just soldered the eeprom on the audio shield today, I will try your utility in the morning.
 
W25Q128FV Serial Flasher
Hi Frank,
thanks again for sharing, here is the log of the first attempt.

(NEW.256 is a file which contains 8-bit waveforms)

It seems like it worked, but I am curious about the meaning of the very first message (Verifying ... at Position 0x0 ... is not ok). Can you kindly explain ?

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Initializing SD card...initialization done.

NEW.256 65536 Bytes
1 File(s), 65536 Bytes
Flash Status: 0x0, ID:0xEF,0x40,0x18,0x0 is ok.
File(s) fit(s) in serial flash, 16711680 Bytes remaining.

Check flash content: Verify.
1. Verifying "NEW.256" at Position: 0x0...is not ok.
Erasing chip....
done.
1. Flashing "NEW.256" at Position: 0x0...done.
Verify.
1. Verifying "NEW.256" at Position: 0x0...ok.
Ready.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
Do not worry, everything is perfect. It just means that the contents of Flash does not meet the directory.
It checks this, because flashing is not necessary if the contents are the same.
 
Do not worry, everything is perfect. It just means that the contents of Flash does not meet the directory.
It checks this, because flashing is not necessary if the contents are the same.

Thank you Frank,
I figured this out but forgot to update the thread - very clever, no need to re-write if the content is the same !

Have a great week,
 
Was wondering if anybody has tried to connect: Audio Adapter +W25Q128 and ILI9341

I am having some issues with flash_read_pages

https://forum.pjrc.com/threads/2630...display)-library?p=64908&viewfull=1#post64908

Any suggestions?


i'm unfamiliar with the ILI9341_t3.h library, but i would have guessed it has something to do with flash_spi.h not using transactions.
i was having issues (of another kind) which i eventually resolved by rewriting the bits i needed from flash_spi using SPIFIFO.h (as frank's play_serialflash library does).

that might help or not with ILI9341_t3.h, but since play_serialflash seems to play nicely with various audio stuff (play_sd_wav) despite not using transactions (as long as you use native CSs - which you seem to do), it might just work.


edit: just to be clear -- i'm not suggesting that using SPIFIFO would solve your problems (though, considering play_serialflash is fairly cooperative, it might); I'm just saying chances are there's some conflict re SPI.

i just briefly looked up ILI9341_t3.h, and it seems this is using transactions and a 30 MHz clock; everything SD related uses transactions, too, using a 24 MHz clock (not sure what you actually do when you say you use the "audio adapter"?). flash_spi doesn't use transactions. that said, i'm just guessing; i don't really see what the conflict might be.
 
Last edited:
Status
Not open for further replies.
Back
Top