Page 2 of 2

Re: USB Mass Storage Device doesn't work.

Posted: Thu 2020-06-04 10:24
by Panu
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

Re: USB Mass Storage Device doesn't work.

Posted: Thu 2020-06-04 13:00
by Henrik
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

Re: USB Mass Storage Device doesn't work.

Posted: Mon 2020-06-08 10:35
by FelixKunzJr
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

Re: USB Mass Storage Device doesn't work.

Posted: Mon 2020-06-08 14:05
by Panu
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

Re: USB Mass Storage Device doesn't work.

Posted: Mon 2020-06-08 14:28
by FelixKunzJr
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

Re: USB Mass Storage Device doesn't work.

Posted: Tue 2020-06-09 22:33
by Panu
Thanks a lot! Hmm, now that it boots, does the IOVDD rise to 3.3 volts?

Re: USB Mass Storage Device doesn't work.

Posted: Wed 2020-06-10 12:14
by FelixKunzJr
Yes, IOVDD is steady at 3.1-3.3V.