Cyan Technology .

Search | Site Map | Registered Users login for Downloads and the Support Forum >> . English .   


Search Our Site

Frequently Asked Questions

Questions and answers on the following topics:


eCOG1k

eCOG1X

Software Tools - CyanIDE 2

Software Tools - CyanIDE 1.4

Development Kits


eCOG1k FAQ

Why can't I receive characters on DUART B?

There is a hardware error in channel B of the eCOG1k DUART which prevents received characters from being read via the duart.b_rx register. The received characters can be read via the duart.b_tx16 register instead.

[top] [back to list]

Why does the ADC give strange results on the eCOG1k development board?

Some early V1.2 development boards are fitted with pre-production eCOG1i devices. These devices have two problems with the analogue inputs.

  • The maximum full scale input voltage range is ±0.65V, not ±1.3V as stated in the data sheet. If the input signal exceeds these reduced limits, then the output data value wraps around from positive to negative or negative to positive full scale, without setting the overflow status bit.

Ensure that the input range of the ADC remains within ±0.65V.

  • The ADC decimation filter can lock up when the analogue input is presented with large steps (greater than ¾ full scale) faster than the filter can follow (within one clock cycle). Avoid step changes in the input voltage greater than ¾ of full scale. Special attention should be paid when switching the input multiplexer between different inputs.

The eCOG1i devices that show these problems are marked as follows:

eCOG1   501254
C64250.00    0212

Later eCOG1i devices and all eCOG1k devices do not exhibit these errors.

[top] [back to list]


eCOG1X FAQ

What are the differences between the eCOG1k and the eCOG1X?

The main differences between the eCOG1k and the eCOG1X are summarised in the following table.

  eCOG1k eCOG1X
Package 128LQFP

68QFN, 100QFN, 208BGA

Max. CPU clock speed 25MHz 70MHz
Flash memory 64KB 128KB, 256KB, 512KB
SRAM 4KB 24KB
Max. I/O lines 88 120
UARTs 2 4
Analogue inputs 4 4, 11, 14
Analogue outputs - 2
Ethernet MAC - Yes
USB interface - Yes
6 channel PWM for motor control - Yes
LCD controller - Yes

The eCOG1X also has other new features not listed here. For more information, please refer to the eCOG1X data sheet.

[top] [back to list]

What are the USB Vendor ID and Product ID numbers?

All USB devices are identified by three numbers, described here in order of importance.

  • Vendor ID (VID).
    This is a 16-bit number that is issued to the vendor of the USB devices. The allocation of these numbers is controlled by the USB Implementers Forum at www.usb.org. The VID assigned to Cyan is 0x1B45.
  • Product ID (PID).
    Once a vendor has been allocated a 16-bit VID, they can use any 16-bit PID value for their products. Normally a different PID number is assigned to each different product.
  • Serial number.
    Devices may be identified by a unique serial number. This is optional but recommended. It is used by the host PC system to distinguish between different devices with the same VID and PID.

For more information, see the details on the USB Implementers Forum web site at www.usb.org/developers/vendor.

[top] [back to list]

How do I get a USB Vendor ID and Product ID for my design?

(a) Become a member of the USB-IF. The annual membership fee is US$4000, and this includes the assignment of a vendor ID to your company (if one has not been assigned previously).

(b) Become a USB-IF non-member logo licensee. This allows you to use the USB logo in conjunction with products that pass USB-IF compliance testing. In addition, a vendor ID is assigned to your company (if one has not been assigned previously). The fee for this is US$2000 for a two-year term.

(c) Purchase a vendor ID without signing the logo license agreement. The administration fee for this purchase is US$2000. Note that if you do not sign the logo license agreement, you are not authorised to use the USB logo in conjunction with your products regardless of their testing status.

For full details, please refer to the USB Implementers Forum web site at www.usb.org/developers/vendor.

If you prefer not to buy your own VID, you can request PIDs from Cyan, for use with Cyan's VID. We do not charge for this service. The PIDs assigned to you must be used only with Cyan's VID (0x1B45) and in systems using a Cyan microcontroller with a USB interface.

Please send us the following information when requesting a block of PID numbers:

  • Name
  • Company Name
  • Country
  • Email address

Note that if the VID or PID are changed, any example device drivers provided by Cyan also need to be changed to match the new numbers. Check any .inf or .ini files for references to the VID and PID numbers.

[top] [back to list]

What is the max CPU clock freq when using the USB peripheral?

For performance applications, the high PLL provides the clock (for subsequent division) for both the USB peripheral and the memory/CPU.

In the electrical specifications, the max CPU clock is 71MHz for guaranteed operation - over the full voltage operating range (nominal +/-10%), temperature range (-40 to +85 degC) and allowing for process variations. When using the USB peripheral (which requires a 48MHz clock), the highest CPU clock frequency achievable is 64 MHz.

This can be selected by:

    - Setting the high PLL to 384 MHz, mem_clk divisor to 6 and cpu_clk      divisor to 1 which gives a 64 MHz CPU clock

    - Setting the USB peripheral clock to high PLL / 8 which gives 48 MHz.

High volume users should contact Cyan for customer-specific options.

[top] [back to list]

How do I change from the external USB PHY to the internal USB PHY on the eCOG1X development board?

When acting as a USB Host The eCOG1X must supply the VBus power to the peripheral. On the eCOG1X Development Board, this depends on which USB interface is used. When the external ULPI PHY connection on S6 is used, the MAX5008 power supply is capable of supplying up to 125mA, which is sufficient for most flash memory based USB drives. For the internal USB PHY connection on S5, the power supply output from the MAX3355 is capable of only 8mA. This is sufficient for OTG devices but not for most USB flash drives. To use this connection with a USB flash drive, it is recommended that a link is placed on the board to connect the USB VBus power directly to the +5V supply. For example, connect J33 pin 1 (VBus on the internal USB connector) and J18 pin 2 (+5V supply). To use the internal phy in this way it is best in CyanIDE2 to set the configuration to "Minimal (Internal PHY)", and then use the following set-up code to set the state of the unconnected I/O internally in the chip.

extern usb_global_t usb_global_data;
void USB_Init( void )
{
// Tell the USB Stack that the VBus is permanently supplied
usb_global_data.permanent_vbus = TRUE;

// Force OTG signals for absent pins
fd.usb.signals.sessend_out = 0;
fd.usb.signals.sessend_force = 1;

fd.usb.signals.avalid_out = 1;
fd.usb.signals.avalid_force = 1;

fd.usb.signals.bvalid_out = 1;
fd.usb.signals.bvalid_force = 1;

fd.usb.signals.vbusvalid_out = 1;
fd.usb.signals.vbusvalid_force = 1;

fd.usb.signals.iddig_out = 0;
fd.usb.signals.iddig_force = 1;
}

And then ensure it is called after the cydf_open for the CyDF USB Host Peripheral.

When acting as a USB Peripheral (eg as a keyboard) the set-up routine needs to be:

extern usb_global_t usb_global_data;
void USB_Init( void )
{

    // Tell the USB Stack that the VBus is permanently supplied 
    usb_global_data.permanent_vbus = TRUE;

    // Force OTG signals for absent pins in peripheral mode

    fd.usb.signals.sessend_out = 0;
    fd.usb.signals.sessend_force = 1;

    fd.usb.signals.avalid_out = 1;
    fd.usb.signals.avalid_force = 1;
   
    fd.usb.signals.bvalid_out = 1;
    fd.usb.signals.bvalid_force = 1;
   
    fd.usb.signals.vbusvalid_out = 1;
    fd.usb.signals.vbusvalid_force = 1;
   
   fd.usb.signals.iddig_out = 1;
   fd.usb.signals.iddig_force = 1;
}

[top] [back to list]


Software Tools - CyanIDE 2 FAQ

What are the system requirements for CyanIDE 2?

  • A Windows-based PC system.
    (minimum 1GHz CPU speed, higher speed recommended).
  • Windows XP or Windows Vista operating system.
  • 1GB free disk space.
  • 512MB memory (1GB recommended).
  • A spare USB port.
  • A spare serial port (optional).
  • System administrator privileges are required for software installation.

[top] [back to list]

What should I check before upgrading from CyanIDE 1.4 to CyanIDE 2?

CyanIDE 2 is our new development tool for the eCOG1X family and future devices. It provides a rich, fully featured environment for embedded software development using Cyan's microcontrollers. However, it may not be appropriate to upgrade immediately in all cases.

Please note the following important points:

  • CyanIDE 2 does not support the eCOG1k device. Customers using the eCOG1k should continue to use CyanIDE 1.4.X.
  • CyanIDE 2 requires the new eCOG1X USB eICE programming adaptor using the eCOG1X5A5. It does not support the older eICE adaptor based on the FTDI USB device.
    Contact Cyan Sales for more information.
  • Existing eCOG1X USB eICE adaptors used with CyanIDE 1.4 are suitable for use with CyanIDE 2. However, CyanIDE 2 and CyanIDE 1.4 require different firmware on the eICE adaptor. A firmware upgrade can be performed from within CyanIDE 2, and subsequently can be reversed using CyanIDE 1.4 if required.
  • CyanIDE 2 and CyanIDE 1.4.X can be installed on the same machine. They install into different directories and do not share path or environment variables.
  • CyanIDE 2 is supported under Windows XP and Windows Vista only. It is not supported under Windows 2000 or earlier versions.

[top] [back to list]


Software Tools - CyanIDE 1.4 FAQ

What are the system requirements for CyanIDE 1.4?

  • A Windows-based PC system.
    (minimum 1GHz CPU speed, higher speed recommended).
  • Windows 2000 or Windows XP operating system.
  • 100MB free disk space.
  • 512MB memory (1GB recommended).
  • A spare USB port (recommended) or parallel port.
  • A spare serial port (optional).
  • System administrator privileges are required for software installation.

[top] [back to list]

Why do I get the error message "QT-MT312.DLL missing" when I start CyanIDE?

This error can occur if the PATH variable has become too long, or if there are too many environment variables defined. The maximum limit for the PATH is either 127 or 255 characters depending on the system, and the default space available for environment variables is 256 bytes.

Try reducing the number of entries in the system PATH list, remove any environment variables that are no longer required, or increase the space allocated for environment variables.

[top] [back to list]

I get a fatal system error message "runprog - spawnvp" when building a project.

An error similar to this has been reported occasionally on specific machines running Windows XP. The symptoms are that the project build fails with the following errors:

Error : FATAL, System error
Description : runprog - spawnvp
Build failed (Exit code 2).

As far as we know, there are two possible causes for this error.

Ideally, both of these issues should be checked.

[top] [back to list]

Can CyanIDE and the eCOG1 Toolkit both be used on the same machine?

No, it is not recommended to have both CyanIDE and the eCOG1 Toolkit installed on the same machine. The two packages use the same environment variables with different directories, libraries and driver files. If both are installed, then one of the two packages uses the files from the other instead of its own files.

[top] [back to list]

Is it necessary to uninstall a previous version of CyanIDE before installing the new version?

Yes. Earlier versions of CyanIDE or the eCOG1 Toolkit should be uninstalled before a new version of CyanIDE is installed. Any files that have been added below the CyanIDE install directory since the previous installation (for example, any new software projects in the examples directory) are not removed when CyanIDE is uninstalled.

[top] [back to list]

If I change from one USB evaluation board to another, the "Found New Hardware" wizard starts. Is this a problem?

This is normal. When a USB device is plugged in to a PC, the PC runs through a process known as enumeration. In this process Windows reads the details of the device from the EEPROM on the device, including the serial number. If these details match with a set already in the registry, the appropriate device driver is loaded automatically.

As the serial number is used in the enumeration process and each Cyan USB device has a unique serial number, then when any Cyan USB device is connected to a computer for the first time, the "New Hardware Wizard" is triggered. Once this has happened once for that particular serial number, then subsequently the drivers are loaded automatically when the same device is connected again.

[top] [back to list]

Do I need Administrator privileges to install CyanIDE under Windows 2000 or XP?

Yes. The CyanIDE installation copies device drivers for the eICE debug port to the system directories, and also sets up the PATH and environment variables. These actions will fail unless you have Administrator privileges on the machine when installing the package.

[top] [back to list]

How can I use CyanIDE under Windows NT4 without USB support?

The standard eICE driver with CyanIDE V1.1-V1.3 includes support for both parallel port and USB eICE connections. This fails under Windows NT4 which has no support for USB.
There is a copy of the parallel port only driver for the eICE debugger in the CyanIDE installation, in the directory <C:\Program Files\Cyan Technology\CyanIDE\bin\pport>.
Copy the file <eice.dll> from this directory to <C:\WinNT\System32>, replacing the one already there which includes the USB support.
This allows you to run CyanIDE V1.3 and the eICE debugger under NT4 without USB support.

