You are on page 1of 5

Legacy documentation refer to the Altium Wiki for current information

Updating the Firmware on the Desktop NanoBoard NB2DSK01


Summary
Application Note AP0155 (v2.0) May 15, 2008

Intelligence for the Desktop NanoBoard NB2DSK01 is provided courtesy of firmware running in the board's NanoTalk Controller. This application note describes how to update this firmware, which gets loaded into the NanoTalk Controller at power-up.

The Desktop NanoBoard NB2DSK01 uses a Xilinx Spartan-3 device (XC3S1500-4FG676C) as the controller for the board. Referred to as the NanoTalk Controller, this device (designated U5) communicates with the host PC using Altium's NanoTalk communications protocol. It is responsible for managing JTAG communications with the following: Parallel and USB PC interfaces System JTAG header FPGA daughter board Peripheral boards Master/Slave daisy-chain User Board headers Host status LEDs 1-Wire memory devices (used for identification) on motherboard, daughter board, peripheral boards and Desktop Stereo Speaker Assembly NB2DSK-SPK01 TFT LCD panel Touch Screen Digitizer SPI Master clock SPI Flash memory Real-Time Clock (RTC) SPI resources on peripheral boards SPI-compatible LED drivers on the attached Desktop Stereo Speaker Assembly NB2DSK-SPK01

The NanoTalk Controller also manages/communicates with the following areas of the board:

and the following SPI-based resources:

It is the NanoTalk Controller into which the intelligence for the system the NanoBoard firmware is programmed. This upgradeable firmware is stored in a Xilinx Platform Flash Configuration PROM device (XCF08PFS48C), designated U7 on the board. On power-up, the firmware is automatically loaded from the Configuration PROM into the NanoTalk Controller. Note: The version of firmware currently loaded into the Configuration PROM can be identified in two places. Firstly, underneath the icon for the NanoBoard in the NanoBoard chain of the Devices view (View Devices View). Secondly, from the TFT LCD panel on the NB2DSK01 motherboard itself. For detailed information on the Desktop NanoBoard NB2DSK01, refer to the document TR0143 Technical Reference Manual for Altium's Desktop NanoBoard NB2DSK01.

AP0155 (v2.0) May 15, 2008

Legacy documentation refer to the Altium Wiki for current information


Updating the Firmware on the Desktop NanoBoard NB2DSK01

Pre-update Preparation
Before the new version of firmware can be downloaded to the Configuration PROM, the Desktop NanoBoard NB2DSK01 must first be prepared as follows: 1. Turn off the NB2DSK01. 2. Connect from the PC to the 'SYSTEM JTAG' header on the NB2DSK01 (at the left-hand edge of the board). This is a fixed function header which, when used, switches control of the NB2DSK01 from the NanoTalk Controller to a simple hardware chain, which involves the NanoTalk Controller and the Configuration PROM. Connection to the 'SYSTEM JTAG' header involves the use of Altium's Universal JTAG Interface, to convert from parallel or USB cabling to 10-way IDC JTAG cabling. This interface device, along with various connection cables, is shipped with the Altium Designer software. Note: The selector switch on the Universal JTAG Interface is used only when programming a JTAG device from Altera Quartus II or Xilinx ISE tools directly, and via their associated parallel cabling. The switch position has no relevance when programming the Configuration PROM from Altium Designer. 3. Power-up the NB2DSK01.

Figure 1. The Universal JTAG Interface facilitates connection to the 'SYSTEM JTAG' header.

Downloading the New Firmware


Within Altium Designer, open the Devices view (View Devices View), if not already open. Ensure that the Live option is enabled as this activates the auto-board-recognition system. With the connection to the 'SYSTEM JTAG' header in place, the Configuration PROM device will appear in the Hard Devices chain, as shown in Figure 2.

Figure 2. Accessing the Configuration PROM device.

The configuration for the device is stored in a PROM file, using the Intel MCS-86 format. This is an ASCII hex file with extension .mcs. To download the new configuration: 4. Right-click on the icon for the Configuration PROM in the Hard Devices chain of the Devices view and select Choose File and Download from the pop-up menu. 5. The Choose Programming File For Xilinx XCF XCF08PFS48C dialog appears. Use this dialog to navigate to the required programming file ( *.mcs) and click Open. By default, this file is located in the \System folder of the installation.

AP0155 (v2.0) May 15, 2008

Legacy documentation refer to the Altium Wiki for current information


Updating the Firmware on the Desktop NanoBoard NB2DSK01 The download will proceed, with progress shown in Altium Designer's Status bar. The process actually consists of device erasure, device programming, and then verification of programming. At the end of the cycle, an information dialog will appear with the result of the download. Successful programming is reflected in the text beneath the device's icon changing to Programmed. If any errors occur during the download, a warning dialog will appear. If this happens, power-down the NB2DSK01 for a few seconds and then run the download process again.

Downloading Program Code


The .mcs file downloaded to the Configuration PROM contains the FPGA design destined to reside on the NB2DSK01 motherboard's Spartan-3 FPGA device (the NanoTalk Controller). Within that design is a TSK3000A processor, the embedded code for which also needs to be downloaded as part of the overall process of updating the firmware on the NanoBoard. The .mcs file contains the portion of embedded code that is to reside in Block RAM within the NanoTalk Controller. The remainder of the embedded code must be saved into the common-bus Flash memory resident on the motherboard. To do this, perform the following: 6. Cycle the power for the NB2DSK01. The TFT LCD panel will show the current version of firmware loaded into the Configuration PROM. As the embedded code in the Flash memory will not be the same version the message ' Program code is not present in flash or is out of date ' will be displayed. In addition, the text underneath the icon for the Configuration PROM will change to Read Protected. 7. From the Devices view, access the Program NB2 Firmware command from the main Tools menu. 8. From the subsequent Choose NB2 firmware hex file dialog that appears, locate the required embedded object file (*.hex) and click Save. By default, this file is also located in the \System folder of the installation and will typically have the same name as the .mcs file. 9. After a short delay, text will appear on the TFT LCD panel, showing first that the Flash memory is being erased, and then that the embedded code is being downloaded. Once the download has finished, the total number of bytes downloaded will be displayed. 10. Press any of the NB2DSK01's generic user switches, located below the TFT LCD panel. The firmware will be rebooted and the embedded code stored in the Flash memory will be loaded into SRAM on the motherboard.

Testing the NB2DSK01


Once the Configuration PROM device has been successfully programmed and the corresponding Hex file has been loaded into the Flash memory, the new firmware can be tested as follows: 1. Power-down the NB2DSK01. 2. Remove the cable from the 'SYSTEM JTAG' header. 3. Re-connect the NB2DSK01 to the PC, using either the parallel port or the USB port. 4. Power-up the NB2DSK01. 5. Ensure that the Live option (in the Devices view) is enabled, to activate the auto-board-recognition system. 6. In the Devices view, press F5 (Refresh). This forces a scan of the hardware to detect which devices are currently connected. The NanoTalk Controller for the connected NB2DSK01 should automatically be detected and an icon for the board appear in the NanoBoard chain (the top chain in the Devices view). The FPGA device on the daughter board should be automatically detected and appear in the Hard Devices chain (the middle chain in the Devices view). Figure 3 illustrates detection of an NB2DSK01 which has a Xilinx Spartan-3 daughter board (DB30) attached.

AP0155 (v2.0) May 15, 2008

Legacy documentation refer to the Altium Wiki for current information


Updating the Firmware on the Desktop NanoBoard NB2DSK01

Figure 3. Successful detection of Desktop NanoBoard NB2DSK01 and target FPGA device.

7. Open an FPGA project that includes one or more Nexus-enabled devices (e.g. processors, counters, logic analyzers) and that is appropriately configured to target the FPGA device on the DB30 daughter board. Go ahead and program the FPGA on the daughter board. This will test that the Soft Devices JTAG chain is functioning correctly (presented as the bottom chain in the Devices view, once the design is downloaded into the target physical device).

Figure 4. Successful communications with a Nexus-enabled device in the Soft Devices JTAG chain.

8. With the chosen design running in the FPGA, double-click on the icon for the NB2DSK01 (in the NanoBoard chain of the Devices view). The Instrument Rack NanoBoard Controllers panel will appear. Use the instrument panel to change the system clock frequency. This will write the new clock frequency to the system clock, which, being an SPI device, will test that communication to SPI devices is working correctly.

AP0155 (v2.0) May 15, 2008

Legacy documentation refer to the Altium Wiki for current information


Updating the Firmware on the Desktop NanoBoard NB2DSK01

Figure 5. Reprogramming the SPI-based programmable system clock.

As well as writing the new frequency to the clock, the value will also be stored in the common-bus Flash memory and read back by the NanoTalk Controller to verify the change. As the new frequency is stored in the Flash memory, it is persistent across both design sessions and hardware sessions. Therefore, closing Altium Designer, relaunching and opening an FPGA project (or cycling the NB2DSK01's power) will result in the last clock frequency entered being used.

Revision History
Date 17-Oct-2007 17-Dec-2007 15-May-2008 Version No. 1.0 1.1 2.0 Revision Initial release Updated for Altium Designer 6.9 Updated for Altium Designer Summer 08

Software, hardware, documentation and related materials: Copyright 2008 Altium Limited. All Rights Reserved. The material provided with this notice is subject to various forms of national and international intellectual property protection, including but not limited to copyright protection. You have been granted a non-exclusive license to use such material for the purposes stated in the end-user license agreement governing its use. In no event shall you reverse engineer, decompile, duplicate, distribute, create derivative works from or in any way exploit the material licensed to you except as expressly permitted by the governing agreement. Failure to abide by such restrictions may result in severe civil and criminal penalties, including but not limited to fines and imprisonment. Provided, however, that you are permitted to make one archival copy of said materials for back up purposes only, which archival copy may be accessed and used only in the event that the original copy of the materials is inoperable. Altium, Altium Designer, Board Insight, DXP, Innovation Station, LiveDesign, NanoBoard, NanoTalk, OpenBus, P-CAD, SimCode, Situs, TASKING, and Topological Autorouting and their respective logos are trademarks or registered trademarks of Altium Limited or its subsidiaries. All other registered or unregistered trademarks referenced herein are the property of their respective owners and no trademark rights to the same are claimed. v8.0 31/3/08.

AP0155 (v2.0) May 15, 2008

You might also like