2 auxiliary upload/download commands, 1 the lp[n] command, 2 the cp command – ElmoMC SimplIQ Software Manual User Manual

Page 84: 3 the cc command, Auxiliary upload/download commands -22

Advertising
background image

SimplIQ

Software Manual

Program Development and Execution

MAN-SIMSW (Ver. 1.4)

6-22

6.5.2

Auxiliary Upload/Download Commands

6.5.2.1 The LP[N] Command

This command sets the properties of the serial flash data upload and download; it is used
together with the DL and LS commands (

sections

6.5.3.1

and

6.5.4.1

).

ƒ

LP[1] defines the byte (out of 128K bytes in the flash) at which the next action should
start.

ƒ

LP[2] defines how many byte to send (LS command).

ƒ

LP[3] specifies the start address (bytes) of the user/factory program partition in the
flash.

ƒ

LP[4] specifies the size (bytes) of the user/factory program partition in the flash.

The TW[11] parameter indicates the type of program partition: user or factory.

6.5.2.2 The CP Command

This command clears the entire user area in the serial flash. The clearing operation may take
a significant amount of time. CP sets the Program Valid flag to -1.

Failures in executing the CP command may occur if:
ƒ

The motor is on.

ƒ

A program is running.

6.5.2.3 The CC Command

The CC=xxxx command performs the following:
ƒ

Reads the actual length of the user partition from the flash memory table of contents
(TOC).

ƒ

Calculates a 32-bit checksum for the entire user partition. The checksum is calculated by
totaling all the consecutive 2-byte sequences (short integer numbers) that occupy user
program space, along with the checksum number itself. The total result must be zero to
pass.

ƒ

If the resulting checksum matches xxxx, sets the Program Ready flag (CC returns 1) and
copies functions and variable symbol tables from the user partition to the internal DSP
flash memory. If the checksum does not match xxxx, an error code is issued (CC returns
0).

Failures in executing the CC command may occur if:
ƒ

The actual length of the TOC is less than two flash pages, or if it exceeds the user
program address limit.

ƒ

The calculated checksum does not match xxxx.

Advertising