NAND Flash |
|
The 128Mbyte NAND Flash memory is organised
into 3 drives.
A protected drive containing boot and operating files ~ 4Mbyte, a user accessible menu file drive and an image / font file drive with
variable partition to allow large image and fonts to occupy the maximum
space of 124Mbyte
The user area of the NAND flash can be cleared using the RESET(NAND)
command.
Data can be written to the NAND flash from an SD card or via the serial
interfaces using the FPROG and LOAD commands
Only file names of mnu, fnt and image files can be sent to a serial port to
protect user IPR. Encryption will be available.
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.
|
|
NAND BOOT AREA |
|
|
NAND .MNU
variable partition
USER AREA |
|
|
NAND FONTS & IMAGES |
|
Write files to NAND
Files can also be transferred from SDHC or serial port to NAND flash
LOAD(NAND,"SDHC/TU480A.mnu"); //use in conjunction with FPROG
LOAD(NAND,"EXT/filename.ext?size=xxx&timedate=yyy&usechecksum=0&useack=1");<CR>zzzzzzzzzzzzzzz
Reads xxx bytes of zzzzzz data from the current serial port and saves the
data to the specified file in NAND, setting the file date to yyy
yyy is the file date/time string "YYYY:MM:DD:hh:mm:ss" as used by the RTC.
If usechecksum = 1 the file data must be followed by a 16 bit checksum of
the file data (2 bytes, MSB first). The file is only written to NAND if the
sent checksum matches the received data checksum.
If useack = 1 a single byte is returned after the file is written to
indicate success / failure. 06h (ACK) is returned on success, 15h (NAK) is
returned on failure.
Important, the data must follow immediately after the carriage return
<CR> (0Dh). Unlike other commands, the optional line feed (0Ah) must not be
sent as this will be interpreted as the first byte of data.
The command that is used to write any file
to NAND flash via an interface is
LOAD(NAND, "EXT/filename.ext?size=x&usechecksum=x&useack=x");<cr><file
data>
Description of parameters :-
‘size’ is the file length in bytes.
‘usechecksum’ must be either 1 or 0. If set to 1 then a two byte,
16 bit sum (msb first) of the file data must be sent after the file data.
‘useack’ must be either 1 or 0. If set to 1 then the standard ASCII
ACK or NACK code is sent back to the host to indicate success or
failure of the NAND write.
The file data is sent as raw data and is buffered in RAM and once
the correct number of bytes has been received the file is written to NAND.
When sending more than one file it is best to set ‘useack’ to 1.
The host then waits for ACK before sending the next file.
Example to write a file called 'test.txt' containing the string
'ABC' to NAND :-
LOAD(NAND, "EXT/test.txt?size=3&usechecksum=0&useack=0");<0Dh><41h><42h><43h>
Firmware Updating - v49.00
Support has been added to update the module firmware via a serial port /
USB.
> LOAD( NAND, "EXT/xxxxxxxx.tft?size=xxxx&usechecksum=xx" );
> LOAD( NAND, "EXT/nandboot.bin?size=xxxx&usechecksum=xx" );
> LOAD( NAND, "EXT/iuloader.bin?size=xxxx&usechecksum=xx" );
Note: The checksum parameter should be used to help detect problems with
data corruption.
Note: It is important that power is not removed during the updates. |
|
|
|
|
Update Information |
Version |
Title |
Date |
Details |
49.48 |
''tuXXXa.mnu'' Module Independent Start File |
29 Nov 13 |
|
* Allows the use of a module startup file which is not dependent on the module in use. This allows for a common startup file to be used on all size displays. * For example, for a 480x272 module Looks for "tu480a.mnu" file on SD card (if fitted) and processes if found else Looks for "tuXXXa.mnu" file on SD card (if fitted) and processes if found else Looks for "tu480a.mnu" file in NAND and processes if found else Looks for "tuXXXa.mnu" file in NAND and processes if found else Run Default Startup
|
|
49.47 |
NAND FPROG Area Memory Limitation Problem |
08 Nov 13 |
|
* Fixed problem where the check for free blocks was incorrect and effectively limiting the FPROG area to 50% of it's true maximum available size.
|
|
49.47 |
Storage of cal figures, screen rotate, and start up text in file: tu480a.cfg |
01 Nov 13 |
|
* To use the NAND config file for settings, add useCfg=y; to system setup,
SETUP(SYSTEM) { useCfg=y; }
* File is named tuXXXa.cfg, where XXX is module size 320, 480, 640, 800. The file is stored in NAND in the "LIB" area. * Typical Config File contents (note parameter values are all numeric within the file):
usecfg=1; // Use config file: 0=no, 1=yes sbled=100; // Start-up back light level: 0 to 100 wdog=-1; // Watchdog: -1 unset, 0 off, 1-16000 time ms rotate=0; // Screen rotate: 0, 90, 180, 270 startup=3; // Start-up: 0=none, 1=text, 2=bar, 3=text+bar tch_loc_tlx=19; // Touch - TL x location tch_loc_tly=19; // Touch - TL y location tch_loc_trx=459; // Touch - TR x location tch_loc_try=19; // Touch - TR y location tch_loc_brx=459; // Touch - BR x location tch_loc_bry=251; // Touch - BR y location tch_loc_blx=19; // Touch - BL x location tch_loc_bly=251; // Touch - BL y location tch_val_tlx=87; // Touch - TL x value tch_val_tly=912; // Touch - TL y value tch_val_trx=928; // Touch - TR x value tch_val_try=905; // Touch - TR y value tch_val_brx=912; // Touch - BR x value tch_val_bry=131; // Touch - BR y value tch_val_blx=84; // Touch - BL x value tch_val_bly=132; // Touch - BL y value
* Changes made by SETUP(SYSTEM){} and LOAD(SYSTEM.param,val); will modify the file. * Following touch screen calibration, the calibration parameters will be stored to the config file. * The new file is compared with the file stored in NAND and only overwritten if different to save NAND write cycles. * When a RESET(NAND); or RESET(NANDLIB); is issued, the config file is preserved by reading file into memory, erasing NAND, writing the config file back to NAND. * A RESET(FACTORY); will erase the config file. * Parameters are read from EEPROM initially and then overwritten by parameters from the config file. * If an EEPROM is not fitted, then useCfg will default to y.
|
|
49.39 |
Updating Firmware - ''NAND Error - need physical block'' Error |
13 Jun 13 |
|
When boot code is updated via a serial link (RS2, USB, AS1 etc), the error "NAND Error - need physical block" is reported.
It was found that the boot block range check was invalid when searching for "good" blocks. Fix available in V00.49.39
|
|
49.37 |
Load NAND from Buffer/File with Filename in Text Variable |
10 Jun 13 |
|
* Added LOAD(NAND,varFileName); and LOAD(NAND,varFileName,buf); so that path can be stored in a variable rather than immediate string.
|
|
49.37 |
Firmware Storage - Sequential Bad Block Problem - New Boot Files Created |
10 Jun 13 |
|
* NAND fix to handle sequential bad blocks in saving of *.tft, nandboot.bin and iuloader.bin files. (Chances of two bad blocks is less than 1 in 10000) * Updates applied to > tu04937.tft > newflash.bin V00.29 > iuloader.bin V00.40
|
|
49.32 |
Files - Tests added to check filename length when reading/writing to NAND. |
14 Feb 13 |
|
* Tests added to check filename length when reading/writing to NAND. Note maximum length is 15 characters. * Fixed problem with filename corruption in FILE("OPEN"...) and FILE("MKDIR"...). Filename was corrupted during a FILE("WRITE"...)
|
|
49.25 |
Saving file from buffer/NAND |
01 Nov 12 |
|
* LOAD(NAND,"VAR/file.ext?size=xxxx",varBuf); added where the file contents are stored in a text variable. * If the file has the .ppf extension then it is processed and the containing files stored. * Load source of NAND/NANDMNU/NANDLIB now supported LOAD(SDHC,"NAND/file.ext"); etc
|
|
49.25 |
NAND - Fixed problem with files ''disappearing'' or becoming corrupted. |
01 Nov 12 |
|
NAND * Fixed problem with files "disappearing" or becoming corrupted when user puts more than about 70 files into either the FPROG area or USER area of NAND and then deletes files from that area. * Added code to improve erasure of data blocks of deleted files. * Corrected a test in the location of a new block.
|
|
49.18 |
LOAD from NAND - Added LOAD( NAND, ''NAND/file.ppf'' ); which allows a Packed Project File to be loaded and files extracted. |
22 Sep 12 |
|
Added support for LOAD( NAND, "NAND/file.ppf" ); which allows a Packed Project File to be loaded and files extracted. * This also allows for LOAD( SDHC, "NAND/file.ext" ); which copies file from NAND to SDHC, though FILE( "COPY"... ) should be used in preference.
|
|
49.18 |
Boot Files - Fix to support FAT16 SD cards with more than 255 entries in root directory. |
22 Sep 12 |
|
Fix to support FAT16 SD cards with more than 255 entries in root directory (maximum is 512 under FAT16). * Fix to prevent erasure of images, fonts etc from NAND during updates. * Fix to support file sizes of exact multiples of 4KB. * Fix for clearing screen * New boot files: boot.bin V00.20 newflash.bin V00.26 nandboot.bin V00.25 iuloader.bin V00.36
|
|
49.18 |
LOAD from serial port - Files can now be loaded from serial ports using LOAD( NAND, ''RS2/file.ext?size=1234'' );. |
22 Sep 12 |
|
Files can now be loaded from serial ports using LOAD( NAND, "RS2/file.ext?size=1234" ); This allows file data to be read when not operating from command mode, ie can use RUN( "LOAD( NAND, \\22RS2/file.ext?size=1234\\22 );" ); then receive data on RS232 port.
|
|
49.18 |
RESET(NAND) - Fix to correctly erase NAND flash. |
22 Sep 12 |
|
* Fix to correctly erase NAND flash.
|
|
49.08 |
Packed Project File (PPF) - PPF file can now be loaded via serial port, eg LOAD( NAND, ''EXT/file.ppf?size=xxxx'' );. |
11 Jul 12 |
|
PPF file can now be loaded via serial port, eg LOAD( NAND, "EXT/file.ppf?size=xxxx" );
|
|
49.04 |
NAND writing and memory/watchdog problems - Program stack increased from 48K to 128K. |
15 Jun 12 |
|
Program stack increased from 48K to 128K to handle nested functions (eg nesting of include files)
|
|
49.04 |
NAND - Fixed problem with directory entry page calculation which could cause lock-up. |
15 Jun 12 |
|
Fixed problem with directory entry page calculation which could cause lock-up.
|
|
49.03 |
NAND / NANDLIB / NANDMNU - All three sources/destination now globally accepted in LOAD/CALC etc commands. |
01 Jun 12 |
|
All three sources/destination now globally accepted in LOAD/CALC etc commands (previously just NAND accepted).
|
|
49.00 |
NAND |
22 Mar 12 |
|
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 |
NAND Flash |
10 Mar 12 |
|
Fixed a bug in deleting files from the USER area of NAND, and recovers from failure of a 128kbyte block when writing modified block tables or directories. Fixed problem with "FEXISTS" and "DIR" from NAND Fix for re-saving menu files to NAND.
Can now handle files of more than 1 block (128 kbyte) successfully, and directories which span more than one page (64 file entries), and executes RESET(NAND); repeatedly without losing any capacity.
Debug error messages improved for LOAD(NAND,"SDHC/....); commands
Fixes a bug which fails to recover all data blocks when RESET(NAND); is executed. Fixes a potential bug when the FPROG or USER NAND directory gets large enough to exceed one 2048-byte page.
|
|
47.12 |
NAND directory listing |
09 Sep 11 |
|
Text variable can be populated with filenames in NAND: CALC( dstTxtVar, src, filter, sep, "DIR" ); CALC( dstTxtVar, src, filter, "DIR" ); CALC( dstTxtVar, src, "DIR" ); > dstTxtVar is a text variable and will contain number of files in list followed by specified separator between each filename. > src is "nand" (in quotes) > sep is separator character for filenames in string (must be in quotes), if not included then "," assumed > filter is types of files to list, supported filters: "*.*", "*", "*.bmp", "*.jpg", "*.png" (or "img" to get all image files) "*.wav", "*.mp3", "*.wma" (or "snd" to get all sound files) "*.fnt", "*.txt", "*.mnu", If not specified then "*" assumed. Multiple filters can be included, separated by commas: "*.bmp,*.jpg,*.fnt"
> examples: (nand contains 1.bmp, 2.bmp, x.mnu) CALC( txtVar, "nand", "*.bmp", ",", "DIR" ); // list all bitmap image files > txtVar = "2,1.bmp,2.bmp"; CALC( txtVar, "nand", "*.fnt", "DIR" ); // list all font files > txtVar = "0"; CALC( txtVar, "nand", "*.mnu", "DIR" ); // list all menu files > txtVar = "1,x.mnu"; CALC( txtVar, "nand", "DIR" ); // list all files CALC( txtVar, "nand", "*", "DIR" ); // same CALC( txtVar, "nand", "*", ",", "DIR" ); // same > txtVar = "3,x.mnu,1.bmp,2.bmp";
|
|
47.12 |
File exists check - CALC(dstVar, src, ''FEXISTS''); checks for existence of file in NAND or on SDHC card. |
09 Sep 11 |
|
CALC(dstVar, src, "FEXISTS"); // checks for existence of file in NAND or on SDHC card > eg CALC(U8var,"SDHC/file1.bmp","FEXISTS"); returns 1 if present else 0
|
|
47.04 |
NAND |
26 Jul 11 |
|
Erase fixed so that new files written correctly to NAND. Three types of erase are now supported RESET(NANDMNU); // Deletes all user menu files from NAND RESET(NANDLIB); // Deletes all user images, fonts etc (not menu files) from NAND RESET(NAND); // Deletes all user files from NAND
|
|
44.00 |
NAND and SDHC - Module can now run entirely from NAND. |
20 May 11 |
|
Latest functionality added. Module can now run entirely from NAND. · LOAD(NAND,"SDHC/filename.ext"); to copy files to NAND; · LIB(name,"NAND/filename.ext"); and INC("NAND/filename.ext"); to use from NAND. RESET(NAND); added. SD Card is no longer required to be present at boot.
|
|
44.00 |
NAND and Serial Port |
20 May 11 |
|
Files can now be downloaded via a serial port LOAD(NAND,"EXT/filename.ext?size=xxxx&timedate=yyyyyyyy");-------- -------------data---------
Reads xxxx bytes from the current command port and copies the specified file to NAND setting the file date to yyyyyyyy Added checksum option to serial upload to NAND. LOAD(NAND,"EXT/filename.ext?size=xxxx&timedate=yyyyyyyy&usechecksum=1");--------data--------checksum If enabled then a 16 bit checksum (msb first) is expected at the end of the received file. The size parameter remains the actual length of the file. · If checksum does not match the received checksum the file is not written to NAND. · If the checksum parameter is omitted or the value is 0 then only the file data is sent and no checks are performed
|
|
|
|