Command Reset
 
Description Clear the contents of the RunTime Counter, Delete List, Library Files or do a System reset.

System - Reset the System so that it re-boots as at power ON.
Note: When a RESET(SYSTEM); or hardware reset occurs, the boot software in the module looks to see if a valid start up file type TUxxxA.mnu is present on the SD card, if not, it looks in the internal NAND flash memory. If no TUxxx.mnu file is found, the module initializes the interface RS2 in command mode as 115200,8,1,N and AS1 as 500000,8,N,1,H.

Runtime - Clears the runtime counter.

EEPROM - Clears the EEPROM and reload defined variables.

DELETED - Clears the deleted entity list.

NAND - Clears the NAND flash memory, also clears both MNU and LIB areas of NAND.

NANDMNU - Clears just the MNU files in NAND flash.

NANDLIB -Clears the BMP, FNT, WAV files in NAND flash (LIB area of NAND).

LIBRARY - Clears the library. Allows new program to load. Interface setup unchanged.

SDHC - Reinitialises SD card handler (useful after SD card removal/reinsertion).

FACTORY -Erases all user data from NAND and the whole EEPROM.
Default values for touch screen are then used. Touch panel calibration will need to be run.

START - Restarts system without hardware reset and keeping USB/RS232 alive.
A TUxxxA.MNU file will expected on the SD Card or in NAND.
Note that RESET( LIBRARY ) does the same but doesn't look for a TUxxxA.
MNU file as the module expects commands to be sent serially to it in this case.

USB - Added RESET(USB) which causes USB interface to disconnect, reinitialise and reconnect.
Setting rxi=n and txi=n now disconnects USB interface, then interface is reinitialised when either rxi or txi is enabled.

Interrupt - Clears the receive buffer for the interface. RS2RXC, RS4RXC,I2CRXC...
eg RESET(SPIRXC);


RESET(LIBRARY) and RESET(START); Improvements - v49.46
* This function was intended for use as a command from iDevTFT. However, some customers wish to use the functionality from within
their own project code. Therefore, functionality has been modified to process the reset only once the parser has returned to the top
level of the scheduler.
 
Syntax/Parameters RESET(Name);

Name of item to Reset
 
Example RESET(SYSTEM);
RESET(RUNTIME);
RESET(EEPROM);
RESET(DELETED);
RESET(NAND);
RESET(NANDMNU);
RESET(NANDLIB);
RESET(LIBRARY);
RESET(SDHC);
RESET(FACTORY);
RESET(START);
RESET(USB);
 
Update Information

 Version

 Title

Date  

 Details

00.13.00

 RESET(NAND) command for EMMC

02 Oct 15 

Show

Added

49.54

 RESET(FACTORY) Doesn't Erase Whole EEPROM

05 Mar 14 

Show

It was found that the command RESET(EEPROM) was not reliably erasing the whole of the EEPROM. This has now been fixed by adding a retry mechanism.

49.46

 RESET(LIBRARY) and RESET(START); Improvements

24 Oct 13 

Show

* This function was intended for use as a command from iDevTFT. However, some customers wish to use the functionality from within their own project code. Therefore, functionality has been modified to process the reset only once the parser has returned to the top level of the scheduler.

49.44

 Problem with reset affecting modules with battery fitted

10 Oct 13 

Show

A problem can occur that results in the module being unable to power up correctly. This is related to the RTC and only affects modules with a battery (or external VBATT supply).

If a battery is attached and power down occurs when a Real Time Clock interrupt is pending, the outstanding interrupt is retained in battery backed RAM.
When re-powering the module, the pending RTC interrupt is triggered before initialisation of the RTC registers causing a lock up.

The solution was to add code to clear any pending RTC interrupts during initialisation.

Fixed in
boot.bin V00.24
nandboot.bin V00.30

49.43

 RESET(LIBRARY) / RESET(START)

12 Sep 13 

Show

* EEPROM entities are now automatically reloaded following RESET( LIBRARY ); and RESET( START );

49.37

 EEPROM reset and text data

10 Jun 13 

Show

* Fixed storage of variables following RESET(EEPROM);
* Fixed zeroing of variable text data.

49.22

 EEPROM - Fixed problem causing the RESET(EEPROM); command to generate an error.

17 Oct 12 

Show

* Fixed problem causing the RESET(EEPROM); command to generate an error.
* Added check to detect if EEPROM is fitted. Factory default settings are used if not present

49.18

 RESET(NAND) - Fix to correctly erase NAND flash.

22 Sep 12 

Show

* Fix to correctly erase NAND flash.

49.18

 USB - Added RESET(USB) which causes USB interface to disconnect, reinitialise and reconnect.

22 Sep 12 

Show

Added RESET(USB) which causes USB interface to disconnect, reinitialise and reconnect.
* Setting rxi=n and txi=n now disconnects USB interface, then interface is reinitialised when either rxi or txi is enabled.

49.14

 RESET( START ); - Added command to restart system without hardware reset and keeping USB/RS232 alive.

27 Jul 12 

Show

Added command to restart system without hardware reset and keeping USB/RS232 alive. A TUxxxA.MNU file will expected on the SD Card or in NAND.
* Note that RESET( LIBRARY ) does the same but doesn't look for a TUxxxA.MNU file as the module expects commands to be sent serially to it in this case.

49.00

 NAND

22 Mar 12 

Show

LOAD( NAND, "file" ); loads "file" into MNU area of NAND if it is a mnu file else into LIB area of NAND for other files
LOAD( NANDLIB, "file" ); loads the "file" into LIB area of NAND
LOAD( NANDMNU, "file" ); loads the "file" into MNU area of NAND
RESET( NAND ); clears both MNU and LIB areas of NAND
RESET( NANDLIB ); clears just the LIB area of NAND
RESET( NANDMNU ); clears just the MNU area of NAND
LIB(imgnam1,"NAND/filename.bmp...."); Only use the name NAND to read files
Note, when reading a file from NAND, both areas of NAND are looked at automatically.
Care should be taken not to put the same named file into both areas. The LIB area is read first.

Fixed bug which in many circumstances results in being unable to find the file in the directory, and writing 4kbyte of directory entries to a random sequence of sectors on the card.
Fixed bug when reading files from NAND - file stack required is multiple of 2KB page size.

48.24

 SD Card Handler - Directory support added.

10 Mar 12 

Show

Directory support added. Files can be read from subdirectories on the SD Card. The 8.3 file system must be observed. A depth of FOUR subdirectories is supported.
> LIB( libImg, "SDHC/dir1/dir2/dir3/dir4/file.ext" );
> CALC( txtVar, "SDHC/dir1/dir2/dir3/dir4/", "DIR" );
Write to / Append file on SD card added (if file does not exist, it is created)
> LOAD( "SDHC/file.ext", var, var, ... );
> LOAD( "SDHC/dir1/dir2/dir3/dir4/file.ext", var, var, ... );
> Limitations:
Filename has to be specified in quotes, variable for filename not currently supported.
Files are written is 'SR' encoding, ie raw ASCII.
Added RESET(SDHC); which reinitialises SD card handler (useful after SD card removal/reinsertion).
Improvements made. 33% clock speed increase. Code simplified.

48.24

 Factory Reset

10 Mar 12 

Show

Added RESET(FACTORY); which erases all user data from NAND and the whole EEPROM. Default values for touch screen are then used. Touch panel calibration will need to be run.

47.12

 Reset(library) - Progress bar operation corrected when run from SDcard.

09 Sep 11 

Show

Progress bar operation corrected when run from SDcard.
* Fixed protection of memory used by system built in entities.

47.04

 Restriction of Reset Library

26 Jul 11 

Show

When a RESET(LIBRARY) command is issued, all user entities are deleted back to the last serial port SETUP(). This is so that communications is not lost with the module. If entities have been defined before the setting up of a serial port, then these will not be erased! Therefore it is suggested, that during development, the serial ports are configured first in your mnu file.

42.00

 Reset(library) - Added. Clears all entities from memory (apart from built in entities).

09 Mar 11 

Show

Added. Clears all entities from memory (apart from built in entities).
Users uploading their program via RS232/RS485/AS1 can then restart without system reset

42.00

 Reset Handler - User reset input on CN3 improved to stop occasional lock-up after reset.

09 Mar 11 

Show

User reset input on CN3 improved to stop occasional lock-up after reset.

34.00

 EEPROM Storage - The user software can store values (text and numbers) in EEPROM.

19 Oct 10 

Show

The user software can store values (text and numbers) in EEPROM
About 1500 bytes are available. This would hold about 50 variable names and their values.
Example command VAR(MyEENum, 123, U8E); stores 123 in MyEENum the first time as a default. When you use LOAD(MyEENum, 244); the value is updated in RAM and in EEPROM. When power is removed and reapplied, VAR(MyEENum, 123, U8E); will not load 123 but the previously saved value.
To clean up the EEPROM during development, use RESET(EEPROM); which cleans the EEPROM and loads back only the currently defined variables.

STYLE( EEstyle, data) { type=U8; location=eeprom; } if location is specified as eeprom, data is stored otherwise just RAM is used and data lost at power off.

Built in data types have been created to simplify EEPROM storage: U8E, S8E, U16E, S16E, U32E, S32E, PTRE, FLT1E, FLT2E, FLT3E, FLT4E, TXTE

The ‘aircon.mnu’ now uses two U8E variables for the minimum and maximum temperatures. Error messages will be generated if a variable stored in EEPROM is redefined in SDRAM or a different VAR type is specified.