background image

S

ERIAL 

I

NTERFACE 

D

EVELOPERS 

G

UIDE

 
 

When the trigger occurs the host application can begin writing the file data to the COM port.  The 
bootloader receives the incoming data stream, converts the text data, and writes the executable to the 
proper location in DSP program and data flash. 

Once the file transfer is complete execution is transferred to the embedded application that was just 
loaded. 

Lumitron v0003 Bootloader Version: 

The latest bootloader version no longer uses a ‘Xon/Xoff’ protocol.  This is due to the implementation 
of the RS-485 for specific camera configurations.  Since, for this protocol we need to simulate half 
duplex communications, the host computer will send a single (complete) Motorola S-Record at a time.  
The data will be processed by the camera and then acknowledged with a ‘+’ character in response.  
This tells the host that the camera is ready for another S-Record.  Hosts that do not implement this 
‘send record : wait for response’ will not function with this version of the bootloader. 

Lumitron v0002/v0001 Bootloader Versions: 

The upload of the embedded operational application is done using a standard “Xon/Xoff” protocol.  
Where the ‘Xon’ character is hexadecimal 0x11 and the ‘Xoff’ character is hexadecimal 0x13.  The 
bootloader uploads files in the Motorola S-Record format.  

4 Interface Protocol 

The interface protocol is the set of simple binary structures and conventions, enabling data/code 
exchange between a host PC and a target camera electronics controller board. It uses raw 8-bits, no 
parity serial transfer at the controller board configured speed (115200 kbps by default). 

The communication model is based on a master-slave basis.  The PC computer sends a message 
with a command plus any arguments, and the target responds immediately (within specified time) with 
operation status code and return data. The target never initiates the communication. Its responses are 
exactly specified and always of fixed (known) length. 

4.1 PC Master Information 

PC Master is a protocol that was developed by Motorola for the real time test, debugging, and 
operation of DSP based hardware.  It is made up of two parts: one that exists on the host and one that 
exists on the DSP controller. 

The module that exists on the DSP controller is part of the software development kit (SDK) that was 
used in the design of the embedded camera application.  Information specific to that SDK driver and 
its capabilities can be obtained from Motorola (

Embedded SDK: Targeting Motorola DSP56F80x 

Platform SDK126/D, Embedded SDK: PC Master User Manual SDK111/D

). 

PC Master exists on the camera electronics as the only serial port driver for COM port 0.  It operates in 
a polling mode and does not initiate a transmission but only responds to them.  Using fixed memory 
mapped information about the DSP controller and the embedded application; it is possible to 
read/write DSP peripheral registers (paragraph 

X

6.8

X

), Xilinx FPGA registers (paragraph 

X

0

X

), and global 

variables (paragraph 

X

6.2

X

).  Using Lumitron defined commands the capability expands to allow access 

to the real time clock, non-volatile RAM (paragraph TBD), serial data flash (paragraph 

X

6.10

X

), and 

coefficient data flash (paragraph TBD) parts via the DSP controller.  This provides the host with a 
means to control/modify/check almost any configuration parameter that exists in the embedded 
software. 

4.2 Communications Configuration 

The configuration of the serial communications has two parts.  The host will need to be able to 
configure which on-board port it will use and the baud rate of the port.  It may also need to detect the 
configured baud rate of the camera electronics.  This can easily be done by cycling through the 

Содержание Lumitron ECS-320A

Страница 1: ...TSerial Interface Developers Guide Tfor the TECS 320A Embeddable Camera Electronics System Document Number 700 00000040 R10 10503 Timberwood Circle Suite 120 Louisville KY 40223 502 423 7225...

Страница 2: ...are confidential trade secrets and the property of Lumitron and its licensors Use examination reproduction copying transfer and or disclosure to others of all or any part of this manual and the relate...

Страница 3: ...UT 4 TU5 2 5 McbReadDataMemUT 5 TU5 2 6 McbWriteDataMemUT 5 TU5 2 7 McbWriteDataMemMaskUT 5 TU5 2 8 McbSendAppCmdUT 5 TU5 2 9 McbGetAppCmdStatusUT 5 TU5 3 Lumitron Defined CommandsUT 5 TU5 3 1 CMD_COP...

Страница 4: ...UT 17 TU5 3 40 CMD_RESET_PFV_COUNTUT 17 TU5 3 41 CMD_CLEAR_CONTINUE_FLAGUT 17 TU5 3 42 CMD_UNIFORMITY_TESTUT 17 TU5 3 43 CMD_WRITE_UTILITY_MEMORYUT 17 TU5 3 44 CMD_ADV_DETECT_BAD_PIXELSUT 18 TU5 3 45...

