Flashing a new or bricked VS1005G board

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
VSDSP Expert
Posts: 2828
Joined: Tue 2010-06-22 13:43

Re: Flashing a new or bricked VS1005G board

Post by Panu »

That's great! What was the trick?

Did you do something differently first? What made it work?

-Panu
technic
Senior User
Posts: 47
Joined: Mon 2017-11-20 10:23

Re: Flashing a new or bricked VS1005G board

Post by technic »

There is my answer:
viewtopic.php?f=13&t=2134&p=11841#p11839

Thank you for help!
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: Flashing a new or bricked VS1005G board

Post by treverwagenhals »

Good day all,

I'm trying to add an external SPI flash to my breakout board to verify the functionality before fabrication.

This is the SPI flash I am testing:

https://websites.godaddy.com/blob/d0f18 ... 164754.pdf

There are 6 pins on it that I see I need to connect: SI, SO, SCLK, CS, VCC and VSS. The flash requires 2.7-3.6 volts, so I tried using IOVDD to drive it (I hope this is okay). I then tried hooking up:

SI - MOSI0
SO - MISO0
CS - XCS0
SCLK - SCLK0

and

SI - MOSI1
SO - MISO1
CS - XCS1
SCLK - SCLK1

for both tests, I got the same error that seems to show that it is not detecting the SPI flash:

Code: Select all

Starting VS1005g external SPI Flash prommer v2016-08-19...
  Default SPI speed 0.5 Mbit/s
  Serial Flash RDID: manufacturer  0, type  0, density  0
    Warning: Can't find RDID
  Serial Flash REMS:    0
    Warning: Can't find REMS

Opened map file "eeprom_e.map"
  Set SPI speed to 10.0 Mbit/s
  Programming file "eeprom_e.img" (0x009a4d bytes) to addr 0x000000 (0)
    Erasing: ..........
    VERIFY ERROR block 0 (addr 0 - 255)!
    ABORTING!
FATAL ERROR, ABORTING!
Finished in 0.46 seconds. Press Close/Cancel on VSIDE
For promming purposes, I just downloaded the 3.55 ext software available, launched vside, opened the solution, built it, connected my breakout board after running it, then went to prommer and tried to flash it. I did not make any changes to the code (I assumed that it was default hooked up to one of the two SPI busses and no modifications would be needed)

So, is the SPI flash I bought compatible with the chipset?
Is using IOVDD for the voltage source okay?
Is there some kind of code modification that I need to do (I saw in some other threads that GPIO1-15 was used as CS, but I don't know if that same situation should apply here)

Thanks!
Hannu
Senior User
Posts: 410
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: Flashing a new or bricked VS1005G board

Post by Hannu »

Hello!

Your chip looks good with a quick look.

You may want to pull up #CS #hold and #WP with something like 10-100k resistor.

#CS for ext flash boot
#hold for generally getting the data through
#WP No write protection please.

The rest of your connections are correct and IOVDD is good power source for the flash.
Just for a reminder the GPIO0_7 has 100k pull-up resistor on break-out board. If external circuitry pulls it down during boot, you get 1.8V logic levels.

If the #WP and #hold pull-up doesn't help, my next guess is bad connection. You should see the RDID and REMS at least.

Do you have some other devices on the SPI bus?

And please read example schematics and firmware operation chapters from datasheet. They give short check list for getting design your design right.
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: Flashing a new or bricked VS1005G board

Post by treverwagenhals »

Thanks for the assistance Hannu!

With your instructions I'm now able to get the prommer to flash from what I can see:

Code: Select all

Starting VS1005g external SPI Flash prommer v2016-08-19...
  Default SPI speed 0.5 Mbit/s
  Serial Flash RDID: manufacturer  e, type 40, density 15
  Serial Flash REMS:  e14

Opened map file "eeprom_e.map"
  Set SPI speed to 10.0 Mbit/s
  Programming file "eeprom_e.img" (0x009679 bytes) to addr 0x000000 (0)
    Erasing: ..........
    Program: ..........
  Ok
ok.
Resetting...
Now, I want to try to get the flash to show up as a drive on my PC to configure it. I pull up D0/GPIO0_0/S1 like I would for internal flash. When I do this though, the internal flash still shows up.

In VSIDE, when I click run after flashing with the prommer, I get the following output:

Code: Select all

Hello.
VSOS 3.50 build Apr 21 2018 13:57:06
VLSI Solution Oy 2012-2017 - www.vlsi.fi

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

Installed system devices:
S: SPI Flash 0e14.
USB publishing disk: SPI Flash 0e14.
Size 1.9 MB.
SCSI START
This shows me that it is recognizing that external flash, even though it is not pulling it up for me.

The other detail I noticed is that when I use Termite to try to use the device, there is no bootup information given like it was before promming the external flash. There doesn't seem to be any communication over the UART within termite, even though I can see some information within VSIDE. When I try the same thing with D0 not pulled high, I get the following in VSIDE:

Code: Select all


Hello.
VSOS 3.50 build Apr 21 2018 13:57:06
VLSI Solution Oy 2012-2017 - www.vlsi.fi

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

Installed system devices:
S: SPI Flash 0e14.
þ
This looks like an incomplete prompt identical to the one with D0 pulled high, but because it looks like its not completing, I'm assuming something may be happening before the shell is loaded to let me use it. But that is just my guess.

So, is pulling up the external SPI flash different than pulling up the internal flash?
Why is my Termite console not working anymore and how may I get both functions working?

Thanks.
Arkantium
User
Posts: 10
Joined: Tue 2022-06-07 16:32

Re: Flashing a new or bricked VS1005G board

Post by Arkantium »

Good morning,

I have tried to program my new self designed PCB prototype (based on schematics for MK2 Breakout board) and I don't understand why I cannot make it work.

If I run the Serial Port monitoring at first, I could read this on the log:

Terminal: COM port monitoring started. Port: COM6 Speed: 115200 bps.

So I assume that is been detected, and then I run the Prommer/Flasher utility, selecting "VS1005G Internal flash prommer/Browse/eeprom.img" (this eeprom.img has been downloaded from the forum), and after that, when I press "Start" VSIDE returns me an error:

ERROR: Program loading failed! Invalid serial port or handshaking failure.

You can try one of the following:

- Press reset on board and click 'retry' to try again.

- Remove any SD card, press rest on board and click retry.

- Click 'settings' to launch solution options dialog. Verify that all parameters are correct (including COM port).

- Click 'cancel' to close this dialog


Because of the board does not have any reset button (as MK2) I am pulling down XRESET (pin 8) to GND, any SD card is connected and in settings everything looks ok for me (even the COM port 6, recognized for Serial port monitoring).

I solved this problem for my MK2 board pulling up to IOVDD PINS 9 and 10, but in my self designed pcb this is not making any difference and the error persists, so I cannot program the kernel and so, internal memory is not detected by usb neither.

What could I be missing? Am I doing something wrong?
I hope you could helpme because I am a little be desperate.

Many thanks
Hannu
Senior User
Posts: 410
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: Flashing a new or bricked VS1005G board

Post by Hannu »

First, don't run serial monitor at same time as trying to prom the kernel.

The error window has the settings button. It will open the solution properties. From debug tab click autodetect to set the promming serial port automatically.

You can also access this same properties window by right clicking solution (not the project) in solution browser and selecting properties.
Post Reply