
General purpose flash memory
XLR PRO Radio Frequency (RF) Modem User Guide
68
Example:
To erase flash block 42 of a target radio with serial number of 0x0013a200407402ac an ERASE packet should be
formatted as follows (spaces added to delineate fields):
7E 001C 11 01 0013A200407402AC FFFE E6 E6 0023 C105 00 C0 01 00 002A 0000 0200 37
Assuming all transmissions were successful, the following API packets would be output the source node's serial
interface:
7E 0007 8B 01 FFFE 00 00 00 76
7E 001A 91 0013A200407402AC FFFE E6 E6 0023 C105 C1 81 00 002A 0000 0000 39
•
WRITE (0x02) and ERASE_THEN_WRITE (0x03):
The WRITE command writes the specified bytes to the specified
GPM location. Before writing bytes to a GPM block, make sure all the bytes have first been erased. The
ERASE_THEN_WRITE command performs an ERASE of the entire GPM block specified with the GPM_BLOCK_NUM
field prior to doing a WRITE.
•
WRITE _RESPONSE (0x82) and ERASE_THEN_WRITE_RESPONSE(0x83):
When a WRITE or ERASE_THEN_WRITE
command request has been unicast to a node, that node will send a response in the following format to the source
endpoint specified in the requesting frame.
GPM_NUM_BYTES
Number of bytes in the GPM_DATA field. For this command, set to 0.
GPM_DATA
No data bytes should be specified for this command.
Field name
Command-specific description
GPM_CMD_ID
Set to WRITE (0x02) or ERASE_THEN_WRITE (0x03).
GPM_OPTIONS
At present, there are no defined options for this command. Set this field to 0.
GPM_BLOCK_NUM
Set to the index of the GPM block to be written.
GPM_START_INDEX
Set to the byte index within the GPM block where the data should be written.
GPM_NUM_BYTES
Set to the number of bytes specified in the GPM_DATA field. Only one GPM block can be
operated on per command. For this reason, the GPM_START_INDEX plus the
GPM_NUM_BYTES cannot be greater than the GPM block size.
Note
The number of bytes sent in an explicit API frame (including the GPM command
fields) cannot exceed the maximum payload size of the radio. Use the ATNP
command to query the maximum payload size.
GPM_DATA
Data to be written.
Field name
Command-specific description
GPM_CMD_ID
Set to WRITE_RESPONSE (0x82) or ERASE_THEN_WRITE_RESPONSE (0x83).
GPM_STATUS
A one (1) in the least-significant bit indicates an error occurred. All other bits are reserved.
GPM_BLOCK_NUM
Matches the parameter passed in the request frame.
GPM_START_INDEX
Matches the parameter passed in the request frame.
GPM_NUM_BYTES
Number of bytes in the GPM_DATA field. For this command, set to 0.
GPM_DATA
No data bytes should be specified for these commands.
Field name
Command-specific description