Страница 5: ...8 nvmData OvlModeUT 27 TU6 3 9 nvmData RtclXPosUT 28 TU6 3 10 nvmData RadModeUT 28 TU6 3 11 nvmData AgcModeUT 28 TU6 3 12 nvmData ManualITTUT 28 TU6 3 13 nvmData AgcLimitsUT 28 TU6 3 14 nvmData Linear...

Страница 6: ...Point Update Calibration Internal Flag UT 39 TU7 4 One Point Update Calibration External Flag UT 40 TU7 5 Two Point Calibration Internal Flags UT 40 TU7 6 Two Point Calibration External Flags UT 40 T...

Страница 7: ...fics about previous camera software versions 2 General Requirements Software developed to interface with the camera electronics will need to incorporate the Motorola communications library version 1 2...

Страница 8: ...Pause for transfer Application Started As the host is monitoring the bootloader for text output it can key off of the Pause for Transfer message At this point the host has a couple of seconds to begi...

Страница 9: ...target responds immediately within specified time with operation status code and return data The target never initiates the communication Its responses are exactly specified and always of fixed known...

Страница 10: ...led HTML help file Only those that are typical for interfacing with the camera electronics will be discussed here 5 2 1 McbOpenCom This function is used to open a PC Master Communications resource to...

Страница 11: ...ng a means to update a location without having to perform a read modify write at the higher level Function Definition MCBCOM_API DWORD McbWriteDataMemMask HMCBCOM hCom LPCVOID src LPCVOID mask DWORD a...

Страница 12: ...pad buffer The second command function calls the standard McbReadDataMem to retrieve the data from the scratch pad buffer into a local host buffer The base data type for the PC side is 32 bit The DSP...

Страница 13: ...FLASH_FULL Argument Size size of flash_XFER Argument See below struct _flash_XFER WORD eraseFlag Status Flag to check if flash is erased WORD page Start Page in Serial flash 0 4095 WORD offset Offset...

Страница 14: ...o the DSP data flash starting at address 0x2020 Command Code Enumeration for CMD_PROG_STATIC_CFG Argument Size 0 Argument Null Note Use the McbWriteDataMem function to move data into scratch pad Assoc...

Страница 15: ...truct _RTC_DATA UWord16 seconds 0 59 UWord16 minutes 0 59 UWord16 hours 0 23 UWord16 day 1 7 UWord16 date 1 31 UWord16 month 1 12 UWord16 year 0 99 Add 2000 to get year Size 7 Words typedef struct _RT...

Страница 16: ...rom the scratch pad buffer Command Code Enumeration for CMD_SET_NVM_DATA Argument Size size of NVM_XFER Argument See paragraph X5 3 10X Note Use the McbWriteDataMem function to move data into scratch...

Страница 17: ...Limit to 160 typedef struct _UTIL_MEM_XFER UTIL_MEM_XFER PTR_UTIL_MEM_XFER Base addresses of utility memory partitions are defined as follows Utility Memory MAR Base Addresses define MAR_ITT_LOW 0x000...

Страница 18: ...Disables the TEC Drive circuitry Command Code Enumeration for CMD_TEC_DRV_ENABLE Argument Size UWord16 Argument 0 for disable 1 for enable Note Normally this operation would be controlled by settings...

Страница 19: ...on for CMD_CAL_FLAG_REFERENCE Argument Size Size of CAL_FLAG_STATE Argument See below Commanded Calibration Flag Setting Structure struct _CAL_FLAG_STATE UWord16 state State of Flag Ambient Cold Hot F...

Страница 20: ..._LOAD_OVLY_PAL Description Load an overlay palette from serial flash make active Command Code Enumeration for CMD_LOAD_OVLY_PAL Argument Size UWord16 Argument index of desired palette 0 7 Note No chec...

Страница 21: ...ed verPos 8 Reticle Vertical Position typedef struct _RETICLE_XFER RETICLE_XFER PTR_RETICLE_XFER Note The data contains all the data needed to enable the reticle on the desired screen location 5 3 31...

Страница 22: ...Y TEST_UNDEFINED Note After issuing a test command it is necessary to delay for several seconds until the camera has completed testing Then the results can be obtained by reading the global configurat...

Страница 23: ...g the boot process or while operating under normal conditions cause the embedded software to enter an idle routine While in this routine the host can check the error code and associated information On...

Страница 24: ...X7 9X for details on how to complete this process 5 3 46 CMD_DOWNLOAD_NUC Description Command to download a complete NUC table to the desired NUC index The NUC table will be formatted for the embedded...

Страница 25: ...s 5 3 49 CMD_ENABLE_RANGE_RETICLE Description Enable or disable the range reticle Command Code Enumeration for CMD_ENABLE_RANGE_RETICLE Argument Size UWord16 Argument 0 disable range reticle 1 enable...

Страница 26: ...tialized a check of the static configuration is done If the camera electronics have been configured for a different baud rate then the serial configuration is modified appropriately 6 1 DSP Data Memor...

Страница 27: ...when the embedded application detects an error that it can recover from it goes into an idle state In this idle routine the embedded application loops while checking for the state of this flag or a t...

Страница 28: ...ig camTime Type RTC_DATA Structure to hold time info from Real Time Clock struct _RTC_DATA UWord16 seconds 0 59 UWord16 minutes 0 59 UWord16 hours 0 23 UWord16 day 1 7 UWord16 date 1 31 UWord16 month...

Страница 29: ...type of FPA that the embedded application will be configured to operate Read only data member 6 2 13 CameraConfig agcLowIntensity Type UWord16 Size 1 Word Description Value computed from any of the au...

Страница 30: ...Alarm State Bit 0 Current overtemp alarm state Overtemp Acknowledge Alarm State Bit 1 Camera software acknowledge Battery Level State Bit 2 Low battery state value Battery Level Acknowledge State Bit...

Страница 31: ...channel on the DSP Read only data member These filtered values have been shifted up one bit location for precision rounding purposes It is necessary to divide the value by 65535 to get a properly scal...

Страница 32: ...s the first structure member included in the global configuration It contains settings that control the camera s look and feel Typical settings include selection of video and overlay palettes AGC mode...

Страница 33: ...See XAppendix EX for specifics on this value 6 3 5 nvmData AutoRfshTime Type UWord16 Size 1 Word Description If the auto refresh time flag is enabled then this value determines the time interval betw...

Страница 34: ...Celsius 1 Fahrenheit 6 3 11 nvmData AgcMode Type UWord16 Size 1 Word Description See XAppendix EX for specifics on this value 6 3 12 nvmData ManualITT Type NVM_MANUAL_ITT Display Video Brightness Con...

Страница 35: ...t _NVM_VID_SCALE_TEMPS UWord16 ZeroScaleTemp Display Video Zero Scale Temp UWord16 FullScaleTemp Display Video Full Scale Temp typedef struct _NVM_VID_SCALE_TEMPS NVM_VID_SCALE_TEMPS PTR_NVM_VID_SCALE...

Страница 36: ...TESTS PRC_VIDENC_TESTS PRC_TEC_STABILIZING PRC_CAM_READY 6 5 Progress Code Detection CAMERA_STATUS As the embedded software initializes hardware performs built in tests and then enters the main operat...

Страница 37: ...ed the code jumps to an idle state routine Inside this routine the global configuration member progress code paragraph X6 2 5X is set to FAULT_DETECTED and a timer is started While in this idle state...

Страница 38: ...R_FPGA_LOAD_UNDEFINED 0 ERR_FPGA_NOT_DONE ErrorCount a count of the total number of errors since boot ErrorData 0 4 Not used 6 6 3 FPGA Test This error is set during the testing of the Xilinx FPGA reg...

Страница 39: ...ErrorCode ERR_MEM_TEST define ErrorSubCode a more specific description of the error from the following enumeration FPGA Test Error SubCodes define ERR_MEM_TEST 0x8004 enum ERR_MEM_TEST_UNDEFINED 0 ERR...

Страница 40: ...emory address 6 6 7 Force Count Test This error is set during operational tests Data from CameraConfig camErrors ErrorCode ERR_FORCE_COUNT define ErrorSubCode No subcode ErrorCount a count of the tota...

Страница 41: ...is error is set during operational tests Data from CameraConfig camErrors ErrorCode ERR_GAIN_OFFSET define ErrorSubCode No subcode ErrorCount a count of the total number of errors since boot ErrorData...

Страница 42: ...ESULT_RUNNING a command may be issued to the camera 6 8 Access to DSP Peripheral Registers ArchIO The DSP peripheral registers are mapped into data memory space These registers can be read from or wri...

Страница 43: ...d 1 ITT FB Bits 15 8 Displayed 2 FB Bits 17 10 Displayed when in Freeze Mode 3 Reserved Bit 13 Ovl Act 0 Disable Overlays on Display 1 Enable Overlays on Display Bit 15 Pfv Act 0 Disable Processed FPA...

Страница 44: ...ation File 1146 1535 Expansion FPGA Configuration File 1536 2175 Stored Image 0 Currently not used 2176 2815 Stored Image 1 Currently not used 2816 3455 Stored Image 2 Currently not used 3456 4095 Sto...

Страница 45: ...external calibration flag B Embedded application will set the status code to BEGIN_PROCESS and then begin execution of the calibration C Host will monitor periodically read the status code data membe...

Страница 46: ...status code to BEGIN_PROCESS and then begin execution of the calibration C Host will monitor the status code data member until it is set by the embedded application to CAL_CALC_COEFFICIENTS or CAL_DEL...

Страница 47: ...WriteDataMem command write a portion of the map to the scratch pad buffer Remember it is sized at 160 words C Send the CMD_WRITE_UTILITY_MEMORY command with the proper address offset base is MAR_IMAGE...

Страница 48: ...is set by the embedded application to NUC_FLASH_PROGRAMMED or HOST_READY J Set up for the second pass offset terms only K Using the McbWriteDataMem command write a portion of the offset coefficients t...

Страница 49: ...of gain coefficients is downloaded to local host memory G Set up for the second pass offset terms only H Send CMD_DOWNLOAD_NUC command with the arguments set for offset terms and desired NUC base Thi...

Страница 50: ...AMERA_STATUS camStats 4 Words Camera Error Codes CAMERA_ERRORS camErrors 8 Words Current camera time RTC_DATA camTime 7 Words Mirror of Output Port Expansion Register UWord16 expPort 1 Word Software V...

Страница 51: ...ubType 4 FPA Sub Type Identifier Bits 4 7 retRangeEn 1 Ranging Reticle Enable Bit 8 notUsed 6 Currently not used Bits 9 14 lockMemMirror 1 Set if memory unlocked Bit 15 Filtered ADC Chnl A Result Valu...

Страница 52: ...al Cast to from NVM_ACT_PAL UWord16 OvlMode Cast to from NVM_OVL_MODE NVM_RETICLE_POS RtclAPos See Struct Above NVM_RETICLE_POS RtclBPos See Struct Above UWord16 RadMode Cast to from RAD_MODE UWord16...

Страница 53: ...Map to 0x4X2C UWord16 FpaVerStartReg Map to 0x4X2D UWord16 FpaVerStopReg Map to 0x4X2E UWord16 FpaVerTermCntReg Map to 0x4X2F UWord16 FpaHorRoiStartReg Map to 0x4X30 UWord16 FpaHorRoiStopReg Map to 0...

Страница 54: ...BMemAccClrInc Map to 0x4XAB UWord16 MarBMemAccMsb Map to 0x4XAC UWord16 MarBMemAccMsbInc Map to 0x4XAD UWord16 MarBMemAccMsbClr Map to 0x4XAE UWord16 MarBMemAccMsbClrInc Map to 0x4XAF Utility Memory M...

Страница 55: ...orm a directed 2 point calibration CMD_LOAD_COLOR_PAL Load user selected color palette CMD_LOAD_OVLY_PAL Load user selected overlay palette CMD_PIN_CHECK Verify Memory Unlock PIN CMD_FAN_SPEED_OPERATI...

Страница 56: ...os See Struct Above UWord16 RadMode Cast to from RAD_MODE UWord16 AgcMode Cast to from NVM_AGC_MODE UWord16 ReserveE Reserved NVM_MANUAL_ITT ManualITT See Struct Above NVM_AGC_LIMITS AgcLimits See Str...

Страница 57: ...erved PFV Src Sel Dspl Vid Pol Clr Plt YSel Mstr Sync Mod Clr Bar En Reserved Res er ved Reserved Reserved Auto NUC Switch Low Saturation Count Threshold Auto NUC Switch High Saturation Count Threshol...

Страница 58: ...Op Mode 0 Act Op Mod 15 Use the Appropriate Op Mode Descriptor Table Values to Load the FPA Processor Registers Active NUC Index Selects the Currently Active NUC Index 0 Act Nuc Indx 63 Use the Approp...

Страница 59: ...or Auto Refresh Calibrate Parameters If Auto Cal Tim 1 then Perform 1 Point Offset Refresh NUC when the Auto Calibrate Time Period Expires If Auto Cal Tmp 1 then Perform 1 Point Offset Refresh NUC whe...

Страница 60: ...B Emissivity 0 to 1 2 8 Display Video Manual High Intensity Input Intensity Mapped to 255 0 to 16 383 Reserved Tem p Unit AGC Low Limit Intensity Reserved Reticle Parameters If Rtcl X En 1 then Draw R...

Страница 61: ...ap Indx Linear Hi Map Indx Lag Filter Rate Reserved AGC Bin Limit AGC Limit Intensity Parameters If Agc Mod 2 then Ignore Histogram Intensities Below AGC Low Limit Intensity and Above AGC High Limit I...

Страница 62: ...et Reserved Lens ID Control Lens ID 0 No Lens Fixed Focus No Zoom IDs 1 through 15 1 Reserved 2 Reserved 3 13mm 4 Reserved 5 25mm 6 Reserved 7 50mm 8 Reserved 9 Reserved 10 100mm 11 to 15 Reserved Man...

Страница 63: ...Coefficient Odd Addresses Range 16 384 to 16 383 5 Resolution 0 5 NUC Offset Coefficient Becomes Pixel Replace Address Offset if NUC Gain Coefficient Equals Zero NUC Gain Coefficient Even Addresses R...

Отзывы: