Patch to fix SPI flash writing in VS1010D

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
User avatar
Panu
VLSI Staff
Posts: 2766
Joined: Tue 2010-06-22 13:43

Patch to fix SPI flash writing in VS1010D

Post by Panu » Mon 2020-10-26 13:00

Dear VS1010D users!

Here's a patch that fixes inconsistencies we discovered with a Linux PC writing to the SPI flash of VS1010D using USB mass storage in runlevel 4. The problem may occur in other operating systems also, so this patch should be applied to all VS1010D boards that have an SPI flash installed.

To install the patch, place the patch file "boot.dlx" into the root of your system disk, typically the SPI flash itself. It's a good idea to have this patch both in the root of the SD card you use for development, and in the root of the SPI flash, so the patch is loaded no matter which device the VS1010D uses as the system disk.

Please note that the SPI flash is used as the system disk only if it contains a SYS folder in the root. If the SPI flash does not have the "SYS" folder, then the boot.dlx patch is still loaded from the SD card, not from the SPI flash.

When the patch is succesfully loaded, you will see a console notification like the one below:
VS1010D VSOS 4.20
Files:6. Buffers:3.
Runlevel 4
SPIF:c217, 16384K
SD:No ID.
VS1010D patch SPI flash write
Relocked (3007)
For more information, please see the source code of the patch inside the .zip package.

[Edit]
Updated 2020-11-02, version 2.

Thanks for your support!
-Panu
Attachments
boot.dlx
SPI flash writing patch for VS100D, version 2. Place in root of SPI flash. Put also a SYS folder into root of SPI flash.
(1.15 KiB) Downloaded 16 times
arch-bootspifd-2020-11-02-12-43-VS1000D-FixSpiFlashWrite-V2.zip
SPI flash writing patch for VS100D. Version 2. VSIDE solution with source code
(20.54 KiB) Downloaded 10 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
Henrik
VLSI Staff
Posts: 1178
Joined: Tue 2010-06-22 14:10

Re: Patch to fix SPI flash writing in VS1010D

Post by Henrik » Thu 2020-10-29 20:38

Panu wrote:
Mon 2020-10-26 13:00
Here's a patch that fixes inconsistencies we discovered with a Linux PC writing to the SPI flash of VS1010D using USB mass storage in runlevel 4. The problem may occur in other operating systems also, so this patch should be applied to all VS1010D boards that have an SPI flash installed.
One thing worth noticing is that, at least for now, you cannot use Linux to copy this Write Patch to the SPI Flash in USB Mass Storage mode because the bug that this patch fixes may mess up the file system. So, better use Windows to copy the patch to the SPI flash. After the patch has been installed, writing to SPI Flash through USB works fine under Linux.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

User avatar
Panu
VLSI Staff
Posts: 2766
Joined: Tue 2010-06-22 13:43

Re: Patch to fix SPI flash writing in VS1010D

Post by Panu » Mon 2020-11-02 11:30

Henrik wrote:
Thu 2020-10-29 20:38
One thing worth noticing is that, at least for now, you cannot use Linux to copy this Write Patch to the SPI Flash in USB Mass Storage mode because the bug that this patch fixes may mess up the file system. So, better use Windows to copy the patch to the SPI flash. After the patch has been installed, writing to SPI Flash through USB works fine under Linux.
If you also have an SD card in your system, you can put the boot.dlx file to the root of the SD card. Then the patch is loaded from the SD card when you boot your VS1010D board for writing the system files to the SPI flash.

The patch is loaded from the SD card because at that time, the SPI flash doesn't contain a SYS folder, which would make the SPI flash become the system disk. After writing the SYS folder to the SPI flash, the SPI flash becomes the system disk. Then the patch can be loaded from the SPI flash.

Make sure that you write both the SYS folder and the boot.dlx patch file to the root of the SPI flash.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply