Software reset

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.
Post Reply
penoud
Senior User
Posts: 28
Joined: Wed 2014-08-13 9:25

Software reset

Post by penoud » Fri 2015-01-23 16:21

Dear VLSI team,
What is the way to apply a software reset on a VS1005G with VSOS 3.20 in order to reload the firmware and restart the application?

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

Re: Software reset

Post by Panu » Fri 2015-01-23 19:13

A hardware reset clears some internal register values which is difficult to mimic with software, but you can restart the ROM code execution by jumping to 0x8000. If you're making an AP3 or DL3 executable for VSOS3, there's an easy way to do it: you can declare in your c file:

Code: Select all

#include <volink.h>
LINK_ABS(Reboot,32768) void Reboot(void);
and then in your code call Reboot(). It's not 100% the same as a cold boot, but it's quite close. Please see if it's enough for your purposes.

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

penoud
Senior User
Posts: 28
Joined: Wed 2014-08-13 9:25

Re: Software reset

Post by penoud » Mon 2015-01-26 16:20

Dear Panu,
Thank you for your answer. I implented your solution trigger by pressing a push button. I wait to insure I run my application during first boot. Then I pressed the button. It's look the board reboot but fail to load my application and restart.

Code: Select all

Hello.
VSOS 3.20 build Jan 15 2015 10:56:33
VLSI Solution Oy 2012-2014 - www.vlsi.fi

Starting the kernel.. Starting Devices...  Internal Flash 
Installed system devices:
S: SPI Flash c213, handled by FAT.

Start OS3 OK.

fopen S:CONFIG.TXT [0:b55] Buf[1c01] Load drivers, config 0...
Driver: AUDIO... AUDIO... 
fopen S:SYS/AUDIO.DL3 [1:b70] Buf[1d05] 
fopen A:of=48000 [2:b8b] fclose[b70] AUDIO... 
fopen S:SYS/AUDIO.DL3 [1:b70] Buf[1d05] Already loaded(LIB0).
fclose[b70] 
fclose[b55] 
1 driver(s) loaded.

VSOS running with 5 tasks:
Task   I/O Stack:0010-020f (512w), free:215
Task   Int Stack:0210-024f ( 64w), free:29
Task DECOD Stack:0254-03cf (380w), free:379



Interrupts: INT0_DAC:2->37765 INT6_MAC0:2->14031 INT13_RX:1->32923 INT16_TI2:2->10628 INT18_SRC:2->13

Load S:INIT.AP3...
Load S:INIT.AP3...
fopen S:INIT.AP3 [0:b55] Buf[1c01] SDSD... 
fopen S:SYS/SDSD.DL3 [1:b70] Buf[2b15] fclose[b70] SD library load with success
SDSD... 
fopen S:SYS/SDSD.DL3 [1:b70] Buf[2b15] Already loaded(LIB2).
SPI read data = 255
SPI read data = 255
SPI read data = 255
SPI read data = 255
SPI read data = 255
SPI read data = 255
SPI read data = 255
SPI send data = 0
SPI read data = 255

Hello.
VSOS 3.20 build Jan 15 2015 10:56:33
VLSI Solution Oy 2012-2014 - www.vlsi.fi

Starting the kernel.. Starting Devices...  Internal Flash 
Installed system devices:

Start OS3 OK.
Start OS3 OK.

fopen S:CONFIG.TXT [0:b55] Buf[1c01] Load drivers, config 0...
Driver: AUDIO... AUDIO... 
fopen S:SYS/AUDIO.DL3 [1:b70] Buf[1d05] 
fopen A:of=48000 [2:b8b] fclose[b70] AUDIO... 
fopen S:SYS/AUDIO.DL3 [1:b70] Buf[1d05] Already loaded(LIB0).
1 driver(s) loaded.


Task   I/O Stack:0010-020f (512w), free:215
Task   Int Stack:0210-024f ( 64w), free:29
Task   Int Stack:0210-024f ( 64w), free:29
Task    UI Stack:0252-0253 (  2w), free:1
Task    UI Stack:0252-0253 (  2w), free:1
Task    UI Stack:0252-0253 (  2w), free:1


Interrupts: INT0_DAC:2->37765 INT6_MAC0:2->14031 INT13_RX:1->32923 INT16_TI2:2->10628 INT18_SRC:2->13


Load S:INIT.AP3...
fopen S:INIT.AP3 [0:b55] Buf[1c01] 
Hello.
VSOS 3.20 build Jan 15 2015 10:56:33
VLSI Solution Oy 2012-2014 - www.vlsi.fi
...

penoud
Senior User
Posts: 28
Joined: Wed 2014-08-13 9:25

Re: Software reset

Post by penoud » Mon 2015-01-26 16:56

We found an hardware solution by adding a transistor in the power path.
Best regards

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

Re: Software reset

Post by Panu » Tue 2015-01-27 12:29

Hi!

Ok, great that you've found a working solution. Also giving a pulse to XRESET might work; but certainly cutting the power has better chance of resetting also the other chips on the board than VS1005.

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

safeer
Senior User
Posts: 37
Joined: Tue 2014-12-09 13:53

Re: Software reset

Post by safeer » Wed 2016-09-07 12:51

Hi Panu,
What should be minimum pulse duration in XRESET pin for resetting VS 1005 IC ? We have provided a 100 ms active low signal but it didnt happen.

Many Thanks,
Safeer.

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

Re: Software reset

Post by Panu » Thu 2016-09-08 9:06

Hi!
We have provided a 100 ms active low signal (to XRESET) but it (reset) didnt happen.
Impossible. The falling edge of XRESET is asynchronously detected, within nanoseconds. Without it, the chip would never work. Please measure the XRESET pulse low voltage with an oscilloscope. If the hardware really sees the low voltage, it will put the chip to reset. Whether it resumes again, is another matter; it needs proper clock and voltages to resume from reset.

Can you clarify exactly, what do you mean that the reset didn't happen? Do you mean that the VS1005 continued operation as if it had never seen the reset?

-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
pasi
VLSI Staff
Posts: 1625
Joined: Thu 2010-07-15 16:04

Re: Software reset

Post by pasi » Thu 2016-09-08 9:49

A way to perform a hardware reset from software is to use the watchdog. However, it doesn't reset any external devices.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply