Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






Short Command Format

Bytes 0 – 3 32-bit address to start peeking data
Byte 4 Number of bytes to read. A value of 0 indicates that 256 bytes should be read.

Long Command Format

Bytes 0 – 3 32-bit address to start peeking data
Byte 4 - 5 Number of bytes to read.

Reply Format

Bytes 0 – 3 32-bit address of the start of data
Bytes 4 – N One or more bytes read from the target memory

POKE (0x03)

The POKE command is used to write the device memory. The supervisor processor will not permit a POKE into flash memory when any Application Module is running. Each 512 byte block of supervisor processor flash memory has a lifetime of only 20,000 write cycles. One cycle is consumed for each POKE command that accesses a particular block. This lifetime is more than sufficient for occasional software patches, but the user is cautioned that a looping sequence of POKE commands could easily wear out a block.

The supervisor processor has no restriction on the alignment or length of a poke. The functional processor can perform only the following pokes:

  • 1 byte length, to any address
  • 2 byte length, to any even address
  • 4N length, to any 32-bit aligned address

Command Format

Bytes 0 – 3 32-bit address to start poking data
Byte 4 – N 1 - 512 bytes to write to the target memory

Reply Format

Bytes 0 – 3 32-bit address where data write began
Bytes 4 – N 1 – 512 bytes written to the target memory

 

DIAGNOSTIC Command (0x04)

The DIAGNOSTIC command gathers error count data from the supervisor.

Command Format

Byte 0 Address of the diagnostic channel to read, as an 8-bit integer

Reply Format

Byte 0 Address of the diagnostic channel read, as an 8-bit integer
Bytes 1 - 4 Diagnostic value from the addressed channel, as a 32-bit integer

STORE Command (0x05)

The STORE command saves the supervisor processor parameter file to non-volatile memory. It will only function in idle mode.

Command Format

Byte 0 0 to reset the stored parameter file to defaults 1 to store the current parameter file

Reply Format

Byte 0 0 if stored parameter file reset to defaults 1 if current parameter file stored

 

6.11. CRC Command (0x06) [Supervisor Processor Only]

Command 0x06 is interpreted by the supervisor processor as a CRC request. The CRC command is used to calculate a checksum on an area of memory. Any of the memory spaces may be addressed, and the calculation window may be as large as desired provided that it does not contain any unimplemented memory.

The CRC uses the same 16-bit polynomial, with the same bit order, as is used for NSP messages.

The CRC command can potentially be used to request the CRC of the supervisor processor’s entire 128 kB flash memory. This can take a number of seconds, especially in bootloader mode where the system clock is much slower.



Command Format

Bytes 0 – 3 Address of the first byte to CRC as 32-bit integer
Bytes 4 – 7 Address of the last byte to CRC as 32-bit integer

Reply Format

Bytes 0 – 3 Address of the first byte in CRC as 32-bit integer
Bytes 4 – 7 Address of the last byte in CRC as 32-bit integer
Bytes 8 – 9 CRC result as 16-bit integer

6.12. FLASH Command (0x06) [Functional Processor Only]

Command 0x06 is interpreted by the functional processor as a FLASH request. The first byte of the data field is consulted to determine which subcommand is required.

Table 27: FLASH Subcommands

Subcommand Index Function
Read page buffer
Write page buffer
Erase NAND block
Write NAND page
Read NAND page
Count NAND errors
Find NAND bad blocks
CRC buffer
CRC NAND
CRC RAM
Make boot block
Make bit error
Copy NAND
NAND read disturbance test
Rewrite NAND

The NAND flash memory is divided into pages (2 kB each), and blocks (128 kB each). A 2 kB page buffer is maintained in RAM, and allows multiple NSP messages to interact with individual pages. The NAND flash is protected by Error Correcting Codes (ECC) which are generally invisible to the user. The codes can correct 1 bit error in a 512 byte section.

NAND flash can be additionally protected using the backup feature, where a block is assigned a second backup block to be used in case of failure.

Read Page Buffer

The Read Buffer subcommand reads the current contents of the page buffer. Note that this command is of no use until another command has been used to put data into the page buffer. The command is available in long and short variants.


Date: 2015-12-17; view: 669


<== previous page | next page ==>
Protocol Layer 5 (Session Layer) | Short Command Format
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.012 sec.)