http://www.wavecom.com/forum Open AT ® Release version: 4.10 |
This sample depends on the following libraries :
This application uses the Drivers library to access external storage chips.
As this application uses the MultiApp library, the following start/stop command has to be used to control the application execution.
AT+EXTSTART (External Storage start/stop command)
Command | Answers |
AT+EXTSTART? | +EXTSTART:
<state>
OK |
AT+EXTSTART=? | +EXTSTART:
(0-1)
OK |
AT+EXTSTART= <state> | +CME ERROR: 3 or OK |
Parameter | Values range | Description | Default value |
state | 0-1 | The current application running state. This parameter is stored in non-volatile memory. | 0 |
The init entry point sent to the MultiApp library is the es_init() function. The start/stop entry points linked to the +EXTSTART command are the es_start() and es_stop() functions.
The application uses the Drivers library to store and read bytes in/from an external storage chip. It provides two AT commands, for each write and read process, and another one to select the current chip.
AT+CHIP (External storage chip selection command)
Command | Answers |
AT+CHIP=? | +CHIP:
(0-2)
OK |
AT+CHIP? | +CHIP:
<chip>
OK |
AT+CHIP= <chip> | OK |
Parameter | Values range | Description | Default value |
chip | 0-2 | Used chip ID (stored in a flash object) 0: M95640 SPI E2P chip, connected on SPI2 bus 1: M24C64 I2C E2P chip, connected on I2C bus 2: NAND flash chip, connected on Parallel bus | 0 |
AT+WRITE (External storage chip write command)
Command | Answers |
AT+WRITE=? | +WRITE:
(0-1FFF or 7FFFFF)
,
(1-64 or 128)
OK |
AT+WRITE= <address> , <data> | OK |
Parameter | Values range | Description | Default value |
address | 0-1FFF or 7FFFFF | Data start address of the bytes(or words for the NAND) to store, in hexadecimal format | mandatory |
data | 1-64 or 128 | Bytes (or Word) to write in hexadecimal format 1-64 (or 128) is the maximum of bytes (or Word for the NAND) to write | mandatory |
For the NAND flash, the maximum number of consecutive partial page program operations allowed in the same page is three. To avoid this protection, a Block Erase command is issued before any page program by the command +WRITE
AT+READ (External storage chip read command)
Command | Answers |
AT+READ=? | +READ:
(0-1FFF or 7FFFFF)
,
(1-127)
OK |
AT+READ= <address> ,[ <length> ] | +READ: <address>,<data> OK |
Parameter | Values range | Description | Default value |
address | 0-1FFF or 7FFFFF | Data start address of the bytes to read, in hexadecimal format | mandatory |
length | 1-127 | Maximum of bytes (or Word for the NAND) to read | 1 |
data | NA | Read bytes (or Word for the NAND), in hexadecimal format | NA |
Updated: Tue Sep 19 17:08:22 CEST 2006;