Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: W25Q128FV Serial Flasher

  1. #1
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,567

    W25Q128FV Serial Flasher

    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/Ardu...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 by Frank B; 12-27-2014 at 07:56 AM.

  2. #2
    Quote Originally Posted by Frank B View Post
    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/Ardu...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.

  3. #3
    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.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  4. #4
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,567
    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.

  5. #5
    Quote Originally Posted by Frank B View Post
    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,

  6. #6
    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/26305...ll=1#post64908

    Any suggestions?
    Thank you

  7. #7
    Senior Member
    Join Date
    Feb 2013
    Posts
    563
    Quote Originally Posted by alfa66 View Post
    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/26305...ll=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 by mxxx; 02-16-2015 at 06:00 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •