USB Mass Storage Device doesn't work.

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: USB Mass Storage Device doesn't work.

Post by Panu » Thu 2020-06-04 10:24

Hi!
Any idea why i can't format the disk?
Yes. SPI flash chips that don't have page write to RAM buffer are not very common and writing to them is painfully slow, so the kernel doesn't do it. The prommer has this option mainly to be able to write factory fixed firmware to the chip. It's ok for applications that never need to write to the flash.

Hold on, we're making a special kernel version for you, one that supports the byte write, so you can test your PCB.

-Panu
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: 1153
Joined: Tue 2010-06-22 14:10

Re: USB Mass Storage Device doesn't work.

Post by Henrik » Thu 2020-06-04 13:00

Hello!

As Panu already suspected, this prommer warning was crucial:

Code: Select all

Looks like this IC doesn't have working auto-increment.
We did some research together, and turns out that your SPI flash actually does have an auto-increment mode, but it is not activated by default.

So, we made a kernel that tries to activate that bit in your SPI Flash. Please find attached a VSIDE Solution that loads the test kernel into your board. There's a README.TXT file with instructions.

After you have loaded the new kernel, when you boot into USB mode, you should see everything as it was before, except now formatting the drive should succeed.

Please try this new version (and check that the boot message actually says "VSOS 3.58 build Jun 04 2020 11:41:03" on startup). It has been written reading a datasheet, without an actual memory chip of your type, so a positive result is not guaranteed. But with any luck, it might work.

Kind regards,
- Henrik
Attachments
Program_VSOS358Pre_ExtFlash.zip
Load this metasolution into VSIDE and follow README.TXT
(44.22 KiB) Downloaded 8 times
Good signatures never die. They just fade away.

FelixKunzJr
User
Posts: 10
Joined: Thu 2020-04-02 11:28

Re: USB Mass Storage Device doesn't work.

Post by FelixKunzJr » Mon 2020-06-08 10:35

I flashed your kernel successfully, but the behaviour is still the same.

The prommer message:
Default SPI speed 0.5 Mbit/s
Serial Flash RDID: manufacturer bf, type 25, density 41
Serial Flash REMS: bf41

Opened map file "eeprom_e.map"
Programming file "eeprom.img" (0x009a0a bytes) to addr 0x000000 (0)
Erasing: ..........
VERIFY ERROR block 0 (addr 0 - 255)!
Looks like this IC doesn't have working auto-increment.
Retrying with option +b (byte addressing). Writing data
Program: ..........
Ok
Map file "eeprom_e.map" closed
Finished in 14.90 seconds. Press Close/Cancel on VSIDE

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: USB Mass Storage Device doesn't work.

Post by Panu » Mon 2020-06-08 14:05

Hmm. ok, understand. Like Henrik said, this was coded blind, we didn't have this flash IC at hand to test it.
Ok, please post all UART output from boot until the formatting fails. Maybe we can spot something in the output.

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

FelixKunzJr
User
Posts: 10
Joined: Thu 2020-04-02 11:28

Re: USB Mass Storage Device doesn't work.

Post by FelixKunzJr » Mon 2020-06-08 14:28

Here you go:
Hello.
VSOS 3.58 build Jun 04 2020 11:41:03
VLSI Solution Oy 2012-2019 - www.vlsi.fi

Starting the kernel..
Starting Devices...
External SPI Flash

Installed system devices:
S: SPI Flash bf41.
E'Device not open'

0 driver(s) loaded.

VSOS running with 5 tasks:
Task I/O Stack:0010-020f (512w), free:333
Task Int Stack:0210-024f ( 64w), free:28
Task Net Stack:0250-0251 ( 2w), free:1
Task UI Stack:0252-0253 ( 2w), free:1
Task DECOD Stack:0254-03cf (380w), free:379

Interrupts: INT0_DAC:2->37765 INT13_RX:1->32923 INT15_TI1:1->525 INT16_TI2:1->10998

Load S:INIT.AP3...E'Device not open'

S:INIT.AP3 not found.
Nothing to do.USB publishing disk: SPI Flash bf41.
Size 1.9 MB.
SCSI START

Hello.
VSOS 3.58 build Jun 04 2020 11:41:03
VLSI Solution Oy 2012-2019 - www.vlsi.fi

Starting the kernel..
Starting Devices...
External SPI Flash

Installed system devices:
S: SPI Flash bf41.
USB publishing disk: SPI Flash bf41.
Size 1.9 MB.
SCSI START
BRST

ive attached the errormessage to the post
Attachments
Screenshot 2020-06-08 at 15.01.40.png
Screenshot 2020-06-08 at 15.01.40.png (271.65 KiB) Viewed 131 times

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2736
Joined: Tue 2010-06-22 13:43

Re: USB Mass Storage Device doesn't work.

Post by Panu » Tue 2020-06-09 22:33

Thanks a lot! Hmm, now that it boots, does the IOVDD rise to 3.3 volts?
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

FelixKunzJr
User
Posts: 10
Joined: Thu 2020-04-02 11:28

Re: USB Mass Storage Device doesn't work.

Post by FelixKunzJr » Wed 2020-06-10 12:14

Yes, IOVDD is steady at 3.1-3.3V.

Post Reply