CyanIDE 1.4 no longer includes support for the parallel port eICE driver and so it cannot be used under Windows NT4.

[totop] [back to list]

I get an error message "The eCOG1 flash programmer is not responding as expected" when downloading a compiled project to the target system.

This can indicate that there are timing problems with the eICE communications between the host PC and the target device. It may occur only on some specific host machines.
Check for any updates to CyanIDE or the eICE driver (eice.dll) on the Software Downloads page. If there is a newer version of the eICE driver, download the new version (file eICE_dll.zip), unzip the file, copy it to the Windows\System32 or WINNT\System32 directory.

[top] [back to list]

The CyanIDE installation fails with the following error message:
"C:\WINDOWS\SYSTEM32\AUTOEXEC.NT. The system file is not suitable for running MS-DOS and Microsoft Windows applications". What's the problem?

This error message indicates a possible problem with the autoexec.nt file on your system. Further information related to this error may be found on these web pages.

http://support.microsoft.com/default.aspx?scid=kb;en-us;324767
http://kb.bighammer.com/article.aspx?id=10003

Please note that Cyan is not responsible for the content of any external web sites. Any files downloaded from any web site should be checked for viruses or spyware before use.

[top] [back to list]

How can I find out the size of my compiled program?

The easiest way to check the code size is to look at the file <project.sec> in the output directory. This is new to CyanIDE V1.3, and shows a summary of the fixed memory segments. Here is the summary for the led example project.  

Section Type Address Size
C_RESERVED1 USER_SEG 0000 0001
CODE CODE_SEG  0000 0D95
CONST CONST_SEG 0001 0051
TOTAL     ODE7
VAR VAR_SEG EDF5 0003
C_RESERVED2 USER_SEG EFB8 0048
REGISTERS USER_SEG FEA0 0130
TOTAL     071B

The first block lists the code and constant data segments located in flash mmeory, and the second block lists the non-constant data segments located in RAM. The first total is the amount of flash occupied, including the code, any reserved data space and constants. The second total is the amount of RAM required for static data, not including the dynamic data areas for the heap, user stack and interrupt stack.

[top] [back to list]

I get an error message "Failed to change CPU clock whilst loading program" when attempting to download and debug an application.

If you use a new 1X eICE adaptor, programmed with firmware for CyanIDE 2, with the CyanIDE 1.4 environment, then it fails when downloading the application code and reports the following error messages.

Searching for eICE devices.
Trying eCOG1X on eICE id 0, chip 1...
Using Debug Interface v2. Serial number -16843010 Incompatible Firmware version
Connected to eCOG1X on eICE id 0, chip 1
Failed to change CPU clock whilst loading program eCOG1x execution environment.

The important part of this error message is the text "Using Debug Interface v2. ... Incompatible Firmware Version". This indicates that the eICE adaptor is programmed with the correct firmware for use with CyanIDE 2, not CyanIDE 1.4.

The firmware in the eICE adaptor can be reprogrammed from within CyanIDE 1.4, as follows:

  • Connect the adaptor to the host PC.
  • Start CyanIDE and open a project.
  • Select Tools->Debug Interface from the main menu. It scans for a connected eICE adaptor and reports its firmware version information in the Status area of the dialogue. The firmware version available for reprogramming the adaptor is listed in the Reprogramming area of the dialogue.
  • If it is different to that reported in the Status area and you wish to update the adaptor to this version, then click on the Reprogram button. Wait for the programming process to complete before exiting from CyanIDE and disconnecting the adaptor.

The eICE adaptor is now reprogrammed with the correct firmware for use with the CyanIDE 1.4 debugger.

[top] [back to list]


Development Kits FAQ

I get the message "eICE Write - eICE found LOADB unexpectedly low" when I start the emulator with the parallel cable plugged in.

There may be a misconfiguration in the PC's parallel port or a fault with the hardware. To test this, start the emulator with the parallel cable disconnected. If the error message persists the problem is with the parallel port. Make sure you have configured it for ECP mode (usually done via the BIOS).

If the message changes to "eICE Write - eICE timed out waiting for LOADB to become low" the problem is probably with the cable or hardware.

[top] [back to list]

Why can't I drive PortC_3 (GPIO16) on the eCOG1k development board V2.1?

PortC_3 is connected to the INTR0 output of U10 - LAN91C111-NE and hence can only be used as an input.

[top] [back to list]