Do you have a question about the Lumitron ECS-320A and is the answer not in the manual?
Questions and answers
Summary of Contents for Lumitron Lumitron ECS-320A
Page 1
Serial Interface Developers Guide for the ECS-320A Embeddable Camera Electronics System (Document Number 700-00000040-R10) 10503 Timberwood Circle Suite 120 Louisville, KY 40223 (502) 423-7225...
Page 2
ERIAL NTERFACE EVELOPERS UIDE Serial Interface Developers Guide Document Number 700-00000040 April 2003 Copyright Lumitron 2003 All Rights Reserved. DISCLAIMER All copyrights in this manual, and the hardware and software described in it, are the exclusive property of Lumitron, Inc. and its licensors. Claim of copyright does not imply waiver of Lumitron’s or its licensor’s other rights in the work.
Page 6
6.9.1 FPA Processor Operational Control Register Low 6.9.2 FPA Processor Operational Control Register High 6.9.3 FPA Processor User Mode Control Register 6.9.4 ATC Offset Coefficient Register 6.10 Access to Serial Data Flash 7 REMOTE CALIBRATION PROCESS 7.1 One Point Refresh Calibration (Internal Flag): 7.2 One Point Refresh Calibration (External Flag): 7.3 One Point Update Calibration (Internal Flag): 7.4 One Point Update Calibration (External Flag):...
Lumitron and portions of it may be listed in this document. Host software requires an IBM PC or PC compatible with an available COM port. Lumitron’s host application was designed for Windows 2000 and a minimum screen size setting of 1024 x 768.
used for text/file transfer. The bootloader is JTAG loaded into the DSP boot flash, typically during the production of the camera electronics. After the bootloader has configured the serial port it will output some text messages informing the host of its status and go into a wait state (approximately 5 seconds). During the wait state the host can initiate a file upload.
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.
possible baud rates (9600, 38400, 115200) and verifying communication status. The remainder of the settings are automatically configured by the communications library. 5 Host Side Interface 5.1 Baud Rate The baud rate of the host side can be fixed to the configuration of the camera electronics or it can be designed to detect the active baud rate.
5.2.5 McbReadDataMem Call this function to read a block of memory from the DSP. At the lower level the call may be broken into several calls to the DSP controller to read the entire block. This function can also be used to read registers or a block of registers that are mapped into the DSP data memory space.
… // Wait until DSP is ready for next command status = GetPCMStatus(m_hComPCM); // Send Focus Motor Far Command retVal = McbSendAppCmd( m_hComPCM, (BYTE)CMD_FOCUS_MOTOR_FAR, NULL // If failed we need to break if (FAILED(retVal)) tStr.Format(IDS_PC_MSTR_ERROR, retVal); DoMessageBox(tStr, MB_OK, 0); … Notes: •...
5.3.2 CMD_PROG_SFLASH_FULL Description: Program a full page to serial flash. The data to be programmed will need to be written to the scratch pad (DSP memory location 0x00C0) before initiating this command. The offset for the write into serial flash will be 0 regardless of the structure value. Command Code: Enumeration for CMD_PROG_SFLASH_FULL Argument Size: size of flash_XFER Argument: See below.
COMP_SER_NUM fpaSupportBD; COMP_SER_NUM calFlagAssy; COMP_SER_NUM peripheral[4]; COMP_SER_NUM fpa; UWord16 ReserveBlk_A[2]; /* Size = 32 Words */ typedef struct _PRODUCT_ID PRODUCT_ID, *PTR_PRODUCT_ID; 5.3.5 CMD_READ_PRODUCT_ID Description: Read Product ID from DSP Data flash and place into the scratch pad buffer. Command Code: Enumeration for CMD_READ_PRODUCT_ID Argument Size: 0 Argument: Null Note: Use the McbReadDataMem function to read data from scratch pad.
LENS_CFG lens[4]; typedef struct _STATIC_CFG STATIC_CFG, *PTR_STATIC_CFG; 5.3.7 CMD_READ_STATIC_CFG Description: Read Static Configuration from DSP Data flash and place into the scratch pad buffer. Command Code: Enumeration for CMD_READ_STATIC_CFG Argument Size: 0 Argument: Null Note: Use the McbReadDataMem function to read data from scratch pad. See data structures above. 5.3.8 CMD_GET_CAMERA_TIME Description: Read the Real Time Clock data and place into the scratch pad buffer.
Argument: See below. struct _NVM_XFER { UWord16 offset; UWord16 size; typedef struct _NVM_XFER NVM_XFER, *PTR_NVM_XFER; Note: Use the McbReadDataMem function to read data from scratch pad. The offset term in the data structure determines the offset address relative to the NVM part. This command allows the host to retrieve any portion or all of the current NVM contents.
5.3.14 CMD_IMAGE_GRAB Description: Perform an image grab into one of the utility memory buffers. Command Code: Enumeration for CMD_IMAGE_GRAB Argument Size: UWord16 Argument: Buffer to be selected (0 – data placed in image grab buffer A, and 1 - data placed in image grab buffer B).
Argument Size: size of NUC_MEM_XFER Argument: See below. struct _NUC_MEM_XFER{ UWord32 addr; UWord16 size; typedef struct _NUC_MEM_XFER NUC_MEM_XFER, *PTR_NUC_MEM_XFER; Note: Use the McbReadDataMem function to read data from scratch pad. Multiple calls of this function would allow the host to read an entire set of NUC coefficients. 5.3.18 CMD_NUC_FLASH_TEST_PATTERN Description: Debug command to tell the camera to write ramp count to the base blocks (10 –...
struct _SERVO_MODE UWord16 mode; UWord16 factor; typedef struct _SERVO_MODE SERVO_MODE, *PTR_SERVO_MODE; /* Servo Mode Enumeration */ enum SERVO_OPEN = 0, SERVO_CLOSE, SERVO_FACTOR Note: This command is to be used for test purposes. Once configured the servo will be controlled by the embedded application during normal operation 5.3.22 CMD_CAL_FLAG_REFERENCE Description: Sets the calibration flag reference to the supplied state.
5.3.24 CMD_TWO_PT_NUC Description: Initiates a 2-point calibration. The host is required to check/update the status of a global associated with the calibration process. Command Code: Enumeration for CMD_TWO_PT_NUC Argument Size: UWord16 Argument: 0 – external reference, 1 – internal reference Note: Since the 2 point calibration requires placement of hot and cold sources it is necessary to implement this command in ‘sub-protocol’...
5.3.29 CMD_GET_ADC_VALUES Description: Command to retrieve the current value of all active ADC values. The data is placed into the scratch pad buffer. Command Code: Enumeration for CMD_GET_ADC_VALUES Argument Size: 0 Argument: Null Note: Use the McbReadDataMem function to read data from scratch pad. This command was added for developmental purposes.
Command Code: Enumeration for CMD_WRITE_VID_ENC_REG Argument Size: size of 2 * UWord16 Argument: 1 UWord16 – offset, 2 mode 0 register. In other words if a value of 0 is supplied as the offset then data will be written to the mode 0 register.
Note: Since the defective pixel requires placement of reference sources it is necessary to implement this command in ‘sub-protocol’ form. See paragraph 5.3.38 CMD_IRCON_LOAD_LUT Description: Custom LUT table creation for radiometry. Contact Lumitron for specifics. 5.3.39 CMD_LOAD_RAD_PARAMS Description: Custom load radiometric parameters for compile time software. Contact Lumitron for specifics.
typedef struct _UTIL_MEM_XFER UTIL_MEM_XFER, *PTR_UTIL_MEM_XFER; Note: Use the McbWriteDataMem function to move data into scratch pad. 5.3.44 CMD_ADV_DETECT_BAD_PIXELS Description: Command no longer used. 5.3.45 CMD_UPLOAD_NUC Description: Command to upload a complete NUC table to the desired NUC index. The NUC table will be formatted for the embedded application and will contain pixel replace index values for defective pixels.
Note: Once the command has been sent the embedded application will set the status code to BEGIN_PROCESS. The host can monitor this code until it is returned to HOST_READY which indicates the routine has completed compiling the defects. 5.3.48 CMD_RESTORE_FACTORY_DEFECTS Description: Command to restore the active NUC table to the factory defect state.
Argument: None Note: Use of this command assumes that the host knows the current state of the shadow register in the global configuration structure 6 Camera Electronics Side Interface The communications on the camera side is carried out by a PC Master Device driver that is part of the Motorola SDK targeted for the DSP 56F80X family.
Any portion up to the entire structure can be read using the ‘McbReadDataMem’ routine. For example, if the host wanted to retrieve the current embedded application version, a read of the data member at address 0x0040 + offset of the ‘swVersion’, member could be performed. The paragraphs below will provide information about each of the data members.
6.2.6 CameraConfig.camErrors Type: CAMERA_ERRORS /* Camera Error Code Structure */ struct _CAMERA_ERRORS UWord16 UWord16 UWord16 UWord16 typedef struct _CAMERA_ERRORS CAMERA_ERRORS, *PTR_CAMERA_ERRORS; Size: 8 Words Description: Structure that contains various sub values for gathering information about errors that have occurred during testing and normal operation. See paragraph detection.
Description: Software build ID of the loaded embedded application. Read only data member. 6.2.11 CameraConfig.fpgaVersion[2] Type: UWord16 Size: 2 Words Description: Xilinx FPGA version code of the stored configuration file. Read only data member. 6.2.12 CameraConfig.fpaSize Type: IMAGE_SIZE /* FPA Size Structure */ struct _IMAGE_SIZE UWord16 rows;...
Size: 1 Word Description: The member is divided into the following bit fields. Fan Speed Index: (Bits 0 - 2) Current internal fan speed index. Read only data member. Base NUC table: (Bits 3 - 8) Current base NUC index. Read only data member. Limit NUC table: (Bits 9 - 14) Current limit NUC index.
FPA Sub-type Identifier: (Bits 4 – 7) Range Reticle Enable: (Bit 8) Reserved: (Bits 9 – 14) Lock Memory Mirror Bit: (Bit 15) The following enumerations are used for the type and subtype codes: /* Fpa Type Enumerations */ enum FPA_NONE = 0, FPA_DRS_U3000A, FPA_SOFRADIR,...
Index [3]: DSP Channel B3 6.2.24 CameraConfig.btnPanel Type: BTN_PANEL /* Button Panel State Structure */ struct _BTN_PANEL unsigned menuUpdate:1; Should only be set by Host and only cleared by camera. */ unsigned actMenuID:7; unsigned actCursor:4; unsigned menuRows:4; /***** Camera Only Access *****/ unsigned reservedA:1;...
6.3.9 nvmData.RtclXPos Type: NVM_RETICLE_POS /* Reticle Position & Emissivity */ struct _NVM_RETICLE_POS unsigned RtclHorPos:9; unsigned Reserved:7; unsigned RtclVerPos:8; unsigned RtclEmiss:8; typedef struct _NVM_RETICLE_POS NVM_RETICLE_POS, *PTR_NVM_RETICLE_POS; Size: 2 Words Description: Same for both A and B reticles. See 6.3.10 nvmData.RadMode Type: UWord16 Size: 1 Word Description: Bit 0 contains radiometric units (0 –...
typedef struct _NVM_AGC_LIMITS NVM_AGC_LIMITS, *PTR_NVM_AGC_LIMITS; Size: 2 Words Description: See Appendix E 6.3.14 nvmData.LinearMap Type: UWord16 Size: 1 Word Description: See Appendix E 6.3.15 nvmData.AgcBinLimit Type: UWord16 Size: 1 Word Description: See Appendix E 6.3.16 nvmData.ActZoneStat Type: UWord16 Size: 1 Word Description: Currently not used.
opportunity. In other words if the host intends on changing the current AGC mode and have that mode restored on subsequent boots – then two writes are required. The first to change the global data structure and then a second to force an update of the nonvolatile RAM. 6.4 Process Code Detection (CAMERA_STATUS) During various routines, during normal operation, the embedded software will set a process codes.
It is also recommended that the host check regularly (including the boot sequence) for the UNCONFIGURED_CONTROLLER and the FAULT_DETECTED codes. The FAULT_DETECTED code is set by the embedded application when a built-in test fails or when a mismatch between the configured hardware and detected hardware occurs. The embedded software will jump to an idle loop to give the host a chance to read error data (see paragraph the continue flag (structure member ‘continueFlag’, paragraph and will automatically return after time expires.
ERR_CAM_SPRT_BD_MISMATCH, ERR_SUBCODE_UNDEFINED ErrorCount: a count of the total number of errors since boot. ErrorData [0] Value stored in configuration flash. ErrorData [1] Value read from the ADC. ErrorData [2] – [4] Not used. 6.6.2 FPGA Load This error is set during the configuration of the Xilinx FPGA. Data from CameraConfig.camErrors: ErrorCode: ERR_FPGA_LOAD define.
For SubCode ERR_CROSSTALK: ErrorData [0] Address of register being written to. ErrorData [1] Address of register being tested for crosstalk. ErrorData [2] Crosstalk register value. ErrorData [3] Cross talk register test mask. ErrorData [4] Not used. For SubCode ERR_FPGA_MEMORY: ErrorData [0] Value expected. ErrorData [1] Value read from memory.
ErrorData [1] Value read back. ErrorData [2] Test mask. ErrorData [3] Lower 16 bits of memory address. ErrorData [4] Upper 16 bits of memory address. 6.6.6 Force ‘1’ Test This error is set during operational tests. Data from CameraConfig.camErrors: ErrorCode: ERR_FORCE_ONE define. ErrorSubCode: No subcode.
ErrorData [4] Upper 16 bits of memory address. 6.6.9 Histogram Data Grab Test This error is set during operational tests. Data from CameraConfig.camErrors: ErrorCode: ERR_HISTO_GRAB define. ErrorSubCode: No subcode. ErrorCount: a count of the total number of errors since boot. ErrorData [0] Value expected.
6.7 Command Polling During normal operation of the embedded application, a poll is done to check for user defined commands that have been issued by the host. When a command is detected the appropriate action is taken. Once the action is completed the command status is either reset or set to a status (see list below) to let the host know that it can proceed with the task at hand.
There are only a couple of registers that the host will typically modify. They are listed in the following paragraphs. 6.9.1 FPA Processor Operational Control Register Low Address: 0x4000 Bit 0 (Unit Gain): 0 – Use NUC Coefficient Memory Gain; 1 – Force NUC Gain to Unity (1.0) Bit 1 (Zero Ofst): 0 –...
Bits 10-11 (Pfv Src Sel): Processed FPA Video Source Select: 0 – Digital FPA Video; 1 – NUC Corrected Video; 2 – Pixel Replaced Video; 3 – ITT Video 6.9.4 ATC Offset Coefficient Register Address: 0x4007 16-Bit Signed Constant Added to Output of NUC Circuit (Prior to NUC Refresh) -16,384 <= Atc Ofst <= 16,383.5 6.10 Access to Serial Data Flash The Atmel serial data flash chip has 4096 pages of storage each with 264 bytes.
/* Calibration and Defect Communication Status Enumerations */ enum HOST_READY = 0xFFFF, BEGIN_PROCESS = 0, CAL_PLACE_COLD_REF, CAL_COLD_REF_IN_PLACE, CAL_PLACE_HOT_REF, CAL_HOT_REF_IN_PLACE, CAL_DELTA_TOO_SMALL, CAL_COMPLETED, CAL_CALC_COEFFICIENTS, DEFECT_TOO_MANY, DEFECT_ERASE_FLASH, DEFECT_ERASE_ACK, DEFECT_COMPLETED, UNIFORMITY_TEST_IN_PROGRESS, NUC_FLASH_PROGRAMMED, HOST_UNDEFINED 7.1 One Point Refresh Calibration (Internal Flag): Send CMD_ONE_PT_REFRESH Embedded application will set the the calibration.
(E) Calibration is complete. 7.4 One Point Update Calibration (External Flag): (A) Send CMD_ONE_PT_UPDATE command with argument for using 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 member until it is set by the embedded application to CAL_PLACE_COLD_REF.
(O) Host will monitor the status code data member until it is set by the embedded application to CAL_CALC_COEFFICIENTS or CAL_DELTA_TOO_SMALL. If the CAL_DELTA_TOO_SMALL code is received then the embedded application has aborted the calibration. (P) The host/user may now remove the hot reference if desired. (Q) Host will monitor (periodically read) the status code data member until it is set by the embedded application to CAL_COMPLETED.
for each pixel in the entire array. The NUC data will also need to be formatted for use in the hardware (see Appendix F ). It will also be necessary to save NUC mode data to serial data flash that corresponds to the uploaded NUC data (see paragraph (A) Disable the automatic NUC refresh operation by setting BIT-15 of the camera configuration bitFieldIndex member.
Page 49
(B) Send CMD_DOWNLOAD_NUC command with the arguments set for ‘gain terms’ and desired NUC base. This will instruct the camera to read the NUC flash and store the gain terms in utility memory (at base of MAR_IMAGE_GRAB_B). (C) Host will monitor (periodically read) the status code data member until it is set by the embedded application to HOST_READY.
Appendix A - Camera Configuration Data Structures Current Camera Configuration Information Structure: This structure will contain information about the camera that will be useful for standard operation as well as for the remote user to have access. in memory so that the info is always available via PCMaster. struct _CAMERA_CONFIG /* NVM Config Data for Global Access */ NVM_GLOBAL_CFG...
Appendix E - Dynamic Memory Definitions Note: The address (Adr) listed in the tables that follow refer to the RAM offset address inside the Real Time Clock/NVM RAM part. Factory Adr Entry Name Mode Initialize Camera Short 0x0009 Mode Control FPA Processor Short 0x0000...
Page 58
1 – Enable Temperature Excursion Based 1-Pt Refresh Rfsh On Boot 0 – Disable 1-Pt Refresh on Bootup; 1 – Enable 1-Pt Refresh on Bootup (Camera waits until FPA Temperature Stable) Rfsh On Sw 0 – Disable 1-Pt Refresh on NUC Switch; 1 –...
Page 59
Factory Adr Entry Name Mode Initialize Auto Refresh Short 0x0258 Time Period Auto Refresh Short 0x00EA Temperature Delta Threshold 54 - Reserved Short 0x0000 Active Byte 0x00 Color Palette Active Byte 0x00 Overlay Palette Overlay Byte 0xA1 Control Overlay Byte 0xD0 Color Reticle A...
Page 60
Factory Adr Entry Name Mode Initialize Reticle B Short 0x00DC Horizontal Position Reticle B Byte 0x78 NTSC Vertical 0x80 PAL Position Reticle B Byte 0x00 Emissivity Reticle Short 0x0000 Radiometric Control Byte 0x02 Mode Active Byte 0x00 Index Reserved Short 0x0000 Display Video Short...
Page 61
Factory Adr Entry Name Mode Initialize AGC High Short 0x3FFF Limit Intensity Short 0x0000 Ancillary Control Short 0x001E Limit 88 - Reserved Short 0x0000 Active Byte 0x00 Zone Stats Table Reserved Byte 0x00 Display Video Short 0x0000 Zero Scale Temperature 100 Display Video Short 0x0000...
Page 62
Factory Adr Entry Name Mode Initialize 104 Lens ID Byte 0x05 Control 105 Reserved Byte 0x00 106 - Reserved Short 0x0000 112 Operational Short 0x0000 Elapsed Time (LSBs) 114 Operational Short 0x0000 Elapsed Time (MSBs) 116 Cal Flash Short 0x0000 Cycle Count 118 Cal Refresh...
Appendix F – NUC Coefficient Format NUC Offset 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 Bit Fields NUC Offset Coefficient (for Valid Pixel i.e. NUC Gain Non-Zero) Sign Zero Sign...
Need help?
Do you have a question about the Lumitron ECS-320A and is the answer not in the manual?
Questions and answers