Page 2 - Serial Interface Developers Guide; NOTICE OF PROPRIETARY RIGHTS; ii
S ERIAL I NTERFACE D EVELOPERS G 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 l...
Page 3 - Communication Configuration; iii
S ERIAL I NTERFACE D EVELOPERS G UIDE T Table of Contents T TU 1 INTRODUCTION UT ......................................................................................................... 1 TU 2 GENERAL REQUIREMENTS UT .....................................................................................
Page 4 - CAMERA ELECTRONICS SIDE INTERFACE; iv
S ERIAL I NTERFACE D EVELOPERS G UIDE TU 5.3.16 CMD_NUC_FLASH_RAMP UT ........................................................................................................ 11 TU 5.3.17 CMD_NUC_FLASH_MEMORY UT ...........................................................................................
Page 6 - FPA Processor Operational Control Register Low; Access to Serial Data Flash; vi
S ERIAL I NTERFACE D EVELOPERS G UIDE TU 6.9.1 FPA Processor Operational Control Register Low UT ....................................................................... 37 TU 6.9.2 FPA Processor Operational Control Register High UT .......................................................................
Page 7 - Introduction
S ERIAL I NTERFACE D EVELOPERS G UIDE 1 Introduction This guide has been written to help the developer become acquainted with and be able to develop around the Serial Interface Protocol requirements for the Embeddable Camera Electronics System hardware. An overview of the system requirements and a d...
Page 8 - Lumitron Bootloader v0003 for 49MHz Configuration.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 ...
Page 9 - Lumitron v0003 Bootloader Version:; Interface Protocol; PC Master Information; Embedded SDK: Targeting Motorola DSP56F80x; Communications Configuration
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 ...
Page 10 - Host Side Interface
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 configu...
Page 11 - An example of this function is shown below in paragraph; Lumitron Defined Commands
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 ...
Page 12 - Argument Size: size of UWord16
S ERIAL I NTERFACE D EVELOPERS G UIDE … // 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, 0, NULL ); // If failed we need to break if (FAILED(retVal)) { tStr.Format(IDS_PC_MSTR_E...
Page 17 - Argument Size: UWord16
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 i...
Page 21 - Description: Move the selected reticle to desired location.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 f...
Page 22 - UWord16 – data. The offset term is relative to the video encoder
S ERIAL I NTERFACE D EVELOPERS G UIDE Command Code: Enumeration for CMD_WRITE_VID_ENC_REG Argument Size: size of 2 * UWord16 Argument: 1 P st P UWord16 – offset, 2 P nd P UWord16 – data. The offset term is relative to the video encoder mode 0 register. In other words if a value of 0 is supplied as t...
Page 23 - Description: Resets the processed FPA video frame count.
S ERIAL I NTERFACE D EVELOPERS G UIDE Note: Since the defective pixel requires placement of reference sources it is necessary to implement this command in ‘sub-protocol’ form. See paragraph X 7.7 X for details. 5.3.38 CMD_IRCON_LOAD_LUT Description: Custom LUT table creation for radiometry. Contact ...
Page 24 - for details on how to complete this process.
S ERIAL I NTERFACE D EVELOPERS G UIDE }; 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...
Page 26 - Camera Electronics Side Interface; . The Motorola DSP56F807 has a data memory
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 dri...
Page 27 - Description: See paragraph TBD
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 ...
Page 28 - for information on the error code
S ERIAL I NTERFACE D EVELOPERS G UIDE 6.2.6 CameraConfig.camErrors Type: CAMERA_ERRORS /* Camera Error Code Structure */ struct _CAMERA_ERRORS { UWord16 ErrorCode; /* Error Code */ UWord16 ErrorSubCode; /* Error Code */ UWord16 ErrorCount; /* Additional errors after 1st */ UWord16 ErrorData[5]; /* E...
Page 30 - Description: The member is divided into the following bit fields.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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: (Bi...
Page 36 - The current process codes are listed below.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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...
Page 37 - the continue flag (structure member ‘continueFlag’, paragraph
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 ...
Page 38 - ErrorCount: a count of the total number of errors since boot.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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...
Page 39 - ErrorData [1] Address of register being tested for crosstalk.
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 ...
Page 42 - Information on these registers can be obtained in the Motorola
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 sta...
Page 44 - Remote Calibration Process
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 (Prio...
Page 45 - Send
S ERIAL I NTERFACE D EVELOPERS G UIDE /* 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_TO...
Page 47 - Defective Pixel Detection
S ERIAL I NTERFACE D EVELOPERS G UIDE (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/use...
Page 48 - Download NUC Table to Host
S ERIAL I NTERFACE D EVELOPERS G UIDE for each pixel in the entire array. The NUC data will also need to be formatted for use in the hardware (see X Appendix F X ). It will also be necessary to save NUC mode data to serial data flash that corresponds to the uploaded NUC data (see paragraph X 5.3.2 X...
Page 50 - Appendix A - Camera Configuration Data Structures
S ERIAL I NTERFACE D EVELOPERS G UIDE 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. Therefore ...
Page 53 - Appendix B - Xilinx Register/Data Structure
S ERIAL I NTERFACE D EVELOPERS G UIDE Appendix B - Xilinx Register/Data Structure /* Xilinx FPGA Register Map Structure */ typedef struct { UWord16 OpCtrlRegLo; /* Map to 0x4X00 */ UWord16 OpCtrlRegHi; /* Map to 0x4X01 */ UWord16 UserCtrlReg; /* Map to 0x4X02 */ UWord16 StaticCtrlReg; /* Map to 0x4X...
Page 55 - Appendix C - Camera Command Enumerations
S ERIAL I NTERFACE D EVELOPERS G UIDE Appendix C - Camera Command Enumerations /* PC Master Command Code Enumerations */ enum { CMD_FPGA_UPDATE_AVAILABLE = 1, CMD_COPY_SFLASH_PAGE, /* Copy a page of serial flash memory to DSP */ CMD_PROG_SFLASH_FULL, /* Program a full page to serial flash */ CMD_PRO...
Page 56 - Appendix D - Mapping of Serial Non-Volatile Memory
S ERIAL I NTERFACE D EVELOPERS G UIDE Appendix D - Mapping of Serial Non-Volatile Memory /* Complete Camera Dynamic Configuration Info Structure */ struct _NVM_DYN_CFG { UWord16 CamMode; /* Cast to/from NVM_CAM_MODE */ UWord16 FpaMode; /* Cast to/from NVM_FPA_PROC_MODE */ UWord16 ReserveA; /* Reserv...
Page 57 - Appendix E - Dynamic Memory Definitions
S ERIAL I NTERFACE D EVELOPERS G UIDE 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 Bit Fields Adr Entry Name Mode Initialize 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 32 C...
Page 63 - Appendix F – NUC Coefficient Format
S ERIAL I NTERFACE D EVELOPERS G UIDE Appendix F – NUC Coefficient Format NUC Gain Coefficient (for Valid Pixel) Bit Fields 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Frct NUC Offset Coefficient (for Valid Pixel i.e. NUC Gain Non-Zero) Bit Fields 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Frct Sign Pixel Repl...