WIENER, Plein & Baus GmbH
31
www.wiener-d.com
6.13 xxusb_flashblock_program
The xxusb_flashblock_program function programs one sector of 256 bytes of the flash
memory (FPGA configuration memory)
WORD xxusb_usbfifo_read{
HANDLE
hDevice,
UCHAR
*pData,
};
Parameters
hDevice
[in] Handle to the XX-USB device.
pData
[out] Pointer to the configuration (byte) data array.
Return Values
On success, the function returns the number of bytes written to XX-USB – the correct
number is 518.
Function returns a negative number on a failure, which in most cases signifies a timeout
condition.
Remarks
To program the flash memory, one must call repeatedly xxusb_flashblock_program, while
pausing for at least 30ms between consecutive calls and incrementing the pointer to the data
array by 256 on each consecutive call. The device must be in programming mode with the
rotary selector in one of the 4 “P” positions.
The configuration file of a XC3S200 FPGA of CC-USB will occupy 512 sectors of flash
memory (512 calls to the xxusb_flashblock_program). The XC3S400 FPGA of VM-USB
will occupy 830 sectors of flash memory.