Symmetricom bc635PCI-V2 User Manual

Symmetricom bc635PCI-V2 User Manual

Pci/pcie time and frequency processor
Hide thumbs Also See for bc635PCI-V2:
Table of Contents

Advertisement

Quick Links

Symmetricom bc635PCI-V2 User Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the bc635PCI-V2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Symmetricom bc635PCI-V2

  • Page 1 Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment SERVICE CENTER REPAIRS WE BUY USED EQUIPMENT • FAST SHIPPING AND DELIVERY Experienced engineers and technicians on staff Sell your excess, underutilized, and idle used equipment at our full-service, in-house repair center We also offer credit for buy-backs and trade-ins •...
  • Page 2 PCI / PCIe Time and Frequency Processor User’s Guide Products Included: bc635PCI-V2 bc637PCI-V2 bc635PCI-V2-OCXO bc637PCI-V2-OCXO PCIe bc635PCIe bc637PCIe bc635PCIe-OCXO bc637PCIe-OCXO Product CD, 098-00179-000 November 2, 2009 Revision A Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 3: Symmetricom Customer Assistance

    All rights reserved. Due to continued product development this information may change without notice. If you find any errors in the documentation, please report them to us in writing. Symmetricom, Inc. does not warrant that this document is error-free. Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 4: Intellectual Property

    Software - Symmetricom warrants that for a period of ninety (90) days from date of shipment by Sym- metricom the accompanying media will be free from defects in materials and workmanship under nor- mal use.
  • Page 5: Contact Information

    3750 Westwind Blvd. Santa Rosa, CA 95403 Main: +1 (707) 528-1230 For Sales, Technical Support, and Return Materials Authorization, please see " Symmetricom Customer Assistance" on page ii. Conventions The conventions used in this manual are: Note:Tips and clarifications Warning:Actions to prevent equipment damage.
  • Page 6: Table Of Contents

    Time Code Inputs Time Code Outputs PCIe Bus Characteristics PCI Bus Characteristics Inputs Outputs bc635PCI-V2 and bc637PCI-V2 Jumpers bc635PCIe and bc637PCIe Jumpers Environmental Specifications Front Panel LED GPS Antenna 1.2. Installation Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 7 1.2.1. General 1.2.2. Installing the Card and Antenna Installing the Card Changing the TFP Card Front Panel Procedure for Changing the TFP Card Front Panel Antenna Location and Installation (bc637PCI-V2 and bc637PCIe) Quick Initial Setup Permanent Antenna Installation 1.2.3. bc637PCI/PCIe Additional Hardware 1.2.4.
  • Page 8 Fractional mode Divider Source Divider Mode Multiplier Mode 1.3.4. Time Coincidence Strobe Output 1.3.5. PCI(e) Interrupts 1.3.6. Additional Timing Output Signals 1.3.7. AM Time Code Calibration 1.3.8. Calibration Procedure 1.3.9. Field Upgrade of Embedded Program 1.4. Device Registers 1.4.1. General 1.4.2.
  • Page 9 EVENT2_0 (0x28) – EVENT2_1 (0x2C) Registers TIME0 (0x30) - TIME1 (0x34) Registers EVENT0 (0x38) - EVENT1 (0x3C) Registers UNLOCK3 Register (0x44) EVENT3_0 (0x48) – EVENT3_1 (0x4C) Registers 1.4.4. TIME FORMAT STATUS BITS Status Bits Summary STATUS: Tracking (Bit 24) STATUS: Phase (Bit 25) STATUS: Frequency Offset (Bit 26) 1.5.
  • Page 10 Command 0x12: Set Major Time Command 0x13: Set Year Command 0x14: Set Periodic Output Command 0x15: Set Input Time Code Format Command 0x16: Set Input Time Code Modulation Type Command 0x17: Set Propagation Delay Compensation Command 0x18: Request UTC Time Data (bc637 only) Command 0x19: Request TFP Data Command 0x1A: Software Reset Command 0x1B: Set Time Code Output Format...
  • Page 11 Command 0x40: Observe Local Time Flag Command 0x41: IEEE 1344 Daylight Saving and Local Time Flags Command 0x43: Select Periodic or DDS Output Command 0x44: Periodic or DDS Output Enable Command 0x45: DDS Divide Select Command 0x46: DDS Divide Source Command 0x47: DDS Synchronization Mode Select Command 0x48: DDS Multiplier Value Command 0x49: DDS Period Value...
  • Page 12 Manually Request Packet from GPS Receiver (Command 0x32) 1.7.4. Position Fix Modes Position Fix Mode 0 Position Fix Mode 1 Position Fix Mode 3 and 4 1.8.5. GPS Default Parameters Set Operating Parameters (GPS packet 0x2C) Set High-8 / High-6 Mode (GPS packet 0x75) Set I/O Options (GPS packet 0x35) 1.9.
  • Page 13 2.2.1. General 2.2.2. Quickstart Guide to Operating bc637PCIcfg.exe 2.2.3. bc637PCIcfg.exe Program Menu Interface File Menu Time Menu Status Menu Mode Menu Position Menu Options Menu Request Menu Send Menu Reset Menu Help Menu 2.3. Traytime Windows Application Program 2.3.1. Installation 2.3.2.
  • Page 14 Driver Installation Driver Packages 64-Bit Applications DLL File Software Developers Kit TrayTime.exe API Calling Convention NoSync Read Time Functions 3.3. Installation Hardware and driver installation Software developer's kit installation Configuration Test installation Project creation Microsoft Visual C++ 6.0 Microsoft Visual Studio 2008 3.4.
  • Page 15 4.2. Installation 4.2.1. Hardware installation 4.2.2. Software installation 4.2.3. Linux kernel versions supported 4.2.4. Test Installation 4.2.5. Using the bc63xPCIcfg.exe program Select Operational Mode Request Time Settings Select Timecode Decoding Format Request Timecode Settings Select Timecode Output Format Select the Time Register Format Read Current Time Set Current Time Set Current Year...
  • Page 16 Reading in Binary Time Format Reading in Decimal Time Format 3.4.4. Setting theTFP Mode 4.4.5. Setting Interrupts 5. Solaris SDK 5.1. Introduction 5.1.1. General 5.1.2. Features 5.1.3. Overview 5.2. Installation 5.2.1. Hardware Installation 5.2.2. Software Installation 5.2.3. Test Installation 5.2.4. Driver Compilation 5.3.
  • Page 17 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 18: Pci/Pcie Tfp Hardware

    1. PCI/PCIe TFP Hardware 1.1. Introduction 1.1.1. General Information The Symmetricom model bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processors (TFP) are high performance plug-in cards used for precise time syn- chronization of the host computer over the PCI or PCIe bus.
  • Page 19: Ack Bit

    1. PCI/PCIe TFP Hardware Images of bc635PCI-V2 and bc635PCIe follow Figure 1-1: Model bc635PCI-V2 Time and Frequency Processor A: SMB Antenna Connector GPS Antenna B: J1 Module I/O 15 pin D-sub connector Figure 1-2: Model bc637PCI-V2 (GPS option shown with GPS antenna) All sections of this manual are applicable to all boards except where noted.
  • Page 20 1.1. Introduction Images of bc635PCI-V2 and bc635PCIe follow:: Figure 1-3: Model bc635PCIe Time and Frequency Processor GPS Antenna A: SMB Antenna Connector P/N 142-614-50 B: J1 Module I/O 15 pin D-sub connector Figure 1-4: Model bc637PCIe (GPS option shown with GPS antenna) All sections of this manual are applicable to all boards except where noted.
  • Page 21: Key Features

    1. PCI/PCIe TFP Hardware 1.1.2. Key Features All modes of operation are supplemented by flywheel operation. If the synchronization source is lost, the TFP will continue to function at the last known reference rate. The following operational modes are supported, and are distinguished by the reference source. Mode Source of Synchronization Time Code - IRIG A, B, G, E, IEEE 1344, NASA 36, XR3 &...
  • Page 22: Specifications And Settings

    "MASK Register (0x18)" on page 31. Note: The bc635PCI-V2 and bc637PCI-V2 do not provide interrupts at system start-up and therefore do not support the PCI Local Bus Specification Revision 2.3 feature of software disable of interrupts at start-up.
  • Page 23: Pcie Bus Characteristics

    Size 4.2” x 6.875” (Full Height) Interrupts Automatically Assigned (PnP) Power (bc635PCI-V2) +5V @ 700 mA, +12V @ 50 mA Power (bc637PCI-V2) +5V @ 800 mA, +12V @ 50 mA +5V @ 800 mA, (1.1 A @ start up), +12V @ 50 mA Power (bc635PCI-V2-OCXO) Power (bc637PCI-V2-OCXO) +5V @ 900 mA, (1.2 A @ start up), +12V @ 50 mA...
  • Page 24: Outputs

    Oscillator DAC bc635PCI-V2 and bc637PCI-V2 Jumpers The following is a list of the hardware jumpers on the bc635PCI-V2 and bc637PCI-V2 boards: JP1 is a 2mm jumper that is the RTC battery connect switch. The RTC battery is a non-recharge- able lithium cell with 48 mAh capacity. When the card is not powered and the RTC battery has not been disabled, the RTC draws about 20 uA which will provide >100 days of RTC operation.
  • Page 25: Environmental Specifications

    1. PCI/PCIe TFP Hardware JP3 is the DAC voltage range switch. When the jumper is OFF, the DAC voltage is 0-5 VDC; when ON the voltage is 0-10 VDC. Both oscillators that are offered for this board have 0-5 VDC control voltage ranges, therefore the 2mm jumper is not factory installed.
  • Page 26 1.1. Introduction Figure 1-5: Antenna parts The antenna is housed in completely waterproof packaging designed to withstand the elements. When the four UNC 4-40 screws are loosened, the antenna module detaches as shown below, expos- ing the TNC connector. Figure 1-6: Antenna with TNC connector Warning: Models bc637PCI-V2 and bc637PCIe supply +5 VDC to the antenna.
  • Page 27: Installation

    1. PCI/PCIe TFP Hardware General Specifications for the Antenna Operating Temperature -40°C to +85°C (-40°F to +185°F) Storage Temperature -40°C to +100° C (-40°F to +212°F) Humidity 100% condensing Power 30 mA @ 5 V (supplied by card) Cable Specifications for the Antenna Cable Type RG-59 (Belden 9104) Length...
  • Page 28: Installing The Card And Antenna

    Installation is as easy as choosing a vacant PCI or PCIe slot, plugging in the Symmetricom Time and Frequency Processor (TFP) and installing the device driver. Be sure to consult the user doc- umentation that came with your particular workstation for any specific installation instructions.
  • Page 29: Antenna Location And Installation (Bc637Pci-V2 And Bc637Pcie)

    1. PCI/PCIe TFP Hardware 5. Set the full-height front panel aside and pick up the low-profile front panel. 6. Secure the GPS RF connector loosely to the front panel with its nut and washers. 7. Secure the TFP card loosely to the low-profile front oanel with the Phillip's #1 screw. 8.
  • Page 30: Permanent Antenna Installation

    1.2. Installation Permanent Antenna Installation A: Secure mast to pole or pipe B: Secure mast to mounting surface with pipe straps. Wood mounting - Drill hole with #43 bit and install with a #10 wood screw. Drywall/Masonry - Drill hole with 1/4 “bit, Insert #10 screw anchor. Then install the #10 wood screws.
  • Page 31: Bc637Pci/Pcie Additional Hardware

    25 MB disk space 1.2.5. Installation Under Windows 1. With the PC turned off, insert the Symmetricom TFP in an open slot. Use good ESD pro- tection practices when installing the card. 2. Boot the PC. After login, Windows may prompt you to install newly found hardware. Dis- regard/cancel this dialog box.
  • Page 32: Linux Software Development Kit

    This SDK allows the user to create customized applications to use with the Symmetricom TFP cards with a minimum amount of time and effort. The SDK is an easy to integrate and highly reliable alternative to writing lower level code to access a TFP card’s reg- isters directly.
  • Page 33: Solaris Software Development Kit

    Usage of the TFP under other operating systems may require a special driver for the device. Please contact Symmetricom for source code availability. With the wide variety of machines and operating systems that support the PCI(e) bus, it is not practical for Symmetricom to develop drivers for use in all of these environments.
  • Page 34: Mode 0 (Time Code Mode)

    1.3. Functional Description Code and GPS Mode, this major time is readily available, but in the Free Running and External 1 PPS Modes, major time is not available and must be set manually by the user. The Timing Mode is selected via the dual-port RAM interface as described in "Command 0x10: Set TFP Timing Mode"...
  • Page 35: Time Capture Registers

    1. PCI/PCIe TFP Hardware satellites to obtain accurate time for the TFP card. If however, the user's position is accurately known, or has been previously determined, the position information can be sent to the TFP’s GPS receiver, enabling GPS lock from just one satellite. Time Capture Registers The TFP supports four independent sets of time capture registers.
  • Page 36: Dds Output

    1.3. Functional Description Setting the periodic output frequency to less than 1 Hz and using Synchronous Mode will cause the periodic output to be held at a logic high level. When a rate below 1PPS is desired, Asynchronous Mode must be used. Values of 0 or 1 for either n1 or n2 will also cause the periodic output to be held at a logic high level in either Synchronous or Asynchronous Modes.
  • Page 37: Divider Mode

    1. PCI/PCIe TFP Hardware Divider Mode The divider can be used to generate low or fractional frequencies. The divide range is 1E0 through 1E7 in decades. The divider will also allow for fractional frequency outputs where the divider's input source is decimal shifted by up to seven places. The divider has another selectable mode, Period Mode.
  • Page 38: Time Coincidence Strobe Output

    1.3. Functional Description 1.3.4. Time Coincidence Strobe Output The TFP provides one Time Coincidence Strobe Output signal. The Strobe output is like an alarm that is activated at some preprogrammed time. The Strobe time can be set from days through micro- seconds.
  • Page 39: Calibration Procedure

    1. PCI/PCIe TFP Hardware input reference. Modulation ratio, carrier frequency, impedance loading, and other effects may degrade time code performance accuracy. Some applications require very high synchronization accu- racy while using AM time codes as a reference. The following calibration procedure helps assure the best time code synchronization accuracy.
  • Page 40: Field Upgrade Of Embedded Program

    1.3. Functional Description 1.3.9. Field Upgrade of Embedded Program New versions of the bc63xPCI-V2 (identifiable by the status LED on the front panel) and the bc63xPCIe cards are upgraded over the host PC’s PCI or PCIe bus. Included on the product CD is the update program named bcUpgFmware.exe.
  • Page 41 1. PCI/PCIe TFP Hardware Data:8 bit Parity:none Stop:1 bit Flow control:none Transmit delay: Setup/Terminal... New-line Receive:CR Transmit:CR Local echo: not selected After plugging in the DIN serial port adapter that is connected to a serial port running TeraTerm as con- figured above, the following string should be output to the terminal screen: <E>rase , <P>rogram or <R>un Application: - 24 -...
  • Page 42 1.3. Functional Description 1. Select <E> to erase the Flash, then select again after the message <Erased> has been returned. 2. Select <P>. Use File/Send file... (in Tera Term pulldown), a dialog box appears to select the file that is to be sent (e.g. bc635-v2.sx). The file should begin transferring with a string of aster- isks being sent back to the terminal screen until the file transfer is complete (approximately 408KB).
  • Page 43: Device Registers

    1. PCI/PCIe TFP Hardware 1.4. Device Registers 1.4.1. General The Time & Frequency Processor (TFP) is controlled by a combination of hardware device registers and a dual-port RAM interface. This chapter describes the TFP device registers. "1.5. Dual-Port RAM Interface" on page 35 describes the dual-port RAM interface. 1.4.2.
  • Page 44: Tfp Device Register Summary

    1.4. Device Registers TFP Device Register Summary Offset Type Reset Label Description 0x00 See Note TIMEREQ Time Request (TIME0-1) 0x04 See Note EVENTREQ Event Request (EVENT0-1) 0x08 See Note UNLOCK1 Release Lockout Event1 0x0C See Note UNLOCK2 Release Lockout Event2 0x10 CONTROL Control Register...
  • Page 45: Unlock1 Register (0X08)

    1. PCI/PCIe TFP Hardware EVENTREQ register does not generate an Event Input interrupt. UNLOCK1 Register (0x08) Accessing this register (with a read or write operation) releases the EVENT1 time capture lockout function if it has been enabled, allowing the Event Input or Periodic/DDS Output to capture a new time.
  • Page 46: Control Register

    1.4. Device Registers CONTROL Register Name Function EVENT1 Capture Lockout Enable LOCKEN 1 0 = Disable Lockout 1 = Enable Lockout EVENT1 Time Capture Register Source Select 0 = Event Input EVSOURCE 1 = Periodic/DDS (Select Active Edge With EVSENSE) Event1 Edge Select EVSENSE1 0 = Rising...
  • Page 47: Ack Register (0X14)

    1. PCI/PCIe TFP Hardware Name Function 1 = Enable Lockout Event2 Edge Select EVSENSE2 0 = Rising 1 = Falling Event2 Capture Enable EVENTEN2 0 = Disable 1 = Enable Reserved EVENT3 Capture Lockout Enable LOCKEN3 0 = Disable Lockout 1 = Enable Lockout Event3 Edge Select EVSENSE3...
  • Page 48: Mask Register (0X18)

    1.4. Device Registers page 43 for more information on the format and use of this register. MASK Register (0x18) The TFM supports the seven interrupt sources listed in the following table. Each interrupt source can be individually masked on or off using the MASK register (0x18). Each interrupt source sets a cor- responding bit in the INTSTAT register (0x1C) when the interrupt occurs.
  • Page 49: Event2_0 (0X28) - Event2_1 (0X2C) Registers

    1. PCI/PCIe TFP Hardware nificant bits of the major time are used (in addition to microseconds), this allows the user to program the Strobe to become activated up to 48 days beyond the current time. Note: Disable the Strobe output (see CONTROL register) while programming the Strobe time to pre- vent spurious Strobe output pulses.
  • Page 50 1.4. Device Registers each cell in Table 2 and Table 3 define the bit positions for each data field. All undefined bit positions in Table 3 are N/A. Table 2. TFP Binary Time Format Register Data Bits 31-28 27-24 23-20 19-16 15-8 TIME1...
  • Page 51: Status Bits

    1. PCI/PCIe TFP Hardware Register Data Bits 31 - 28 27-24 23-20 19-16 15-8 TIME1_ Hours EVENT1 Days (0-366) (0 - 23) (0 - 59 ) (0 - 59) EVENT2_1 Bits 7 - 0 20 - 16 12 - 8 5 - 0 EVENT3_1 31 - 24...
  • Page 52: Status Bits Summary

    1.5. Dual-Port RAM Interface Status Bits Summary Description Tracking (T) 0: Locked To Selected Reference 1: Flywheeling (Not Locked) Phase (P) 0: < X Microseconds 1: > X Microseconds X = 5 (Mode 0) X = 2 (All Other Modes) Frequency (F) 0: <...
  • Page 53: General

    1. PCI/PCIe TFP Hardware 1.5.1. General The byte-wide dual-port RAM (DPRAM) interface provides a communications pathway between the user and the Time & Frequency Processor (TFP) micro-controller (MPU). The RAM size is 2Kx8. The ACK register is used in conjunction with the DPRAM to avoid data contention when a memory loca- tion is accessed simultaneously from both sides of the DPRAM.
  • Page 54: Ack Bit 0

    1.5. Dual-Port RAM Interface ACK Bit 0 Set by the TFP to acknowledge the receipt of a user command from the DPRAM Input Area. The user can clear this bit by writing to the ACK register with bit 0 set, but cannot set this bit. ACK Bit 2 Set by the TFP to indicate that a GPS packet is available in the DPRAM GPS Packet Area.
  • Page 55 1. PCI/PCIe TFP Hardware 4. Wait for the TFP to set bit 0 of the ACK register. Do not begin writing another command to the Input Area until this bit becomes set. Windows example (uses bc635PCIcfg.exe GUI): Set the Periodic rate output to 10KPPS and Synchronous Mode. Select the Advanced Menu.
  • Page 56 1.5. Dual-Port RAM Interface - 39 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 57: Dpram Command Summary

    1. PCI/PCIe TFP Hardware DPRAM Command Summary Reset Command 0x10 Set TFP Timing Mode 0x11 Set Time Register Format (1 = binary, 0 = bcd) 0x12 Set Major Time 0x13 Set Year 0x14 Set Periodic Output 0x15 Set Input Time Code Format 0x16 Set Input Time Code Modulation 0x17...
  • Page 58: Command 0X10: Set Tfp Timing Mode

    1.5. Dual-Port RAM Interface RTC: Real Time Clock (Restored at Power-on) NV: Non Volatile (Restored at Power-on) Command 0x10: Set TFP Timing Mode This command selects the timing mode of the TFP. Byte Type Item Value or Range UINT8 0x10 UINT8 Timing Mode See Below...
  • Page 59: Command 0X12: Set Major Time

    1. PCI/PCIe TFP Hardware Command 0x12: Set Major Time This command allows the user to load the major time to the TFP Major Time Registers in binary (UNIX) or BCD format. The format is determined by Command 0x11 as referenced above. The default major time format is UNIX binary time.
  • Page 60: Command 0X14: Set Periodic Output

    1.5. Dual-Port RAM Interface Command 0x14: Set Periodic Output This command establishes the frequency of the TFP Programmable Periodic Output. "1.3.2. Heart- beat Output" on page 18 describes the relationship between the dividers n1, n2 and the Periodic Out- put frequency. Byte Type Item...
  • Page 61: Command 0X16: Set Input Time Code Modulation Type

    1. PCI/PCIe TFP Hardware Note that AM time codes with carrier frequencies less than 1 KHz (IRIG E111, 2, 5, 6 @ 100 Hz and XR3 @ 250 Hz) will decode properly but will not necessarily maintain short term phase and frequency lock.
  • Page 62: Command 0X18: Request Utc Time Data (Bc637 Only)

    1.5. Dual-Port RAM Interface Command 0x18: Request UTC Time Data (bc637 only) This command queries current GPS and UTC time information derived from the GPS receiver. This command must be used in conjunction with Command 0x19. Byte Type Item Value or Range UINT8 0x18 UINT8...
  • Page 63: Command 0X1A: Software Reset

    1. PCI/PCIe TFP Hardware 0x1C Generator Time Offset 0x1D Local Time Offset 0x1E Leap Second Setting 0x1F TFP Firmware Information 0x20 Clock Source (on-board/external) 0x21 Jamsync Control 0x24 DAC Value 0x26 Battery Connection Status 0x4F FW Revision 0xF4 Assembly Number 0xF5 Hardware Revision 0xF6 TFP Model 0xFE Serial Number...
  • Page 64 1.5. Dual-Port RAM Interface Format1 Format2 ASCII Time Code DCLS 0x42 0x34 'B4' B124 BCD, YR, CF, SBS B004 0x42 0x35 'B5' B125 BCD, YR, CF B005 0x42 0x36 'B6' B126 BCD, YR B006 0x42 0x37 'B7' B127 BCD, YR, SBS B007 0x42 B122...
  • Page 65: Command 0X1C: Set Generator Time Offset

    1. PCI/PCIe TFP Hardware For Legacy TrueTime IRIG B, the following CF bits are encoded: Index Bit count name ----- ----- unlock (1 = unit not locked to reference) (1 = timing error estimate > 1us) (1 = timing error estimate > 10us) (1 = timing error estimate >...
  • Page 66: Command 0X1D: Set Local Time Offset

    1.5. Dual-Port RAM Interface Command 0x1D: Set Local Time Offset This command adds/subtracts local time offset to the TFP time. This command affects the TFP time only; the generator time is not affected. (See Command 0x1C.) Byte Type Item Value or Range UINT8 0x1D UINT16...
  • Page 67: Command 0X20: Select Clock Source

    1. PCI/PCIe TFP Hardware x .21= bc637 x.22 = bc635 + OCXO x.23 = bc637 + OCXO Year Example: Byte5 = 0x07, Byte6 = 0xd9 => 0x7d9 = 2009 Command 0x20: Select Clock Source This command selects the clock source for the TFP. The TFP uses a time base frequency of 10 MHz.
  • Page 68: Command 0X24: Load Dac

    1.5. Dual-Port RAM Interface Command 0x24: Load DAC The TFP’s 10MHz oscillator frequency is voltage controlled using the output from a 16-bit DAC. This command allows the user to directly load a 16-bit value to the DAC. This feature allows the user to fine tune the TFP time base when operating in the Free Running Mode.
  • Page 69: Command 0X27: Synchronize Rtc To External Time Data

    1. PCI/PCIe TFP Hardware Command 0x27: Synchronize RTC to External Time Data This command forces the TFP to synchronize the RTC time to the current time. Note that when the TFP is locked to a timing reference, the RTC is adjusted automatically. Command 0x28: RTC Battery Connection Control This command controls the connection/disconnection of the RTC battery.
  • Page 70: Command 0X40: Observe Local Time Flag

    1.5. Dual-Port RAM Interface GPS time format flag: 0 = UTC (default) 1 = GPS Time Command 0x40: Observe Local Time Flag This command programs the local time observed flag. If the local time flag is enabled, the TFP adjusts its time by the local time offset. Note that the Generator Time is also affected by this setting. See Command 0x1d for programming local time offset.
  • Page 71: Command 0X43: Select Periodic Or Dds Output

    1. PCI/PCIe TFP Hardware Command 0x43: Select Periodic or DDS Output This command selects the signal that is output on P1 pin 15. This output may be either the Periodic (heartbeat) signal or the DDS (frequency synthesizer) signal. Note that this selection is restored at power-up from NV memory.
  • Page 72: Command 0X46: Dds Divide Source

    1.5. Dual-Port RAM Interface 0= divide by 1, 1= divide by 10, 2= divide by 100, 3= divide by 1000, 4= divide by 10000, 5= divide by 100000, 6= divide by 1000000, 7= divide by 10000000 F = divide by value in Period Register (when selected, refer to command 49) Command 0x46: DDS Divide Source The frequency synthesizer's divide chain has 3 possible input sources.
  • Page 73: Command 0X48: Dds Multiplier Value

    1. PCI/PCIe TFP Hardware Command 0x48: DDS Multiplier Value The DDS frequency synthesizer has the ability to multiply its output by 1, 2, 3, 4, 6, 8, 10 or 16. Note that the DDS frequency must be high or low enough for the multiplier to operate correctly (see Input Range in MHz below).
  • Page 74: Command 0X4F: Pci Firmware Part Number (Request Only)

    1.5. Dual-Port RAM Interface Byte Type Item Value or Range UINT8 0x49 UINT32 DDS val 0x0 to 0x3FFFFFFF Refer to section 1.3.3. DDS Output for details and an example on setting the DDS tuning word. Note that the output of the DDS circuitry is capable of creating interrupts. Command 0x4F: PCI Firmware Part Number (request only) This command allows the user to request the TFP firmware part number.
  • Page 75: Command 0Xfe: Tfp Serial Number (Request Only)

    1. PCI/PCIe TFP Hardware Command 0xFE: TFP Serial Number (request only) This command queries the TFP serial number. Use this command in conjunction with Command 0x19. Byte Type Item Value or Range UINT8 0xf7 UINT32 0x00 - 0xffffffff 1.6. Inputs and Outputs 1.6.1.
  • Page 76: Bc635Pcie And Bc637Pcie Accessories

    1.6. Inputs and Outputs 1.6.2. bc635PCIe and bc637PCIe Accessories Signal Breakout Kit The Symmetricom model bc63x PCI/PCIe Signal Breakout Board is a development tool for use with the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processors (TFP) boards. The Signal Breakout Boards provide a user-friendly interface by providing BNC connections to most of the I/O signals with the exceptions being the 10 MHz external oscillator input and the external oscil- lator voltage control output, which are available on a 3-pin Molex connector.
  • Page 77 1. PCI/PCIe TFP Hardware Figure 1-11 Large Breakout Board (top), and Small Breakout Board (bottom) Figure 12: Large Breakout Board schematic - 60 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 78: Breakout Cables

    1.6. Inputs and Outputs Figure 1-13 Small Breakout Board schematic Breakout Cables Breakout cables with connectors simply access to the in and out timing signals of the PCIe card. These labeled cables mitigate the need to create special cables during project develoment and assure the correct timing signals are being accessed.
  • Page 79 1. PCI/PCIe TFP Hardware "D" to 6-BNC Breakout Cable, see cable (C) below for signal information "D" to 5-BNC Breakoput Cable, see cable (A and B) below for signal information - 62 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 80: Timing Input/Output Breakout Cable And Patch Panel Bnc Map

    1.7. GPS Receiver Interface Timing Input/Output Breakout cable and Patch Panel BNC Map "D" to "D" to "D" to Patch/ 5-BNC 5-BNC 6-BNC Breakout Outputs Time Code (AM) Time Code (DCLS) 1, 5, 10 MHz Heartbeat/DDS Strobe 1 PPS Oscillator Control Voltage Inputs Time Code (AM) Time Code (DCLS): Event2...
  • Page 81: Gps Timing Mode (Mode 6) Characteristics

    1. PCI/PCIe TFP Hardware 1.7.2. GPS Timing Mode (Mode 6) Characteristics The 1 PPS signal generated by the GPS Receiver provides the timing reference for all timing func- tions. The 10 MHz oscillator is disciplined to the GPS 1 PPS signal whenever the receiver is tracking a sufficient number of satellites.
  • Page 82: Receiving Gps Data Packets From The Gps Receiver

    1.7. GPS Receiver Interface Byte Type Item Value or Range UINT8 command ID 0x30 UINT8 packet length 1 - 255 UINT8 packet ID 0x00 - 0xFF 3 - N UINT8 packet data bytes 0 - 255 GPS packet data consists of various integer and floating-point data types. The user must convert these data types to an array of bytes.
  • Page 83 1. PCI/PCIe TFP Hardware TFP to retrieve a packet from the GPS receiver. GPS packets that are monitored by the TFP are iden- tified below. Packet ID Monitored Packet Description 0x41 GPS Time 0x42 Single-Precision Position Fix, XYZ ECEF 0x43 Velocity Fix, XYZ ECEF 0x44 Satellite Selection...
  • Page 84: Manually Request Packet From Gps Receiver (Command 0X32)

    1.7. GPS Receiver Interface Manually Request Packet from GPS Receiver (Command 0x32) This command is a hybrid of commands 0x30 and 0x31. With this command the user specifies the packet length and ID of a packet sent by the receiver (response packet) and specifies the packet length, ID, and data for the packet to be sent to the receiver (request packet.) The TPF sends the request packet to the receiver and transfers the response packet to the DPRAM GPS Packet Area when it arrives.
  • Page 85: Position Fix Modes

    (the timing functions will continue unimpaired). It is good therefore, to enter a static dynamics code if the sensor is static. Symmetricom recommends using this static mode if the card is not on a moving installation. Position Fix Mode 1 In this mode, a user-specified satellite is used for timing functions.
  • Page 86: Set Operating Parameters (Gps Packet 0X2C)

    1.9. Legacy and New Generation Cards Set Operating Parameters (GPS packet 0x2C) Packet Data Item Value Packet ID 0x2c Dynamics Code 4 (Static) Elevation Angle Mask 0.1745 Radians (10 Degrees) Signal Level Mask PDOP Mask 12.0 PDOP Switch Set High-8 / High-6 Mode (GPS packet 0x75) Packet Data Item Value Packet ID...
  • Page 87: Pci Bar Mapping

    Serial port download for early versions of bc635PCI-V2 and bc637PCI-V2. Field program Through the host PCI(e) bus for later models of Replace flash update bc635PCI-V2, bc637PCI-V2, and all models of bc635PCIe, and bc637PCIe. OCXO option +12V OCXO option sine wave...
  • Page 88 1.9. Legacy and New Generation Cards The user is no longer required to enter UNIX seconds of Leap Event when manually entering Leap Seconds settings. The PCI-V2 and PCIe cards use Year and Time of Year information to determine when Leap Events will occur. - 71 - Artisan Technology Group - Quality Instrumentation ...
  • Page 89: Windows Application Programs

    2. Windows Application Programs 2. Windows Application Programs 2.1. bc635PCIcfg.exe Windows Application Program 2.1.1. General Configuration programs bc635PCIcfg.exe, bc637PCIcfg.exe and a System Clock Utility Tray- Time.exe are included with the TFP module. When installing the SW from the supplied CD as described in "1.2.5. Installation Under Windows " on page 14, the installer will create a folder in 'program files' titled 'bc635PCI Configuration Software' containing bc635PCIcfg.exe, TrayTime.exe, and bc635pciReadEvent.exe.
  • Page 90 2.1. bc635PCIcfg.exe Windows Application Program Figure 2-1: bc637 set to GPS mode Figure 2-2: bc635 set to Time Code mode - 73 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 91: Bc637Pcicfg Program Menu Interface

    2. Windows Application Programs 2.1.3. bc637PCIcfg Program Menu Interface Figure 2-3: bc637PCIcfg Program File Menu The File menu group provides a few common functions associated with Windows applications. Refer to Figure 2-3 File > Open Device Each instance of the bc635PCIcfg.exe program communicates with only one device at a time. Open Device allows the user to open and operate any of up to four installed TFP devices.
  • Page 92: Time Menu

    2.1. bc635PCIcfg.exe Windows Application Program Time Menu The Time menu group, see Figure 2-4, provides access to functions that control how the TFP main- tains time data. These functions allow the user to select where to obtain time data, whether or not to manipulate the time data and how to present the time data.
  • Page 93 Get Binary Time where 25 consecutive requests are made to the event register. This func- tion is designed to display binary data. The bc635PCI-V2 & bc637PCI-V2 card should be set to the binary time format when executing this function. If the decimal Time Register Format is selected, the major time (in front of the decimal point) will be garbled.
  • Page 94 2.1. bc635PCIcfg.exe Windows Application Program decoding mode, a long cable run may result in the input time code having a propagation delay. The delay value is programmable in units of 100 ns and has an allowed range from -4000000 (advance by 400 ms) through +4000000 (retard by 400 ms).
  • Page 95: Time Code Menu

    2. Windows Application Programs presented as information points via the UTC Data button. These values include UTC Control, leap second count, leap second event data and leap second event time. Settings are: Timing Mode Time Format Current Year Local Offset Propagation Delay Daylight Saving Flag Local time Flag...
  • Page 96: Signals Menu

    2.1. bc635PCIcfg.exe Windows Application Program Time Code > Generate The Generate menu selection allows the user to select the time code format that will be generated by the TFP. See "Command 0x1B: Set Time Code Output Format" on page 46 for supported time codes. Detailed performance specifications are outlined in "1.1.4.
  • Page 97 2. Windows Application Programs Signals > Heartbeat The Heartbeat function allows the user to command the TFP to produce a clock signal at a specified frequency. The heartbeat signal, also referred to as a periodic pulse output (PPO), periodic or pro- grammable periodic, may be either synchronous or asynchronous to the TFP's 1PPS epoch.
  • Page 98: Hardware Menu

    2.1. bc635PCIcfg.exe Windows Application Program Signals > Frequency The Frequency function allows the user to control the frequency signal output by the TFP. The avail- able frequencies are 1, 5 and 10 MHz. See the CONTROL Register described in "CONTROL Reg- ister (0x10)"...
  • Page 99: Special Menu

    2. Windows Application Programs Figure 2-7: Hardware Menu Hardware > Set Osc Parameters The Set Osc Parameters function allows the user to select an external oscillator or the on-board oscil- lator, in addition to enabling/disabling disciplining and jamsyncing. Oscillator selection and control is described in more detail in "1.5.
  • Page 100 2.1. bc635PCIcfg.exe Windows Application Program Figure 2-8: Special Menu Special > Registers The Registers function is provided to perform direct reads and writes to the TFP registers. While most of the functionality available through the registers can be controlled via other aspects of the con- figurator program, this function may be useful for debugging purposes.
  • Page 101 2. Windows Application Programs Figure 2-9: Special Menu Selecting the advanced Special Menu, opens several new selections: Special > DP RAM DP RAM allows reading, writing hex offsets, and values to the dual port RAM. Special > Packet Offset Displays the following packet information Special >...
  • Page 102: Pci Menu

    2.1. bc635PCIcfg.exe Windows Application Program may also be used to review the PCI mapping of the device onto the bus. The interrupt level selected during PCI configuration may also be reviewed. PCI Menu In addition to the additional Special Menu selections, a new menu choice PCI is available when the Advanced Menu is selected.
  • Page 103: Help Menu

    2. Windows Application Programs Help Menu Figure 2-11 Program Version: shows the versions of the running program. Firmware Version: retrieves the firmware version from the TFP. Hardware Version: retrieves the hardware version from the TFP. Software Driver Version:shows the version opf the driver that is loaded. - 86 - Artisan Technology Group - Quality Instrumentation ...
  • Page 104: Bc637Pcicfg.exe Windows Application Program

    2.2. bc637PCIcfg.exe Windows Application Program 2.2. bc637PCIcfg.exe Windows Application Program 2.2.1. General In addition to the configuration program (bc635PCIcfg.exe), and the System Clock Utility (Tray- Time.exe), the TFP includes a GPS configuration program (bc637PCIcfg.exe). When installing the SW from the supplied CD, as described in "1.2.5. Installation Under Windows " on page 14, the installer will create a folder in 'program files' titled 'bc637PCI configuration Software' containing bc635PCIcfg.exe, bc637PCIcfg.exe, TrayTime.exe, and bc635pciReadEventexe.
  • Page 105: Bc637Pcicfg.exe Program Menu Interface

    2. Windows Application Programs Figure 2-14: bc637 Counting Time in Flywheel State 2.2.3. bc637PCIcfg.exe Program Menu Interface Figure 2-15: File File Menu The File menu group provides a few common functions associated with Windows applications. File > Open Each instance of bc637PCIcfg is designed to communicate with only one device at a time. Open allows the user to open and operate any of up to four installed TFP cards.
  • Page 106 2.2. bc637PCIcfg.exe Windows Application Program File > Save This command allows the user to save the values to the GPS receiver located under “Save > Save variable”. For more information on the GPS variables, see: GPS Receiver Interface. Figure 2-16: File Save File >...
  • Page 107: Time Menu

    2. Windows Application Programs Time Menu The Time menu group, see Figure 2-18, provides access to functions that control how the TFP card maintains time data. These functions allow the user to select where to obtain time data, whether or not to manipulate the time data, and how to present the time data.
  • Page 108: Status Menu

    2.2. bc637PCIcfg.exe Windows Application Program Status Menu The Status menu group, (see Figure 2-19), provides access to the GPS data packets that provide the GPS receiver status data. These commands access the data packets that return packets 46, 47 and 4F (as described in GPS Receiver Interface).
  • Page 109: Position Menu

    2. Windows Application Programs Figure 2-20: Mode Menu: Set Board Mode Position Menu The Position menu group, (see Figure 2-21) provide access to position data from the GPS receiver. Both LLA and XYZ position formats are supported. These packets are addressed in more detail in: GPS Receiver Interface, packets 0x2B, 0x31, 0x42, and 0x4A.
  • Page 110: Request Menu

    2.2. bc637PCIcfg.exe Windows Application Program Figure 2-22: Options Menu Request Menu The Request menu group, (see Figure 2-23) provide access to data from the GPS receiver. These commands are described in more detail in GPS Receiver Interface, packets 0x40, 0x4C, and 0x4D. Figure 2-23: Request Menu Request >...
  • Page 111: Send Menu

    2. Windows Application Programs This packet provides several operating parameters for the GPS receiver, and includes the dynamics code, elevation angle mask, signal level mask, and PDOP mask. These parameter formats are described in GPS Receiver Interface, packet 0x4C. Send Menu The Send menu group, (see Figure 2-24), allows the user to set the 2-D altitude and receiver operating parameters on the GPS receiver.
  • Page 112: Reset Menu

    2.2. bc637PCIcfg.exe Windows Application Program Reset Menu The Send menu group commands, (see Figure 2-25) are used to reset various components on the TFP card and the GPS receiver. Figure 2-25: Reset menu Reset > Board Reset This command will reset the TFP card per the DPRAM command 0x1A, and is described in "Com- mand 0x1A: Software Reset"...
  • Page 113: Help Menu

    2. Windows Application Programs Help Menu The Help menu group provide access to data from the TFP hardware and GPS receiver. Figure 2-26: Help Menu Help > Board Firmware Version The Board Firmware Version command returns information from the TFP firmware. For the firmware data format, see "Command 0x4F: PCI Firmware Part Number (request only)"...
  • Page 114: Traytime Windows Application Program

    2.3. Traytime Windows Application Program 2.3. Traytime Windows Application Program This utility is designed to operate under Microsoft Windows XP/Vista. This system tray utility will query the TFP and set the system clock on a periodic basis. Double click on the “TrayTimeCPP.exe” to install.
  • Page 115: Traytime Dialog Windows 98

    2. Windows Application Programs Note: TrayTime assumes that the time read from the hardware is Universal Time Coordinate (UTC) based, and will adjust the hardware time with the machine's local time-zone offset. 2.3.3. TrayTime Dialog Windows Main Window Figure 2-28: TrayTime main window OK: Minimizes the utility into the Windows System Tray.
  • Page 116: Traytime Setup - Status Window

    2.3. Traytime Windows Application Program TrayTime Setup - Status Window Figure 2-29: Status Window Hardware Source: Shows the selected Hardware type used for time synchronization. Hardware Mode: Shows the selected Hardware mode. Current Status: Shows the current update status. If status is: “Waiting for the board to acquire time” then machine's time is not synchronized to the reference hardware since the reference hardware is not tracking an external time source.
  • Page 117: Traytime Setup - Configuration Window

    2. Windows Application Programs TrayTime Setup - Configuration Window Figure 2-30: Configuration Window Hardware Source: The TrayTime utility supports the listed 8- types of hardware sources. Mode Selection: The TrayTime utility supports setting the mode on the selected hardware. Note: “GPS Mode” is only available on GPS capable devices. Windows Service: Check this option to run the TrayTime utility as a Windows service.
  • Page 118: Windows Sdk

    3.1.2. Features The main features of the Software Developer's Kit include: API interface library with access to all features of the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor. Example application programs, with source code, utilizing the API interface library.
  • Page 119: Release Notes

    The interface API library provides an abstraction layer between the application programs and the device driver. This allows Symmetricom to advance the Time and Frequency Processor hardware fea- tures while protecting your investment in application development at the same time.
  • Page 120: Driver Packages

    3.2. Release Notes Driver Packages Driver packages for all supported Windows operating systems are available in the ‘Driver’ directory under the program installation folder. You can use the ‘Add Hardware’ control panel applet later to rein- stall the driver package. Make sure you instruct the ‘Add Hardware’ wizard to search for .inf file in the driver package directory that matches your running Windows operating system.
  • Page 121: Api Calling Convention

    3. Windows SDK API Calling Convention In previous releases, the API functions use __cdecl calling convention. In this release, the API func- tions use __stdcall calling convention. The reason for the change is to allow application development using Visual Basic. Visual Basic programs can only access exported DLL functions using __stdcall calling convention.
  • Page 122: Configuration

    Windows system directory. If a device open error is returned, the hardware interface was not installed or configured properly. Ver- ify that the correct driver was installed according to the guidelines in the “bc635PCI-V2, bc637PCI-V2 Users Guide”.
  • Page 123: Microsoft Visual Studio 2008

    The interface library provides functions for each of the programming packets supported by the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor. In addi- tion, functions are provided to both read and write individual registers and Dual Port RAM locations on the card.
  • Page 124: Windows Sdk Command Finder

    3.4. Library definitions Windows SDK Command Finder [caption] Windows SDK Functional Command Summary "bcStartPCI" on page 109 Opens the underlying hardware layer. "bcStopPCI" on page 109 Closes the underlying hardware layer. "bcGetReg" on page 110 Returns the contents of the requested register. "bcSetReg"...
  • Page 125 3. Windows SDK Windows SDK Functional Command Summary Programs the board time code generator to operate at an "bcSetGenOff" on page 120 offset from UTC. "bcSetJam" on page 120 Modifies the internal oscillator frequency control algorithm. "bcSetDis" on page 121 Modifies the internal oscillator frequency control algorithm.
  • Page 126: Functions

    3.4. Library definitions Windows SDK Functional Command Summary "bcSetDDSDivider" on page 130 This command sets the DDS divider for DDS output. This command sets the DDS divider source for DDS out- "bcSetDDSDividerSource" on page 130 put. This command sets the DDS synchronization mode for "bcSetDDSSyncMode"...
  • Page 127 3. Windows SDK bcGetReg Prototype int bcGetReg (UINT offset, ULONG *data); Packet Offset = 0 based offset of requested register.. Input Parameter Data = pointer to unsigned long to return value requested. RC_OK On Success Returns RC_ERROR On Failure Description: Returns the contents of the requested register. Note: This command operates on the LCA registers (status/config registers).
  • Page 128 3.4. Library definitions bcSetDPReg Description: Sets the contents of the requested register. Note: This command operates on the Dual Port Memory (packet interface). ReadBinTime int bcReadBinTime (ULONG *major, ULONG *min, UCHAR * Prototype stat); Packet major = unsigned long pointer to store major time (Unix format). Input Parameter min = unsigned long pointer to store microseconds.
  • Page 129 3. Windows SDK bcReadDecTime int bcReadDecTime (struct tm *ptm, ULONG *min, UCHAR Prototype *stat); Packet ptm = pointer to tm struct to store major time (calendar format). Input Parameter min = pointer to unsigned long to store microseconds. stat = pointer to unsigned char to store status bits. RC_OK On Success Returns RC_ERROR On Failure...
  • Page 130 3.4. Library definitions ReadBinTimeNoSync major = unsigned long pointer to store major time (Unix format). Input Parameter min = unsigned long pointer to store microseconds. stat = unsigned char to store status bits. RC_OK On Success Returns RC_ERROR On Failure Description: Latches and returns time captured from the time registers.
  • Page 131 3. Windows SDK ReadDecTimeExNoSync int bcReadDecTimeExNoSync (struct tm *ptm, ULONG *min, USHORT Prototype *nano, UCHAR *stat); Packet ptm = pointer to tm struct to store major time (calendar format). min = pointer to unsigned long to store microseconds. Input Parameter nano = pointer to unsigned short to store 100 nano seconds count.
  • Page 132 3.4. Library definitions bcSetBinTime Input Parameter newtime = unsigned long time value to set (Unix format). Returns RC_OK On Success RC_ERROR On Failure Description: Sets the major time buffer. bcSetBCDTime Prototype int bcSetBCDTime (struct tm stm); Packet 0x12 Input Parameter stm = tm struct containing new time values to set.
  • Page 133 3. Windows SDK bcCommand WARMSTART 0x01 RC_OK On Success Returns RC_ERROR On Failure Description: Sends reset command to the board. bcSetDac Prototype int bcSetDac (INT dacval); Packet 0x24 int dacval = new d/a value to modify frequency of internal oscillator. Allowed Input Parameter values 0x0000 - 0xffff.
  • Page 134 3.4. Library definitions bcSetTcIn Prototype int bcSetTcIn (UCHAR format, UCHAR type); Packet 0x15, 0x16 Unsigned char format = time code format. Unsigned char type = modulation type of time code. Note: The following are defined in the "Bc637pci.h" header file; format #define TCODE _IRIG _A 'A' Input Parameter...
  • Page 135 3. Windows SDK bcSetGenCode #define TCODE _GEN _I 'I' RC_OK On Success Returns RC_ERROR On Failure Description: Sets the time code generator format. bcSetLocOff Prototype int bcSetLocOff (INT Offset, UCHAR half) Packet 0x1D INT Offset = hours from input time source. (-16 - +16). UCHAR half = half hour increment Input Parameter 0: No Half Hour increment...
  • Page 136 3.4. Library definitions bcReqTimeCodeData Prototype int bcReqTimeCodeData (TimeCodeData *pdata); Packet 0x19 pdata = pointer to TimeCodeData structure. Input Parameter The structure is defined in the "Bc637pci.h" header file. RC_OK On Success Returns RC_ERROR On Failure Description: Returns timecode data from the board. Note: See the header file for TimeCodeData structure to understand values being returned.
  • Page 137 3. Windows SDK bcReqManufData Description: Returns manufacture data from the board. Note: See the header file for ManufData structure to understand values being returned. bcSetGain Prototype int bcSetGain (INT gain); Packet 0x25 Input Parameter int gain = oscillator control filter gain value. RC_OK On Success Returns RC_ERROR On Failure...
  • Page 138 3.4. Library definitions bcSetDis Prototype int bcSetDis (INT dis_ctl); Packet 0x23 INT dis_ctl = 0 or 1 Input Parameter 0 = Oscillator Disciplining Disabled 1 = Oscillator Disciplining Enabled(default) RC_OK On Success Returns RC_ERROR On Failure Description: Modifies the internal oscillator frequency control algorithm. Note: This command is not required for standard operation of the device.
  • Page 139 3. Windows SDK bcYearAutoInc Packet 0x42 UCHAR year_inc = 0 or 1 Note: The following are defined in the "Bc637pci.h" header Input Parameter file; #define YEAR _AUTO _DIS (0) #define YEAR _AUTO _ENA (1) (default) RC_OK On Success Returns RC_ERROR On Failure Description: This function is deprecated.
  • Page 140 3.4. Library definitions bcSetLeapEvent CHAR flag = -1, 0, 1 -1 = Deletion of 1 second 0 = Disable Input Parameter 1 = Insertion of 1 second ULONG levent = Unix time since January, 1st 1970 RC_OK On Success Returns RC_ERROR On Failure Description: This command can be used in modes other than GPS mode for inserting or deletion of one leap second.
  • Page 141 UCHAR setting = module settings #define MODEL _ID 0x04/* IRIG or GPS Model */ #define CRYSTAL _ID 0x03/* Standard or Oven crystal */ ULONG password; Symmetricom will supply the password Input Parameter INT data; For Model ID #define SET_BC635 0x0635...
  • Page 142 3.4. Library definitions bcSyncRtc Input Parameter None RC_OK On Success Returns RC_ERROR On Failure Description: This command forces the TFP to Synchronize the RTC time to current time. bcDisRtcBatt Prototype int bcDisRtcBatt (void); Packet 0x28 Input Parameter None RC_OK On Success Returns RC_ERROR On Failure Description: This command disconnects the RTC IC from the Battery after power is turned off.
  • Page 143 3. Windows SDK bcGPSMan Packet 0x32 GpsPkt *ptrIn This structure commands information detailing the packet to send and the buffer where the data is stored. Input Parameter .GpsPkt *ptrOut This structure commands information detailing the packet to retrieve and the buffer where the data will be stored. RC_OK On Success Returns RC_ERROR On Failure...
  • Page 144 3.4. Library definitions bcStopInt Input Parameter None RC_OK On Success Returns RC_ERROR On Failure Description: Stops the interrupt thread and releases any used resources. Notes: * See IntrSamp.c that shows how to use interrupts. bcSetInts Prototype int bcSetInts (ULONG *mask, INT *latch); Packet ULONG *mask = pointer to mask to load into INTERRUPT MASK register.
  • Page 145 3. Windows SDK bcGetLastInts Prototype int bcGetLastInts (ULONG *lastInts); Packet None Input Parameter ULONG * lastInts = pointer to last signal interrupt. RC_OK On Success Returns RC_ERROR On Failure Description: Query the last signaled interrupt(s). Notes: See MultSamp.c for demonstration of this function. Multiple interrupts support is enabled using bcSetMultInts Note: Refer to Chaper 1 for more information regarding allowed values for the INTERRUPT MASK.
  • Page 146 3.4. Library definitions bcReqTimeCodeDataEx Prototype int bcReqTimeCodeDataEx (TimeCodeDataEx *pdata); Packet 0x19 pdata = pointer to TimeCodeDataEx structure. Input Parameter The structure is defined in the "Bc637pci.h" header file. RC_OK On Success Returns RC_ERROR On Failure Description: Returns timecode data from the board. Note: The time code has been extended in the V2 hardware.
  • Page 147 3. Windows SDK bcSetDDSDivider Prototype int bcSetDDSDivider (UCHAR div); Packet 0x45 UCHAR div = an enum value Note: The following are defined in the "Bc637pci.h" header file; #define DDS_DIVIDE_BY_1E00x0 #define DDS_DIVIDE_BY_1E10x1 #define DDS_DIVIDE_BY_1E20x2 Input Parameter #define DDS_DIVIDE_BY_1E30x3 #define DDS_DIVIDE_BY_1E40x4 #define DDS_DIVIDE_BY_1E50x5 #define DDS_DIVIDE_BY_1E60x6 #define DDS_DIVIDE_BY_1E70x7 #define DDS_DIVIDE_BY_PREG 0xF...
  • Page 148 3.4. Library definitions bcSetDDSSyncMode Prototype int bcSetDDSSyncMode (UCHAR mode); Packet 0x47 UCHAR src = 0 or 1 Note: The following are defined in the "Bc637pci.h" header file; Input Parameter #define DDS _SYNC _MODE _FRAC0x0 #define DDS _SYNC _MODE _CONT0x1 RC_OK On Success Returns RC_ERROR On Failure Description: This command sets the DDS synchronization mode for DDS output.
  • Page 149 3. Windows SDK bcSetDDSPeriodValue Prototype int bcSetDDSPeriodValue (DWORD period); Packet 0x49 DWORD period = unsigned long value in the range Input Parameter of [0, 0xFFFFFF] for the period value. RC_OK On Success Returns RC_ERROR On Failure Description: This command sets the DDS period value for DDS output. For information on the detailed DDS description, please refer Chapter 1 for more information.
  • Page 150 3.4. Library definitions bcSetTcInEx Unsigned char format = time code format. Unsigned char subtype = time code sub type. Unsigned char mod = modulation type of time code. Note: The following are defined in the "Bc637pci.h" header file; format #define TCODE _IRIG _A 'A' #define TCODE _IRIG _B 'B' #define TCODE _IEEE 'I' #define TCODE_IRIG_E'E'...
  • Page 151 3. Windows SDK format subtype Note TCODE_IRIG_B TCODE_IRIG_SUBTYPE_T 'BT' - IRIG B Legacy TrueTime TCODE_IEEE TCODE _IRIG _SUBTYPE _NONE 'I' - IRIG B IEEE 1344 TCODE_IRIG_E TCODE_IRIG_SUBTYPE_NONE 'E' - IRIG E 1000Hz no year TCODE_IRIG_E TCODE_IRIG_SUBTYPE_Y 'EY' - IRIG E 1000Hz with year TCODE_IRIG_e TCODE_IRIG_SUBTYPE_NONE 'e' - IRIG E 100Hz no year...
  • Page 152 3.4. Library definitions bcSetGenCodeEx #define TCODE_IRIG_SUBTYPE_7'7' RC_OK On Success Returns RC_ERROR On Failure Description: Sets the time code generator format and its subtype. Note: This function extends the function bcSetGenCode() by allowing more time code type and a sub- type with certain time code type. The bcSetGenCode() is still supported for backwards compatibility. The supported combinations of time code type and subtype are as follows: format subtype...
  • Page 153 3. Windows SDK format subtype Note 'B6' TCODE_IRIG_B TCODE_IRIG_SUBTYPE_6 1. - IRIG B BCD,YR 'B7' TCODE_IRIG_B TCODE_IRIG_SUBTYPE_7 1. - IRIG B BCD,YR,SBS TCODE_IRIG_B TCODE_IRIG_SUBTYPE_T 'BT' - IRIG B BCD,CF,SBS - Legacy TCODE_IEEE TCODE _IRIG _SUBTYPE _NONE 'I' - IRIG B IEEE 1344 'E1' TCODE_IRIG_E TCODE_IRIG_SUBTYPE_1...
  • Page 154 3.4. Library definitions bcReadEvent2TimeEx RC_OK On Success Returns RC_ERROR On Failure Description: Latches and returns time captured caused by a external event2 bcReadEvent3TimeEx Prototype int bcReadEvent3Time (ULONG *maj, ULONG *min, USHORT *nano); Packet maj = pointer to unsigned long to store major time (Unix format). min = pointer to unsigned long to store microseconds.
  • Page 155 3. Windows SDK bcSetEventsData Prototype int bcSetEventsData (EventsData *pdata); Packet pdata = pointer to EventsData structure. Input Parameter The structure is defined in the "Bc637pci.h" header file. RC_OK On Success Returns RC_ERROR On Failure Description: Sets event, event2 and event3 data. The information for each event includes enabled, sense and capture lock.
  • Page 156: Linux Sdk

    User's Guide providing the API interface library definition. 4.1.3. Overview The Developer's Kit is designed to provide an interface to the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor in the Linux OS environment. The exam- ple program provides sample code to exercise the interface library and examples to convert ASCII for- mat data objects passed to and from the device into a binary format suitable for operation and conversion.
  • Page 157: Installation

    PCI/PCIe card instal- lation instructions. 4.2.2. Software installation Because the bc635PCI-V2 and 637PCI-V2 driver is a KLM (kernel loadable module), the Linux source code including version.h must be installed on the system for the driver to install correctly. - 140 -...
  • Page 158 4.2. Installation Building modules for Linux kernel 2.6.x requires that you have a configured and built kernel tree on your system. This requirement is a change from previous versions of the kernel, where a current set of header files was sufficient. 2.6 modules are linked against object files found in the kernel source tree;...
  • Page 159: Linux Kernel Versions Supported

    WinDriver release (WinDriver 10.0.2) that supports Linux kernel up to 2.6.29. Since there are many Linux distributions available, it is not possible to test Symmetricom drivers and APIs in all installations. Symmetricom installed and tested its software (bc63xPCIcfg) on Fedora Core 8 (x86_32) and Fedora Core 7 (x86_64).
  • Page 160: Using The Bc63Xpcicfg.exe Program

    /home/user/bc635pci/sample> ./bc63xPCIcfg 4.2.5. Using the bc63xPCIcfg.exe program The bc63xPCIcfg program may be used to test the PCI/PCIe TFP hardware. See the bc63xPCIcfg menu below: ----------------------------------------------------------------------- Symmetricom - TT & M bc635/637PCIe-V2 Configurator Ver- sion 3.0 ----------------------------------------------------------------------- 1. Read Current Time (Press enter to return to menu) 2.
  • Page 161: Select Operational Mode

    Following are some examples demonstrating how to use the bc63xPCIcfg. Select Operational Mode There are several operational modes for the PCI-V2/PCIe card. The default Timing Mode for the bc635PCI-V2/PCIe is time code Decoding Mode, for the bc637PCI-V2/PCIe it is GPS Mode. Select Option: 9 0. Time Code Mode 1.
  • Page 162: Request Time Settings

    4.2. Installation Request Time Settings Select Option: 24 Time Settings: Mode: Free Run Time Format: Binary Year: 2008 Local Offset: 0.0 Propagation Delay: 0 Current Leap Seconds: 0 Scheduled Leap Event Time: 1069977600 Scheduled Leap Event Flag: Disable GPS Time Format: UTC Format IEEE Daylight Savings Flag: Enable >>>>>>>>>>>>>>>>...
  • Page 163: Select Timecode Decoding Format

    Chapter 1. Select Timecode Decoding Format The PCI/PCIe TFP will decode IRIG A, IRIG B, IEEE 1344 or NASA 36. The default setting for the bc635PCI-V2 is IRIG B, amplitude modulated. Select Option: 10 Select Time Code Format: 1.
  • Page 164: Select Timecode Output Format

    4.2. Installation Time Code: IRIG A Code Modulation: AM Time Code Out: IRIG B Generator Time Offset: 0.0 >>>>>>>>>>>>>>>> Press Enter to continue <<<<<<<<<<<<<<<<< Select Timecode Output Format The PCI-V2/PCIe will output IRIG B or IEEE 1344, amplitude modulated or DC level shift. Select Option: 11 Select Time Code Output Format 0.
  • Page 165: Select The Time Register Format

    4. Linux SDK >>>>>>>>>>>>>>>> Press Enter to continue <<<<<<<<<<<<<<<<< Select the Time Register Format The card will output time in binary or grouped decimal formats. Select Option: 8 Select Time Format 0. Decimal 1. Binary Select: 0 To verify the time format, check the time settings. Select Option: 24 Time Settings: Mode: GPS...
  • Page 166: Read Current Time

    4.2. Installation >>>>>>>>>>>>>>>> Press Enter to continue <<<<<<<<<<<<<<<<< Read Current Time You may read the time in Binary or Decimal formats, selecting option 1 and <enter> to display the board's time. Note that the default time format is the binary format. It is recommended that you set (or verify) the time format prior to reading the time, using options 8 or 24.
  • Page 167: Set Current Time

    4. Linux SDK <enter> to exit Set Current Time You may choose to set the board time. This makes sense when the card does not have a time source and is counting time in a flywheel state, or when the card is in FreeRun or RTC modes. If the card is decoding a selected input source, the time written to the card will be overwritten.
  • Page 168 4.2. Installation Enter Year (1990 - 2036): 2008 To verify the year: Select Option: 1 Binary Time: 10/11/2008 17:10:49.9202763 Status: 7 Binary Time: 10/11/2008 17:10:49.9372524 Status: 7 Binary Time: 10/11/2008 17:10:49.9871942 Status: 7 Binary Time: 10/11/2008 17:10:50.0070659 Status: 7 Binary Time: 10/11/2008 17:10:50.0270642 Status: 7 Binary Time: 10/11/2008...
  • Page 169: Request Model Information

    4. Linux SDK Request Model Information Select Option: 28 Model Information Model: BC637PCI Serial: 272642420 (0x10403174) Hardware Fab: 0 Assembly: 0 >>>>>>>>>>>>>>>> Press Enter to continue <<<<<<<<<<<<<<<<< DDS Frequency and New Time Codes The current hardware supports DDS output and many new decoding and generating time codes. The DDS feature allows a much wider range of output frequency.
  • Page 170 4.2. Installation Select: You can set the DDS frequency. Select: 1 Enter DDS Frequency (in HZ): 12345.67 Done setting DDS frequency >>>>>>>>>>>>>>>> Press Enter to continue <<<<<<<<<<<<<<<<< The DDS menu options 2 to 9 are for low level DDS controls, which gives the maximum flexibility. For information on the detailed DDS description, refer to Chapter 1.
  • Page 171 4. Linux SDK 0. Back to main menu Select: 7 Select Time Code Modulation: 1. Modulated 2. DC Level Shift Select: 1 To use the supported new generating time code, use option 39 of the bc63xPCIcfg. For example, you can specify to generate IRIG G as follows. Select Option: 39 Select Time Code Output Format 1.
  • Page 172: Compatibility With Old Bc635Pci Or Bc637Pci Card

    The interface library provides functions for each of the programming packets supported by the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor. In addi- tion, functions are provided to both read and write individual registers and dual port RAM locations on the card.
  • Page 173: Functions

    4. Linux SDK For developers who have developed code based on the library using the V1 hardware, you will notice that a set of new API functions has been added. However, the existing API functions have been kept intact. This is to ensure that your program is source compatible with the new library. All you need to do is a recompile of your program to link with the new library.
  • Page 174 4.3. Library Definitions bcReadReg Description: Returns the contents of the requested register. bcWriteReg BOOL bcWriteReg (BC_PCI_HANDLE hBC_PCI, DWORD Offset, Prototype DWORD Data); Packet BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function Input Parameter Offset = See defined Registers offsets in the "bcuser.h" header file. Data = unsigned long value to be set.
  • Page 175 4. Linux SDK bcWriteDPReg Data = byte value to be set. TRUE On Success Returns FALSE On Failure Description: Sets the content of the requested byte in the Dual Port RAM area. bcReadBinTime BOOL bcReadBinTime (BC_PCI_HANDLE hBC_PCI, PDWORD Prototype major, PDWORD min, PBYTE stat); Packet BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' func- tion...
  • Page 176 4.3. Library Definitions bcReadDecTime Packet BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' func- tion ptm = pointer to tm stuct to store major time (calendar format). Input Parameter ulpMin = pointer to unsigned long to store microseconds. pstat = pointer to unsigned char to store status bits. TRUE On Success Returns FALSE On Failure...
  • Page 177 4. Linux SDK bcSetDecTime Prototype BOOL bcSetDecTime (BC_PCI_HANDLE hBC_PCI, struct tm); Packet 0x12 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function Input Parameter tm = tm struct containing new time values to set. TRUE On Success Returns FALSE On Failure Description: Set the major time buffer.
  • Page 178 4.3. Library Definitions bcReadEventTime Description: Latches and returns time captured caused by an external event. bcReadEventTimeEx BOOL bcReadEventTimeEx (BC_PCI_HANDLE hBC_PCI, PDWORD maj, Prototype PDWORD min, PWORD nano, PBYTE stat); Packet BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function maj = pointer to unsigned long to store major time (Unix format). Input Parameter min = pointer to unsigned long to store microseconds.
  • Page 179 4. Linux SDK bcReqTimeFormat FALSE On Failure Description: Request current time format. bcSetTimeFormat Prototype BOOL bcSetTimeFormat (BC_PCI_HANDLE hBC_PCI, BYTE tmfmt); Packet 0x11 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function tmfmt = unsigned char value for time format. Input Parameter The allowed values are defined in the 'bcuser.h' file: enum { FORMAT_DECIMAL = 0x00 };...
  • Page 180 4.3. Library Definitions bcSetLocOff BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' func- tion Offset = hours from input time source. (-16 - +16). Input Parameter half = half hour increment 0: No Half Hour increment 1: Add Half Hour increment TRUE On Success Returns FALSE On Failure...
  • Page 181 4. Linux SDK bcSetHbt BOOL bcSetHbt (BC_PCI_HANDLE hBC_PCI, BYTE mode, USHORT n1, Prototype USHORT n2); Packet 0x14 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function mode = unsigned char value for the heartbeat mode. n1 = unsigned short value for heartbeat counter 1. Input Parameter n2 = unsigned short value for heartbeat counter 2.
  • Page 182 4.3. Library Definitions bcSetTcInMod enum { TCODE_MOD_DC = 0x44 }; TRUE On Success Returns FALSE On Failure Description: Sets the input time code modulation. bcSetGenCode Prototype BOOL bcSetGenCode (BC_PCI_HANDLE hBC_PCI, BYTE GenTc); Packet 0x1B BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function GenTc = unsigned char value for the time code output.
  • Page 183 4. Linux SDK bcSetClkSrc enum { CLK_EXT = 0x45 }; TRUE On Success Returns FALSE On Failure Description: Sets the clock source, Internal/External. bcSetDac Prototype BOOL bcSetDac (BC_PCI_HANDLE hBC_PCI, USHORT dac); Packet 0x24 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' func- tion Input Parameter dac = unsigned short value for the DAC.
  • Page 184 4.3. Library Definitions bcSetGpsTmFmt Prototype BOOL bcSetGpsTmFmt (BC_PCI_HANDLE hBC_PCI, BYTE gpsfmt); Packet 0x33 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function gpsfmt = unsigned char value for gps time format. Input Parameter The allowed values are defined in the 'bcuser.h' file: enum { GPS_TIME_FMT = 0x01 };...
  • Page 185 4. Linux SDK bcSetYearAutoIncFlag BOOL bcSetYearAutoIncFlag (BC_PCI_HANDLE hBC_ Prototype PCI, BYTE yrinc); Packet 0x42 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function yrinc = unsigned char value for enabling/disabling year auto- increment flag. The allowed values are defined in the 'bcuser.h' file: enum { YEAR_AUTO_ENA = 0x01 };...
  • Page 186 4.3. Library Definitions bcForceJam Input Parameter BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function TRUE On Success Returns FALSE On Failure Description: Forces a Jam-Sync. bcSyncRtc Prototype BOOL bcSyncRtc (BC_PCI_HANDLE hBC_PCI); Packet 0x27 Input Parameter BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function TRUE On Success Returns FALSE On Failure...
  • Page 187 4. Linux SDK bcReqHardwarFab FALSE On Failure Description: Request hardware fab of the board. bcReqAssembly Prototype BOOL bcReqAssembly (BC_PCI_HANDLE hBC_PCI, PWORD num); Packet 0xF4 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' func- tion Input Parameter num = pointer to unsigned short value for the assembly number. TRUE On Success Returns FALSE On Failure...
  • Page 188 4.3. Library Definitions bcReqTimeData Packet 0x19 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function Input Parameter pdata = pointer to TimeData structure. The structure is defined in the "bcuser.h" header file. TRUE On Success Returns FALSE On Failure Description: Request time data of the board. bcReqOtherData Prototype BOOL bcReqOtherData (BC_PCI_HANDLE hBC_PCI, OtherData *pdata);...
  • Page 189 4. Linux SDK bcReqVerData FALSE On Failure Description: Request version data of the board. bcReqModel Prototype BOOL bcReqModel (BC_PCI_HANDLE hBC_PCI, ModelData *pdata); Packet 0x19 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function Input Parameter pdata = pointer to ModelData structure. The structure is defined in the "bcuser.h"...
  • Page 190 4.3. Library Definitions bcGPSMan BOOL bcGPSMan (BC_PCI_HANDLE hBC_PCI, GpsPkt *pktin, Prototype GpsPkt *pktout); Packet 0x32 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function pktin = structure commands information detailing the packet to Input Parameter send and the buffer. pktout = structure commands information detailing the packet to retrieve and the buffer TRUE On Success Returns...
  • Page 191 4. Linux SDK bcStartIntEx Description: Start the interrupt thread. This thread will execute bcShowInt() function every time an interrupt is detected. The interrupt mask defines the source of interrupts. (See section 4.4 for a pro- gramming example.) bcStopInt Prototype void bcStopInt (BC_PCI_HANDLE hBC_PCI); Packet BC_PCI_HANDLE hBC_PCI : Handle returned from Input Parameter...
  • Page 192 4.3. Library Definitions bcReqInt BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function Ints = pointer on unsigned char value for current used interrupt. The allowed values are defined in the 'bcuser.h' file: enum { INTERRUPT_EVENT = 0x01 }; enum { INTERRUPT_PERIODIC = 0x02 };...
  • Page 193 4. Linux SDK bcReqTimeCodeDataEx BOOL bcReqTimeCodeDataEx (BC_PCI_HANDLE hBC_PCI, Time- Prototype CodeDataEx *pdata); Packet 0x19 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function pdata = pointer to TimeCodeDataEx structure. Input Parameter The structure is defined in the "bcuser.h" header file. The inputFormat and out- putFormat are the time code type.
  • Page 194 4.3. Library Definitions bcSetPeriodicDDSEnable BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function bEnable = unsigned char value for enabling periodic or enabling DDS output. The allowed values are 1 to enable and 0 to disable. TRUE On Success Returns FALSE On Failure Description: Depending on the selected periodic or DDS output choice (bcSetPeriodicDDSSelect), this function enables or disables that choice.
  • Page 195 4. Linux SDK bcSetDDSDivider For information on the detailed DDS description, refer to Chapter 1. TRUE On Success Returns FALSE On Failure Description: Sets the DDS divider value for the DDS frequency output. bcSetDDSDividerSource BOOL bcSetDDSDividerSource (BC_PCI_HANDLE hBC_PCI, Prototype BYTE bSrc); Packet 0x46 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci'...
  • Page 196 4.3. Library Definitions bcSetDDSMultiplier BOOL bcSetDDSMultiplier (BC_PCI_HANDLE hBC_PCI, Prototype BYTE bMult); Packet 0x48 BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function bMult = unsigned char value to select continuous syn- chronization mode multiplier. The allowed values are defined in the 'bcuser.h' file: enum { DDS_MULTIPLY_BY_1 = 0x1 };...
  • Page 197 4. Linux SDK bcSetDDSTuningWord BOOL bcSetDDSTuningWord (BC_PCI_HANDLE hBC_PCI, Prototype DWORD tuneWord); Packet 0x4A BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function tuneWord = unsigned long value for the turning word. For information on the detailed DDS description, refer to Chapter 1. TRUE On Success Returns FALSE On Failure...
  • Page 198 4.3. Library Definitions bcSetTcInEx BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function TcIn = unsigned char value for time code input. SubType = unsigned char value for time code subtype. The allowed values are defined in the 'bcuser.h' file: TCODE_IRIG_A, TCODE_IRIG_SUBTYPE_NONE ('A' - IRIG A no year) TCODE_IRIG_A, TCODE_IRIG_SUBTYPE_Y...
  • Page 199 4. Linux SDK bcSetGenCodeEx BOOL bcSetGenCodeEx (BC_PCI_HANDLE hBC_PCI, Prototype BYTE GenTc, BYTE SubType); Packet 0x1B - 182 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 200 4.3. Library Definitions bcSetGenCodeEx BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function GenTc = unsigned char value for the time code output. SubType = unsigned char value for time code subtype. The allowed values are defined in the 'bcuser.h' file: TCODE_IRIG_A, TCODE_IRIG_SUBTYPE_0 ('A0' - IRIG A BCD,CF,SBS)
  • Page 201 4. Linux SDK bcSetGenCodeEx TCODE_IRIG_B, TCODE_IRIG_SUBTYPE_T ('BT' - IRIG B BCD,CF,SBS - Legacy TrueTime) TCODE_IEEE, TCODE_IRIG_SUBTYPE_NONE ('I' - IRIG B IEEE 1344) TCODE_IRIG_E, TCODE_IRIG_SUBTYPE_1 ('E1' - IRIG E 1000Hz BCD,CF) TCODE_IRIG_E, TCODE_IRIG_SUBTYPE_2 ('E2' - IRIG E 1000Hz BCD) TCODE_IRIG_E, TCODE_IRIG_SUBTYPE_5 ('E5' - IRIG E 1000Hz BCD,YEAR,CF) TCODE_IRIG_E, TCODE_IRIG_SUBTYPE_6...
  • Page 202 4.3. Library Definitions bcSetGenCodeEx bcReadEvet2TimeEx BOOL bcReadEvent2TimeEx (BC_PCI_HANDLE hBC_PCI, Prototype PDWORD major, PDWORD min, PWORD nano, PBYTE stat); Packet BC_PCI_HANDLE hBC_PCI : Handle returned from 'bcStartPci' function major = unsigned long pointer to store major time (Unix format). Input Parameter min = unsigned long pointer to store microseconds.
  • Page 203: Programming Examples

    4. Linux SDK bcReqEventsData The structure is defined in the "bcuser.h" header file. TRUE On Success Returns FALSE On Failure Description: Returns event, event2 and event3 data. The information for each event includes ena- bled, sense and capture lock. bcSetEventsData BOOL bcSetEventsData (BC_PCI_HANDLE hBC_ Prototype PCI, EventsData *pdata);...
  • Page 204: Reading Time On Demand

    4.4. Programming Examples printf ("Error Opening Device Driver\n"); return -1; … … … // Stop the device bcStopPci(hBC_PCI); 4.4.3. Reading Time On Demand The following example reads the time from the TFP register: DWORD maj, min; WORD nano; BYTE stat; struct tm *majtime;...
  • Page 205: Reading In Decimal Time Format

    4. Linux SDK Reading in Decimal Time Format if ( bcReadDecTimeEx (hBC_PCI, majtime, &min, &nano, &stat) == TRUE ) printf( "\nDecimal Time: %d %d %02d:%02d:%02d.%06lu%d Status: %d", majtime->tm_yday, majtime->tm_year+1900, majtime->tm_hour, majtime->tm_min, majtime->tm_sec, min, nano, stat); 3.4.4. Setting theTFP Mode The following example sets the TFP mode to GPS: bcSetMode (hBC_PCI, MODE_GPS);...
  • Page 206 4.4. Programming Examples // To stop interrupt generation bcStopInt(hBC_PCI); - 189 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 207 Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 208: Solaris Sdk

    This section of the User's Guide providing library definitions 5.1.3. Overview The Driver Development Kit provides an interface to the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor in the 64 bit environments of Solaris 8, 9, and 10.
  • Page 209: Software Installation

    The only thing the user has to do is pick a vacant PCI / PCIe slot, plug the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe into it, and then install the device driver. Be sure to consult the user documentation that came with your particular workstation for any specific card installation instructions.
  • Page 210 5.2. Installation ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of <BC635PCI> [y,n,?] y Installing BC635/637PCI-V2/PCIe Solaris driver as <BC635PCI> ## Installing part 1 of 1.
  • Page 211 5. Solaris SDK # Copyright (C) 1997, EIS Computers, Symmetricom Inc. # Copyright (C) 2007-2009, Symmetricom Inc. # Run this simple script from the same directory as the # BCPCI-V800-sparc64-build<aaa>.tar file you have received. # Note <aaa> is the three digit build number.
  • Page 212 5.2. Installation In case, you want to remove the software package, use the Solaris 'pkgrm' command. Answer 'y' to the two questions when prompted. The output for removing BC635PCI package on the SPARC plat- form is shown below. # pkgrm BC635PCI The following package is currently installed: BC635PCI BC635/637PCI-V2/PCIe Solaris driver...
  • Page 213: Test Installation

    The software is installed in /opt/BC635PCI. Use the sample program to test the installation. # cd /opt/BC635PCI # cd src # ./bc63xPCIcfg ------------------------------------------------------------------------ Symmetricom - TT & M bc635/637PCIe-V2 Configurator Version 3.0 ------------------------------------------------------------------------ 1. Read Current Time (Press enter to return to menu) 2.
  • Page 214: Driver Compilation

    5.2. Installation 25. Request Clock Settings 26. Request Offset Settings 27. Request UTC Information 28. Request Model Information 29. Request Firmware Version 30. Advanced Menu 32. GPS Packets Menu - bc637PCI 31. Interrupts Menu Only 33. PCI Revision ID 34. Read from Dual Port RAM 35.
  • Page 215 5. Solaris SDK # Makefile to build the stfp driver and the bc63xPCIcfg program DRVFLAGS = -I. -m64 -xarch=sparc -xcode=abs32 -xregs=no%appl -xO3 APPFLAGS = -I. -m32 -xO3 DRIVER = stfp PCIDEMO = bc63xPCIcfg OBJS = stfp.o bc635pci.o .PHONY: all all: $(DRIVER) $(PCIDEMO) .PHONY: clean clean: @rm -f $(OBJS)
  • Page 216: Driver Function Definitions

    The 'STFP' device driver provides functions for each of the programming packets supported by the bc635PCI-V2, bc637PCI-V2, bc635PCIe, and bc637PCIe Time and Frequency Processor. In addi- tion, functions are provided to both read and write individual registers and dual port RAM locations on the card.
  • Page 217 5. Solaris SDK The only purpose for the read (2) call is to read a GPS data packet that was previously requested with an ioctl (2) or write (2) call. These packets contain position, velocity, GPS system status, and other GPS information.
  • Page 218 5.3. Driver Function Definitions The ioctl(2) request codes, as well as all the other defined constants listed below, are contained in 'stfpio. h'. For most ioctl() functions, arg is a pointer to data either used by or returned by the function. Other functions either ignore arg or use it directly as an int value.
  • Page 219 5. Solaris SDK RDTIMETVREQ, *struct stfp_timeval RDEVENTTVREQ, *struct stfp_timeval These requests capture and read time from the TFP TIMEx or EVENTx registers assuming the time format is binary. WRSTROBE, * struct stfp_time Writes time to the STROBEx registers assuming the time format is decimal. This request disables the Strobe output while the STROBEx registers are written.
  • Page 220 5.3. Driver Function Definitions SETTIMINGOFFSET, int Sets the TFP timing offset with the int arg value. SELFREQUENCYOUT, int Selects output frequency (1, 5, or 10 MHz). CONTROLEVENT, int This request performs a variety of functions relevant to the Event Time Capture feature. CONTROLSTROBE, int This request performs a variety of functions relevant to the Time Coincidence Strobe feature.
  • Page 221 5. Solaris SDK These requests allow the user to read and clear bits in the TFP INTSTAT register. All INTSTAT bits can be read, but only those bits that are not setup to generate a signal can be cleared. Use these requests to poll for the occurrence of one or more interrupt source( s) instead of using signals.
  • Page 222 5.3. Driver Function Definitions Sets the time code output format SETGENTMOFFSET, struct tcgenoffset Sets the generator time code offset SETLOCTMOFFSET, struct loctmoffset Sets the local time offset SETLEAPSECEVENT, struct leapseconds This command can be used in modes other than GPS mode for inserting or deletion of one leap sec- ond.
  • Page 223 5. Solaris SDK This command forces the TFP to Synchronize the RTC time to current time. DISCBATT, This command disconnects the RTC IC from the Battery after power is turned off. Upon power on, the TFP automatically connects the RTC IC to the battery. RDCONTROL, *int Reads the Control register SETCONTROL, int...
  • Page 224: Example Program

    5.4. Example Program command_t' to specify which DDS command to invoke. The source file 'bc635pci.c' for the demo pro- gram defines a set of DDS functions, such as, bcSet- PeriodicDDSSelect(),bcSetPeriodicDDSEnable(), etc. See the source code for details. TCFORMATEX, *struct tc_command_t Selects the time code input format and its sub type or time code output format and sub type.
  • Page 225: Program Functions

    5. Solaris SDK 5.4.2. Program Functions Function open Description Opens an instance of the device driver int fd; if ((fd = open ("/dev/stfp0", O_RDWR)) < 0) Example printf("Error opening Device Driver ..Exiting"); _exit(1); Function close Description Closes the device driver Example close(fd);...
  • Page 226 5.4. Example Program struct stfp_time stm; struct stfp_timeval tvTime; /* Decimal Time Format*/ ioctl (fd, RDTIMEREQ, &stm); printf (" Julian Time: %03d %d %02d:%02d:%02d.%06d%d Status: %x\n", stm.tm.tm_yday+1, stm.tm.tm_year+1900, Example stm.tm.tm_hour, stm.tm.tm_min, stm.tm.tm_sec, stm.usec, stm.hnsec, stm.status); /* Binary Time Format */ ioctl (fd, RDTIMETVREQ, &tvTime);...
  • Page 227 5. Solaris SDK Registers pci_set_control Description Reads and sets the control register ioctl(fd, RDCONTROL, &ctlreg); Example ioctl(fd, SETCONTROL, ctlreg); Registers pci_revision ID Description Reads Revision ID field of the PCI configure space Example ioctl (fd, REQREVID, &rev_id); Command 0x10 pci_mode Description Sets the timing mode Example...
  • Page 228 5.4. Example Program Registers pci_out_freq Description Sets the frequency output 1, 5, 10 MHz Example ioctl (fd, SELFREQUENCYOUT, FREQ_10MHZ); Command 0x15, 0x16 pci_time_code Description Sets the time code input format and modulation ioctl (fd, SELTCFORMAT, TC_IRIGB); Example ioctl (fd, SELTCMOD, MOD_AM); Command 0x17 pci_set_prop_delay Description...
  • Page 229 5. Solaris SDK loc_off = (float)get.data.locoff.locoff; loc_off_flg = (int)get.data.locoff.locflg; Command 0x19 pci_req_utc_info Description Request UTC Information /* Get UTC Info */ Example get.arg = GETDATA_UTCINFO; ioctl (fd, GETDATA, &get); Command 0x19 pci_req_clock_settings Description Requests clock settings /* Get Clock Source */ get.arg = GETDATA_CLKSRC;...
  • Page 230 5.4. Example Program Description Sets the generator time offset Example ioctl (fd, SETGENTMOFFSET, &gen); Command 0x1D pci_set_loc_off Description Sets the local time offset Example ioctl (fd, SETLOCTMOFFSET, &loc); Command 0x1E pci_set_leap_sec Description Program the leap seconds into the TFP Example ioctl (fd, SETLEAPSECEVENT, &leap);...
  • Page 231 5. Solaris SDK Command 0x28 pci_dis_rtc Description Disconnect battery from RTC Example ioctl (fd, DISCBATT); Command 0x29 pci_set_clk_val Description Sets the clock value of the TFP Example ioctl (fd, SETCLKVAL, clk_val); Command 0x33 pci_set_gps_tm_fmt Description Sets GPS or UTC time format Example ioctl (fd, SETGPSTMFMT, UTC_FMT);...
  • Page 232 5.4. Example Program struct dds_command_t ddscmd; ddscmd.cmd_id = COM_SET_PRD_DDS_ENA; Example ddscmd.data.cmd_byte[0] = 1; ddscmd.cmd_len = 1; ioctl (fd, DDSCOMMAND, &ddscmd); Command 0x45 DDS divider Description Sets DDS divider value struct dds_command_t ddscmd; ddscmd.cmd_id = COM_SET_DDS_DIVIDER; Example ddscmd.data.cmd_byte[0] = DDS_DIVIDE_BY_1E2; ddscmd.cmd_len = 1; ioctl (fd, DDSCOMMAND, &ddscmd);...
  • Page 233 5. Solaris SDK Description Sets DDS multiplier value struct dds_command_t ddscmd; ddscmd.cmd_id = COM_SET_DDS_MULTI; Example ddscmd.data.cmd_byte[0] = DDS_MULTIPLY_BY_3; ddscmd.cmd_len = 1; ioctl (fd, DDSCOMMAND, &ddscmd); Command 0x49 DDS period value Description Sets DDS period value struct dds_command_t ddscmd; ddscmd.cmd_id = COM_SET_DDS_PERIOD; Example ddscmd.data.cmd_number = period;...
  • Page 234: Example 1: Gps Packet 46 - Health Packet Sample

    ("\nID: \t%02X \nStatus: 0x%02X \nError: \t0x%02X\n", rbuf[1] & 0xff, rbuf[2] & 0xff, rbuf[3] & 0xff); Note: Symmetricom bus cards support different GPS receivers. Please consult the Users Guide for your bus card to access the GPS receiver commands that apply to your card.
  • Page 235 5. Solaris SDK /* enable 1PPS interrupt signals */ ioctl (fd, SETINTSIGNAL, INT_1PPS); /* wait for RETURN key */ scanf ("%c", &junk); /* disable interrupt signals */ ioctl (fd, SETINTSIGNAL, 0); /* Close device */ close(fd); void sigHandler (int sig, int code, struct sigcontext *scp, char *addr) int intServiced;...
  • Page 236: Glossary

    The following is a glossary of key terms used in the discussion of timing operations: An expanded glossary of terms is available on-line at: http://www.symmetricom.com/resource/glossary/ BCD: Binary Coded Decimal. Also called packed decimal, this is the representation of each digit of a decimal number by four-bit binary numbers.
  • Page 237 Glossary NIST: National Institute of Standards and Technology, the National Measurement Institute in the United States. OCXO: Oven-Controlled Crystal Oscillator OS: Operating System. Packet: A group of bytes conforming to a defined structure. Packets are usually used in bit serial or byte serial data transmissions to allow framing of the transmitted data.
  • Page 238 5.4. Example Program maintained by the Bureau International de l'Heure (BIH), which forms the basis of a coordinated dis- semination of standard frequencies and time signals. VCXO: Voltage-Controlled Crystal Oscillator. - 221 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 239: Index

    Index 64-Bit Applications ACK Register Additional Timing Output Signals AM Time Code Calibration API Calling Convention bc635PCI-V2 and bc637PCI-V2 Jumpers bc635PCIe and bc637PCIe Accessories bc635PCIe and bc637PCIe Jumpers bc637PCI/PCIe Additional Hardware Breakout Cables Calibration Procedure Changing the TFP Card Front Panel...
  • Page 240 5.4. Example Program Driver Driver Packages Dual-Port RAM Interface Environmental Specifications Errata Field Upgrade of Embedded Program Fractional Mode Front Panel LED GPS Antenna GPS Default Parameters GPS Receiver Interface Heartbeat Output Inputs Inputs and Outputs Installation Installation Under Other Operating Systems Installation Under Windows Installing the Card and Antenna Key Features...
  • Page 241 Index Manually Request Packet from GPS Receiver (Command 0x32) Microsoft Visual Studio 2008 Minimum System Requirements Mode 0 Mode 1 Mode 2 Mode 3 Mode 6 Multiplier Mode No Sync Read Time Function Outputs PCI Bar Mapping PCI Bus Characteristics PCI Memory Map PCI/PCIe TFP Hardware PCIe Bus Characteristics...
  • Page 242 Software Development Kit Solaris Driver Function Definitions Solaris Example Program Solaris SDK Solaris Software Development Kit Specifications Status Bits Symmetricom Customer Assistance TFP Device Register Summary TFP DPRAM Commands TFP I/O Connector Time Capture Registers Time Code Outputs Time Coincidence Strobe Output...
  • Page 243 Index Windows SDK Command Finder Windows SDKFunctions Windows Software Development Kit - 226 - Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com...
  • Page 244 Artisan Technology Group is your source for quality new and certified-used/pre-owned equipment SERVICE CENTER REPAIRS WE BUY USED EQUIPMENT • FAST SHIPPING AND DELIVERY Experienced engineers and technicians on staff Sell your excess, underutilized, and idle used equipment at our full-service, in-house repair center We also offer credit for buy-backs and trade-ins •...

Table of Contents

Save PDF