How to change fw on VS1103 module

Designing hardware that use VLSI Solution's devices as the system controller for the entire design.
picdev
User
Posts: 7
Joined: Wed 2018-06-06 17:44

How to change fw on VS1103 module

Post by picdev » Wed 2018-06-06 18:03

I have a VSMD301V066 VS1103 Module, the fw is SCI-controlled uSD player v0.60.
When the module starts it sent me the version of the fw on uart "0.60" , I run some .exe script files but I cant connect. (I configure the com port)

I want to play some files from SD CARD, via UART commands.
Do I need to put some files first for start communicate with the module?

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: How to change fw on VS1103 module

Post by pasi » Fri 2018-06-08 10:45

You need to prevent boot by keeping GPIO0 low while you power up the module. You can then reprogram by using pcmodflash.exe .
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

PaulEE
User
Posts: 8
Joined: Thu 2019-10-31 2:34

Re: How to change fw on VS1103 module

Post by PaulEE » Thu 2019-10-31 2:42

Hello,

If someone could please point me in the right direction, I'd appreciate it.

I want to do precisely with the original poster wanted to do. I have a few WAV files on a 2 GB SD card. I want to use PCMODFLASH to put the correct firmware on the VS1103MOD board and control the device via UART (eventually SPI).

I have successfully installed VSIDE, imported the solution, compiled all the separate modules. I have used PCMODFLASH to load the firmware and audio files to on-board memory and successfully play the files from that medium.

I now want to put the files on the SD card and do the same thing.

I have read all documentation I can find. I pull the pin low for programming as in the last post. If I understand correctly, the file I need is sdmodule.spi. I would then type something like this (windows 10 command prompt):

pcmodflash -l sdmodule.spi -p 3

In my mind, pcmodflash will connect to the chip via my FT232 serial cable via COM3 @ 9,600 8N1, and it will load sdmodule.spi onto the SPI FLASH. At that point, the commands in reference material will allow me to play the files.

However, no matter what I try to do, I only ever end up seeing spiall.spi, recorder(s).spi, etc. and boot.img, eeprom.img, sdeeprom.img, and tmp.img.

I cannot get sdmodule.spi to appear anywhere, no matter what I do.

Questions are:
Am I doing this correctly?
Is the file I am looking for the correct file to be looking for?
What the heck am I doing wrong here?

This sound module will eventually make its way into hundreds of products a year, and I really would like it to work, but I am having one hell of a time getting to that point.

Any help is greatly appreciated.

Thank you
Paul

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: How to change fw on VS1103 module

Post by pasi » Thu 2019-10-31 11:49

Hi,
There seems to be a small difference between the VSIDE solution and the Linux development setup.

Looking at the post-build command on the sdmodule project, it creates a file sdeeprom.img . Try programming that with pcflash.

(The VSIDE prommer defaults to "eeprom.img", so the spiplayer project creates eeprom.img, and sdplayer creates a similarly named file.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

PaulEE
User
Posts: 8
Joined: Thu 2019-10-31 2:34

Re: How to change fw on VS1103 module

Post by PaulEE » Wed 2019-11-13 2:48

pasi wrote:
Thu 2019-10-31 11:49
Hi,
There seems to be a small difference between the VSIDE solution and the Linux development setup.

Looking at the post-build command on the sdmodule project, it creates a file sdeeprom.img . Try programming that with pcflash.

(The VSIDE prommer defaults to "eeprom.img", so the spiplayer project creates eeprom.img, and sdplayer creates a similarly named file.)
I will try this. Thanks very much, and stay tuned. I really hope to use this in our product as I like how it (theoretically as of right now ;) ) works! It will be perfect if I can get the software worked out.

Thanks again.

PaulEE
User
Posts: 8
Joined: Thu 2019-10-31 2:34

Re: How to change fw on VS1103 module

Post by PaulEE » Wed 2019-11-13 3:09

Alright, so I have located and loaded sdeeprom.img:

pcmodflash -l sdeeprom.img -p 3 -sm 4

It successfully programmed the part, or so it says...

"SPI Programming Successful!
Programming Finished Successfully
11 blocks programmed in 54 seconds, 0.10 kB/sec"

When I open the COM3 port @ 9,600 baud and do a power-on reset with SD installed, I do not get any output on the UART port of the module.

At this point, am I correct in assuming I must write custom serial code (beyond a simple AT terminal-type syntax) to begin to play the files? Should I have gotten a "hello, world!"-sort of message on power-on?

Thank you.
Paul

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: How to change fw on VS1103 module

Post by pasi » Wed 2019-11-13 11:52

Hi,
There seems to an issue with the VSIDE solution caused by the difference between the vs10xx chips.

To fix it you need to add "-x 0x30" parameter to the coff2allboot post-build step in the sdplayer (and spiplayer) Properties. (Meanwhile I will look into updating the solution in the web.)

You should then get "SD0.60" at power-up and all restarts.

Edit: you may also need to change the C compiler (Properties -> Tools) to vcc.
Edit2: The 0.60 VSIDE solution is now updated in the web. http://www.vlsi.fi/fileadmin/modules/vs ... e-060b.zip
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

PaulEE
User
Posts: 8
Joined: Thu 2019-10-31 2:34

Re: How to change fw on VS1103 module

Post by PaulEE » Thu 2019-11-14 1:27

Good evening! (morning!),

I have begun with fresh files, opened VSIDE, added -x 0x30 to the two post-build steps for each sub-project, and compiled (lcc worked).

I do get 0.60I (capital letter "I" there) upon boot, and then the module sends out a constant stream of "c". I do not see "SD" on the initial transmit from the module, though..?

No UART communication thus far as caused the behavior to change.

I have several files (no more than ten) on the SD card. They are short WAV clips (7 seconds or usually less).

What is the minimum amount of UART data that needs sent to actually play a file? I tried following the datasheet by sending 0x02 0x00 0x1 (file #1) and 0x8c for register with MSB = 1. It doesn't seem to "care" that I send this, though.

Is this where I should move the development over to a microcontroller and spin-up a SPI-controlled interface? The end application simply needs to play one of a handful of files, and then stop. The easiest path to get to this reality would be quite helpful, as these pesky deadlines are getting closer and closer...

Thanks very much for all the help thus far - very helpful.

Best regards,
Paul

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: How to change fw on VS1103 module

Post by pasi » Thu 2019-11-14 12:58

I got the same results when I tried the boot image generated with lcc. It seemed to me that the code triggered some lcc bug, but I got a working boot image by changing the compiler to vcc (and adding asm-uartsimple.s to the libvs1103 project, for some reason it was missing). Ah, that explains one reason why it doesn't work with lcc - the assignment which is designed to pull the uart routines from the library is eliminated by lcc..

The new version of the VSIDE solution should produce good images.

The player starts to play files by default, so you don't need to send UART commands.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

PaulEE
User
Posts: 8
Joined: Thu 2019-10-31 2:34

Re: How to change fw on VS1103 module

Post by PaulEE » Thu 2019-11-14 19:17

Excellent, yes. Makes sense.

I will try this later today after I get some high-priority fires put out :)

When I changed sdplayer to vcc and left the other lcc, it compiled. When I changed both sdplayer and spiplayer both to lcc, it threw errors...so I went back to lcc.

If the new solution from a post or so ago works, then I will simply download, compile, and be on my way hopefully!

Will let you know how it goes later on.

Thanks again.
Paul

Post Reply