Difference between revisions of "Quick Startup Guide (Windows)"

From HPSDRwiki
Jump to: navigation, search
(wiki, spelling)
(catcorr)
Line 200: Line 200:
 
# Test Mercury/Penelope/Janus with PowerSDR.
 
# Test Mercury/Penelope/Janus with PowerSDR.
  
[[Category:Hardware]]
+
[[Category:PowerSDR]]
[[Category:Software| ]]
+

Revision as of 09:03, 26 January 2010

Quick Startup Guide for PCs running Microsoft Windows

System Real-Time Capabilities

Processing of streaming data in real-time can be a challenging task for Windows based applications and device drivers. This is because by design Windows is not a real-time operating system. There is no guarantee that tasks can be executed in a deterministic (timely) manner.

Audio or video data streams transferred from or to an external device are typically handled by a kernel-mode device driver. Data processing in such device drivers is interrupt-driven. Typically, the external hardware periodically issues interrupts to request the driver to transfer the next block of data. In Windows NT based systems (Windows 2000 and later) there is a specific interrupt handling mechanism. When a device driver cannot process data immediately in its interrupt routine, it schedules a DPC.

Microsoft defines them as A Deferred Procedure Call (DPC) is a queued call to a kernel-mode function that will usually be executed at a later time. DPCs are used by drivers to schedule I/O operations that do not have to take place in an ISR at a high IRQL, and can instead be safely postponed until the processor IRQL has been lowered.

When you look at Windows Task Manager and sort the running processes by CPU (Processor Utilization), the System Idle Process is almost always at the top of the list. What you may not know is that “process” is really a roll-up of several things. Among other things, included in that CPU number, is hardware interrupts and DPCs. You can see these two items by using the Microsoft “SysInternals” Process Explorer available here: Process Explorer

Thesycon's DPC Latency Checker is a free Windows tool that analyses the capabilities of a computer system to handle real-time data streams properly. It may help you to determine if your PC is capable of powering your HPSDR system or find the cause for interruptions in real-time audio and video streams, also known as drop-outs. The program supports Windows 2000, Windows XP, Windows XP x64, Windows Server 2003, Windows Server 2003 x64, Windows Vista, Windows Vista x64 and is available here: DPC Latency Checker

USBIO Driver

Before connecting your HPSDR equipment you will need to install the USBIO drivers that can be found at FlexRadio or just click here: USBIO Driver. You will need to have administrator rights on your Windows system for this install to complete. During install make sure you check the box that allows this driver to be used by everyone, not just the current user. Once the install has completed reboot your PC even if the driver install does not prompt you to restart.

By default the installation program will install this driver on your system in this directory:

C:\Program Files\FlexRadio Systems\USBIO Driver

(Note: HPSDR requires that your PC has USB 2.0 ports. USB 1.x ports will not work.)

.NET Framework

The HPSDR version of PowerSDR requires that your system have Microsoft's .NET Framework version 1.1 installed. Most systems already have the framework, however, in case you need it here is the link:

.NET Framework 1.1

If you are going to use Ozy to program software updates into Mercury and Penelope, then you also need Framework 2.0.

.NET 2.0 SP1

PowerSDR Software Installation

Currently, there is a lot of development activity and expected updates to HPSDR firmware and software. Because the software is fluid, and the developers desire to post releases quickly and as often as possible, a manual installation is easier to manage. This step will eventually be relplaced with a more standard software setup.

To use Mercury and Penelope, you will need the latest released PowerSDR software from the "PennyMerge" branch of the open-source development tree. The repository is managed by Subversion, which is a popular collaborative software/firmware development tool for open-source projects. To access this software you will need to install and use a Subversion (SVN) client, see How to use SVN. There are several out there, however, TortoiseSVN for Windows XP can be downloaded from here:

TortoiseSVN

Once TortoiseSVN is installed, follow these steps:

  1. Create the following directory structure
    C:\HPSDR\PennyMerge
    (this is an arbitrary convention, but logical and easy to find)
  2. Navigate to HPSDR
    Click Start and select Run...
    Type: C:\HPSDR then [Enter]
    You should see a PennyMerge directory in the window that opens.
  3. Download the latest software
    Right click on the PennyMerge directory
    Select SVN Checkout...
    Type or copy & paste the following line into the "URL of repository" field:

    svn://206.216.146.154/svn/repos_sdr_windows/PowerSDR/branches/kd5tfd/PennyMerge/bin/Release

    Click OK
    At this point, TortoiseSVN should begin downloading the most current released version of the PowerSDR client for HPSDR. Once it completes go to step 4.
    (Note: To update to subsequent releases, you can right click the PennyMerge directory and select SVN Update...)
  4. Copy the files to a working directory for better version control.
    This directory can be anywhere you like, but we recommend using
    C:\Program Files\FlexRadio Systems\HPSDR\
    If you are updating an existing installation, make sure PowerSDR is not running before you write over the old version.
  5. To create a PowerSDR desktop shortcut
    Open the working directory (where you copied the files i.e. C:\Program Files\FlexRadio Systems\HPSDR\)
    Locate the PowerSDR application file (PowerSDR.exe)
    Right-click on PowerSDR.exe then drag and drop it to your desktop
    Select "Create Shortcuts Here"
    (Note: It is no longer required to start PowerSDR with the --ignore-pp-ptt flag.)

HPSDR Board Installation

The current release versions of the HPSDR firmware does NOT require attention to the order you install the HPSDR board set on the Atlas buss. If you are using previous versions, there are several arrangements that are reported to be successful; however, this order is one of the most common:

