Erase All Flash Contents Except Boot Sector; Return Main Program Flash Crc; Erase Selected Flash Sector; Download To Active Flash Sector - CognitiveTPG A799 Programming Manual

A799 two-color thermal receipt printer
Hide thumbs Also See for A799:
Table of Contents

Advertisement

118
Chapter 4: Programming Commands

Erase all flash contents except boot sector

ASCII
GS SO
Hexadecimal
1D 0E
Decimal
29 14
Causes the entire flash memory to be erased.
The printer returns ACK if the command is successful; NAK if it is unsuccessful.
Exceptions
Available only in download mode.

Return main program flash CRC

ASCII
GS SI
Hexadecimal
1D 0F
Decimal
29 15
Returns the CRC calculated over the flash firmware code space.
The format of the response is ACK <low byte> <high byte>.

Erase selected flash sector

ASCII
GS DLE n
Hexadecimal
1D 10 n
Decimal
29 16 n
Value and range of n:
0–7 =
0–15 = 1M bytes flash
0–31 = 2M bytes flash
Erases the previously selected sector. The printer transmits ACK when the sector has been erased. If the previous sector is
not successfully erased, or if no sector was selected, the printer transmits NAK.
Exceptions
Available only in download mode.

Download to active flash sector

ASCII
GS DC1 aL aH cL cH d1... dn
Hexadecimal
1D 11 aL aH cL cH d1... dn
Decimal
29 17 aL aH cL cH d1... dn
Value of aL:
low byte of the address
Value of aH:
high byte of the address
Value of cL:
low byte of the count
Value of cH:
high byte of the count
Value of d:
data bytes, 0–255
Value of n (for number of data bytes)
((cH * 256) + cL)
Range:
Addresses run from 0 to 64K.
Contains a start address (aH x 256 + aL) and count (cH x 256 + cL) of binary bytes to load into the selected sector,
followed by that many bytes. The start address is relative to the start of the sector. Addresses run from 0 to 64K.
The count must always be 256.
The printer may return one of several responses. ACK means that the data was written correctly and the host should
transmit the next block. NAK means that, for some reason, the data was not written correctly. This could mean that
512k bytes flash
Range of address (aL aH)
0000–FFFF (hexadecimal)
A799-PG00001D
Range of count (cL cH)
0001–FFFF (hexadecimal)
Revision D 12/09

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colorpos a799

Table of Contents