beautypg.com

2 configuration file upload from host, Configuration file upload from host – PNI SENtral User Manual

Page 20

background image

PNI Sensor Corporation

Doc #1018049 R03

SENtral Technical Data Sheet

Page 19

5.1.2

Configuration File Upload from Host

If an EEPROM is not used for storing the Configuration File, then SENtral will enter

Unprogrammed State after failing to identify an EEPROM. The host now should upload

the Configuration File from host memory. The registers involved are given below:

Table 5-2: Configuration File Host Upload Registers

Register Name

Address

Register Value

HostControl

0x34

[0] 1 = RunEnable

[1] 1 = HostUpload Enable

UploadAddr

0x94 to 0x95

Initial RAM address (0x0000)

UploadData

0x96

Data to be uploaded

CRCHost

0x97 to 0x9A

CRC32 of the uploaded data since

host upload was enabled

ResetReq

0x9B

[0] 1 = Reset SENtral

To upload the Configuration File from the host, perform the following transactions:

Write value 0x01 to the ResetReq register. This results in a hard reset of SENtral.

This is unnecessary if SENtral has just been powered up or Reset.

Verify the Configuration File image, as given in Appendix I – Configuration File

Image Format. Specifically:
o Ensure the Magic Numbers are correct.
o Ensure the Uploaded Image Length matches the Uploaded Firmware Image Size.
o Ensure the Upload Image Length is a multiple of 4 bytes.

Write 0x02 to the HostControl register. This sets the UploadEnable bit, which

enables uploading of the Configuration File.

Write the initial RAM address, 0x0000, into the UploadAddr register. This normally

is an unnecessary operation, since the default after powering up or sending a

ResetReq is 0x0000.

Upload the Configuration File to SENtral’s program RAM. This represents the range

from 0x10 to 0x10+UIL-1 in the Configuration File image, as discussed in Appendix

I – Configuration File Image Format. The file is sent one byte at a time, using the

UploadData register. Data can be burst uploaded. Each group of 4 bytes should be

sent in byte-reverse order (i.e. little Endian format). Table 5-3 provides an example.