On Atlas J6 is next to the power connector, J1 is farthest away:

  • Slot J5: Mercury
  • Slot J3: Penelope (if used, open jumper J8 on Mercury, this disables Mercury's 10Mhz clock)
  • Slot J2: Ozy

What About Janus?

Janus is a high performance replacement soundcard for radios that produce analog I-Q inputs and outputs (like a FLEX-1000 or a Softrock). If you are using your HPSDR to control radios like these then you will need Janus. If you are running Mercury and Penelope, Janus is not needed as their I-Q signals are already in digital format.

(Note: As of 5/30/09 the firmware team has released a fix for board order dependency)
(Note: Receiver audio is output from one of the two 1/8" stereo jacks on the Mercury board. The upper jack is at line level, the lower is suitable for headphones)

USB Device Detection

  1. Connect your power supply to Atlas - Remember that poor supply voltages will cause you problems - be certain your supply is capable of supplying the right current and voltage during operation.
  2. Connect Ozy to a USB 2.0 port on your PC or USB 2.0 hub.
  3. Power up the Atlas - at this point Windows should detect there is a new USB device and pop-up the standard Windows driver installation wizard. Note: you may need to manually direct the wizard to the C:\Program Files\FlexRadio Systems\USBIO Driver directory and install the correct driver.
  4. You should see a USB device named "OZY Host Assisted Firmware Load" listed in your USB devices.
(Note: If there is a problem at this point, it needs to be resolved before moving on. There have been posts that eventually required corrections to power supplys, USB cables and/or hubs.)

PowerSDR Configuration

Double-click on the shortcut you created to start PowerSDR. When it first starts, it will go through a short system speed test.

The latest PennyMerge PowerSDR release features a Wizard to more easily configure HPSDR systems. If this is the first time PowerSDR has run the wizard should automatically start. Just answer the wizard's questions.

  1. Select HPSDR radio button
  2. Click Next
  3. Select the hardware you have installed on Atlas (Ozy is assumed and Alex is the filter board set not yet generally available)
  4. Click Finish
  5. Select Setup from the main menu. (note that you can also restart the wizard here)
  6. Select the General Tab.
  7. Select the HPSDR tab (next to Hardware Config)
  8. Select the correct 10MHz Clock Source for your system. (e.g. Mercury or Penelope, select Atlas if you are using Excalibur)
  9. Set Mercury as the 122.88 MHz Clock Source if using the latest code version, otherwise see this message.
  10. Click Apply if you changed anything.
  11. Select the Audio tab in the PowerSDR Setup window and confirm that the Sample Rate is 192000. (Important Note: it is possible to select a lower sample rate, but unless you are testing Mercury 2.x beta firmware releases, any sample rate other than 192000 will not work correctly.)
  12. Click Apply if necessary - then close the Setup window.

Startup

At this point you should be ready to start up the system for the first time. Click "Start" in PowerSDR and you should be good to go.

For instructions on how to operate PowerSDR, and further information on how to configure PowerSDR, please read Chapters 3, 4, 5, 6 and Appendix A of the Flex-5000 manual on the FlexRadio website...

Flex-5000 Owners Manual v1.14.0

(Note: If you receive an error message noting Ozy software is not loaded, then you probably don't have all of the release software files in your working directory. Follow the instructions above in the PowerSDR Software Installation section above and copy ALL of the release files from the SVN managed directory into your working directory. The Ozy code download files and script must be in the same directory as PowerSDR.exe.
(Note: it's normal to see a command window open and start scrolling text when you first start PowerSDR. It is not normal to see errors during startup)

Calibration

The latest version of PowerSDR allows calibration of both frequency and level. It is usually only necessary to calibrate Mercury when you update Mercury firmware or the settings file (PowerSDR.mdb) is deleted.

Level Calibration

  1. Connect a calibrated RF generator to the RF-in BNC connector on Mercury.
  2. Set the RF generator to an appropriate frequency and output level (I use 10Mhz @ 20uV or -81dBm)
  3. In the PowerSDR Setup->General->Calibration tab, set the Frequency and Level values in the Level Cal group box to match the output of your RF generator. Mosely has a nice dBm to uV table here: Microvolts to dBm Conversion Table
  4. Click the Start button in the Level Cal group box and wait for the routine to complete.

Frequency Calibration

  1. Connect a calibrated RF generator to the RF-in BNC connector on Mercury. If you intend to use WWV as the frequency calibration source, connect an appropriate antenna instead. (note: the higher the frequency used here, the more accurate the result.)
  2. In the PowerSDR Setup->General->Calibration tab, set the Frequency value in the Freq Cal group box to output frequency of your RF generator or use the appropriate WWV frequency.
  3. Click the Start button in the Freq Cal group box and wait for the routine to complete

64 bit Windows XP and Vista Installation Notes

USB Driver for Windows XP64

1. Download SIXAXIS_libusb-win64.zip from this link. Unzip this file to a temporary directory.

2. Plug in the USB cable to Ozy. Don't worry about the fact that there is no driver to install yet. Just cancel the driver installation and let it give you a warning.

3. In the temporary directory, run the program inf-wizard.exe. In the Device Selection window pick the USB device with Vender ID 0xFFFE, Product ID 0x0007 - that's Ozy. Click Next.

4. Change Manufacturer to HPSDR. Change Device name to "OZY Host Assisted Firmware Load". Click Next

5. Select a file name to save this information. I chose HPSDR.inf. Click Next then Finish.

6. Now go to System Manager and select Device Properties. Ozy should be the USB device with the yellow question mark next to it. It may be under the category "LibUSB-Win32 Devices." Right click and select "Update Driver." Select to install from a specific location and browse to your temporary directory. Click Next and Finish.

Things should now begin to work properly. PowerSDR will load Ozy over USB and the HPSDR stack will work just like it did under Windows XP 32.

Firmware Programming or Upgrade Instructions

These steps are required to program or update the firmware for various HPSDR boards. This procedure may be altered for a specific update or release. So please read any additional installation notes or instructions from the release team.

Preparation

1. Use a Subversion client (see How to use SVN) and download all the files from:

svn://206.216.146.154/svn/repos_sdr_hpsdr/trunk/USBBlaster-Binaries

2. Install the Altera Quartus II Programmer application (80MB) located here.

Note: The latest version is V9.0, be sure to install in the default directory. If you must install in a different directory then you will need to edit the appropriate upgrade batch files to reflect the change. A full application installation is required to run the command line programer (quartus_pgm.exe).

3. THE FIRST TIME YOU UPGRADE

The following procedure loads a USB Blaster capability into your Ozy. This makes it possible to update the firmware on your other HPSDR boards without purchasing additional programming hardware. Once the Ozy/USB Blaster firmware has successfully loaded, you should not have to repeat this step.

a. Connect just your Ozy board to the Atlas bus, connect the USB cable and power it on.
b. Run the file usbblaster.bat. This will load the code in the FX2 to make it appear to be an Altera USBblaster.
c. Windows will detect a new USB device. You need to install the drivers for it. Click here for driver installation instructions. What you need can be found in section 1.3.
d. The Found New Hardware Wizard will open.
Select Install from a list or specific location and browse to C:/altera/[installed version]/qprogrammer/drivers/usb-blaster. The Wizard will then install Altera USB-Blaster
Check that the drivers have installed correctly by looking in Start\Control Panel\System\Hardware\Device Manager\Universal Serial Bus controllers there should be an entry marked Altera USB-Blaster

Mercury Firmware Upgrade

  1. Power off your Atlas board.
  2. Remove all boards except Ozy.
  3. Make sure your Ozy board is placed one slot away from the power connector on Atlas.
  4. Fit a jumper on Mercury to the JP7 header pins marked LAST JTAG at bottom left of the board just above the Atlas connector.
  5. Install Mercury in the slot between Ozy and the power connector.
  6. Power up the Atlas board.
  7. Run the batch file Program-Mercury-EPCS16.bat, select which version of the Altera Quartus programmer code you are using and the Mercury firmware version you wish to load and look at the output, there should be no errors. Do not interrupt the loading process, it takes approximately 1 minute to load the EPCS16.
  8. Power off your Atlas board.
  9. Remove the jumper on JP7.
  10. Continue with additional firmware upgrades or read restarting after firmware upgrade below.

Penelope Firmware Upgrade

  1. Power off your Atlas board.
  2. Remove all boards except Ozy.
  3. Make sure your Ozy board is placed one slot away from the power connector on Atlas.
  4. Fit a jumper on Penelope to the JP7 header pins marked LAST located at the edge of the board next to the FPGA.
  5. Install Penelope in the slot between Ozy and the power connector.
  6. Power up the Atlas board.
  7. Run the batch file Program-Penelope--EPCS4.bat, select which version of the Altera Quartus programmer code you are using and the Penelope firmware version you wish to load and look at the output, there should be no errors. Do not interrupt the loading process, it takes approximately 15 seconds to load the EPCS4.
  8. Power off your Atlas board.
  9. Remove the jumper on JP7.
  10. Continue with additional firmware upgrades or read restarting after firmware upgrade below.

Janus Firmware Upgrade

  1. Power off your Atlas board.
  2. Remove all boards except Ozy.
  3. Make sure your Ozy board is placed one slot away from the power connector on Atlas.
  4. Fit a jumper on Janus to the JP12 header pins marked LAST JTAG located at the bottom left of the board just above the Atlas connector.
  5. Install Janus in the slot between Ozy and the power connector.
  6. Power up the Atlas board.
  7. Run the batch file Program-Janus-EPM240T100.bat, select which version of the Altera Quartus programmer code you are using and the Janus firmware version you wish to load and look at the output, there should be no errors. Do not interrupt the loading process; it takes approximately 5 seconds to load the EPM240T100.
  8. Power off your Atlas board.
  9. Remove the jumper on JP12.
  10. Continue with additional firmware upgrades or read restarting after firmware upgrade below.

Restarting After a Firmware Upgrade

  1. Place your HPSDR boards in thier operational slots.
  2. Download any new update for PowerSDR (there is usually a corresponding update with new firmware).
  3. Make a note of any important settings in PowerSDR. (Hint: Use Alt-PrtScn to take a screen capture of the PowerSDR settings you want to save, paste the caputre into the Paint program or other image editor, then print or save the image for reference)
  4. Make a backup copy of the settings file (PowerSDR.mdb), then delete the original. PowerSDR will rebuild it when it starts.
  5. Power cycle the supply to the Atlas bus.
  6. Make any important settings from the notes that were saved above.
  7. If necessary recalibrate Frequency and Level.
  8. Test Mercury/Penelope/Janus with PowerSDR.