Elmo HARmonica Network Hardware User Manual


 
HARSFEN0602
6.3.1 Binary data
The Flash is interfaced with binary data. Sending binary data on the RS232 lines is a problem, since they
complex the differentiation between data and delimiters.
The characters that are problematic to send on the RS232 lines are:
- All the high numbers, 128 to 255.
- All possible terminators: 0, <CR>, <LF>, ‘;’, ’,’
- Equating sign ‘=’
- Backspace
- Escape: <ESC>
In order to prevent this problem we use hex binary format during up/down load of data, even so it increases
amount of data to be transmitted.
Every byte in the hexadecimal form consists of two numbers (e.g. 0x12). The hex binary format consider
every of these two numbers as a character, e.g. the 8-bit number 0x12 in the hex binary format is the
sequence of two characters ‘1’,’2’.
Representation of numbers in the DSP Flash is different from its representation inside a personal computer.
A 8-bit number is represented in the same way as inside a personal computer.
Consider a 16-bit number. For example, the hexadecimal 16-bit number is equal to 0x1234. It is represented
in the DSP memory in the following two bytes:
Order number of the bytes Value of the byte in the hexadecimal form
1 0x12
2 0x34
Now consider 32-bit number. For example, the hexadecimal 32-bit number is equal to 0x12345678. It is
represented in the DSP memory in the following four bytes:
Order number of the bytes Value of the byte in the hexadecimal form
1 0x56
2 0x78
3 0x12
4 0x34
Binary data to be loaded to the serial flash is represented in the described above format.
Examples:
Number in the hexadecimal form
inside a personal computer
Sequence of characters in the hex binary form to be
transmitted
0x12 12
0x1234 1234
0x12345678 56781234
6.3.2 The Assisting Commands For Down/Upload
6.3.2.1 The LP[N] command
LP[1] defines the byte in which the next action is to start (out of 128k bytes of the flash)
LP[2] defines how many bytes to send (LS command).
The LP command is used together with the LS and the DL commands. Please refer the DL and the LS
explanations below.
In addition,
LP[3] specifies the start address (bytes) of the user program partition in the flash.
LP[4] specifies the size (bytes) of the user program partition in the flash