How to make programmed "Reboot #"

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
Arek
Senior User
Posts: 22
Joined: Thu 2016-09-01 10:58

How to make programmed "Reboot #"

Post by Arek » Thu 2018-05-03 17:30

Hi,
I'd like to restart my VS1010 in other mode.
Something like "reboot #" but programmed. Not external via UART or resistors to BM# lines.
Have you a simply solution?

my app:
if sth then present contens of SD or SPI memory to USB.

thanks and best regards
am

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

Re: How to make programmed "Reboot #"

Post by pasi » Fri 2018-05-04 17:13

Edit: Not specific to VS1010.

1. If you're lucky and the ROM code doesn't assume a lot of peripheral states - configure the GPIO pins as outputs and set to the appropriate state, then jump at the start of the ROM at 0x8000
((void (*)(void))(0x8000))();
You can increase your luck by turning off peripherals and interrupts before the jump.

2. If not so lucky - configure GPIO pins as outputs and appropriate state, then trigger watchdog reset (configure watchdog to a short interval + while(1); ), and hope that the pins keep their state for long enough for the ROM code to read the correct state.

Edit: or just use the reboot like explained below.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Arek
Senior User
Posts: 22
Joined: Thu 2016-09-01 10:58

Re: How to make programmed "Reboot #"

Post by Arek » Mon 2018-05-07 11:33

Many thanks for very interesting solution.
Unfortunately I am not so lucky.

am

Hannu
Senior User
Posts: 29
Joined: Mon 2016-05-30 11:54

Re: How to make programmed "Reboot #"

Post by Hannu » Mon 2018-05-07 15:00

How about ROM function RunLib(const char *filename, char *parameters)?

You can see the shell in ROM sources main.c at line 256. Rest of the rom functions can be found vs1010cRom.h file

Arek
Senior User
Posts: 22
Joined: Thu 2016-09-01 10:58

Re: How to make programmed "Reboot #"

Post by Arek » Mon 2018-05-07 17:03

Hi Hannu,

“You are my sunshine!”


RunLib("reboot", "4");
Simply and works immediately. Exact what I need.


Many, many thanks and best regards.
am

User avatar
Panu
VLSI Staff
Posts: 2499
Joined: Tue 2010-06-22 13:43

Re: How to make programmed "Reboot #"

Post by Panu » Wed 2018-05-09 13:46

Hi!

The ROM code has a bug in the flash writer: the last write to the flash is not committed. This is fixed in the patch but it is not run, I think, when you reboot this way. Just to let you know.. I have another solution almost ready but now if I reboot 4 , I make a "new text document" to the flash before I disconnect, just to be sure that the real write that I did actually goes to the memory for sure.

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

Arek
Senior User
Posts: 22
Joined: Thu 2016-09-01 10:58

Re: How to make programmed "Reboot #"

Post by Arek » Mon 2018-05-14 15:31

Hi Panu,

thank you.
With serial nor flash MX25L1606EM1I-12G I have no problem.

best regards
am

Post Reply