Click or drag to resize

FX3Connection Methods

The FX3Connection type exposes the following members.

Methods
  NameDescription
Public methodBitBangReadReg16
Read a standard iSensors 16-bit register using a bitbang SPI connection
Public methodBitBangSpi
Perform a bit banged SPI transfer, using the config set in BitBangSpiConfig.
Public methodBitBangWriteRegByte
Write a byte to an iSensor register using a bitbang SPI connection
Public methodBootloaderBlinkLED
BOOTLOADER FW: Blink the on-board LED
Public methodBootloaderTurnOffLED
BOOTLOADER FW: Turn off the LED
Public methodBootloaderTurnOnLED
BOOTLOADER FW: Turn on the LED
Public methodCancelStreamAsync
Cancel a any running stream
Public methodClearBurstMode
Takes interface out of burst mode by setting BurstMode to zero.
Public methodClearErrorLog
Clear the error log stored in flash
Public methodConnect
Attempts to program the selected FX3 board with the application firmware. The FX3 board should be programmed with the ADI bootloader.
Public methodDisconnect
This function sends a reset command to the specified FX3 board, or does nothing if no board is connected
Public methodDisconnect(String)
Overload of Disconnect which lets you specify the FX3 serial number to disconnect. Returns a boolean indicating if the board was disconnected.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFX3CodeRunningOnTarget
Function which checks if the FX3 is connected and programmed
Public methodGetBuffer
Gets one frame from the thread safe queue. Waits to return until a frame is available if there is a stream running. If there is not a stream running, and there is no data in the queue this call returns "Nothing".
Public methodGetBufferedStreamDataPacket
This function returns a single buffered stream packet. Needed for IBufferedStreamProducer
Public methodGetErrorLog
Gets the current error log from FX3 flash memory
Public methodGetErrorLogCount
Get the number of errors logged to the FX3 flash memory
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetI2CBuffer
Get I2C buffer from I2C read stream
Public methodGetPinPWMInfo
Allows the user to retrieve a set of information about the current pin PWM configuration.
Public methodGetStreamDataPacketU16
This function does the same thing as GetBufferedStreamDataPacket()
Public methodGetTimerValue
This function reads the current value from the 10MHz timer running on the FX3
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodI2CReadBytes
Read bytes from an I2C slave device attached to the FX3.
Public methodI2CWriteBytes
Write bytes to an I2C slave device attached to the FX3
Public methodISpi32StopStream
ISpi32 StopStream implementation. Calls generic version.
Public methodisPWMPin
This function checks to see if the selected pin has already been configured to act as a PWM output pin.
Public methodMeasureBusyPulse(Byte, IPinObject, UInt32, UInt32)
Overload of measure busy pulse which triggers the DUT event using a SPI write instead of a pin drive.
Public methodMeasureBusyPulse(IPinObject, UInt32, UInt32, IPinObject, UInt32, UInt32)
This function triggers a DUT action using a pulse drive, and then measures the following pulse width on a separate busy line. The pulse time on the busy pin is measured using a 10MHz timer with approx. 0.1us accuracy.
Public methodMeasurePinDelay
This function measures the time delay between toggling a trigger pin, and a state change on the busy pin. This can be used to measure the propagation delay between a sync edge and data ready being de-asserted.
Public methodMeasurePinFreq
Measures the frequency of an input signal to the selected pin.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPulseDrive
This function drives a pin to the specified level for a given time interval in ms
Public methodPulseWait
This function waits for a pin to reach a specified level
Public methodPurgeBadFrameData
This function checks the CRC of each real time streaming frame stored in the Stream Data Queue, and purges the bad ones. This operation is only valid for an ADcmXL series DUT.
Public methodReadDRFreq
Reads the measured DR value
Public methodReadFlash
Read data from the FX3 non-volatile memory
Public methodReadPin
Reads the value of a GPIO pin on the FX3
Public methodReadPins(IPinObject)
Reads a list of FX3 GPIO pins. This function calls the overload which takes an IEnumerable
Public methodReadPins(IEnumerableIPinObject)
Reads a list of FX3 GPIO pins
Public methodReadRegArray(IEnumerableUInt32)
Reads an array of 16 bit register values.
Public methodReadRegArray(IEnumerableAddrDataPair, UInt32)
ReadRegArray overload which includes register writes. Breaks the call into multiple calls of readRegByte and writeRegByte
Public methodReadRegArray(IEnumerableUInt32, UInt32)
Overload of ReadRegArray which builds a new IEnumerable of addr and call the overload which takes an enumerable of addr
Public methodReadRegArrayStream(IEnumerableAddrDataPair, UInt32, UInt32)
This is the most generic array register function. All other array read/write functions call down to this one.
Public methodReadRegArrayStream(IEnumerableUInt32, UInt32, UInt32)
Public methodReadRegByte
This is the most general ReadRegByte. Other implementations are based on this.
Public methodReadRegWord
Reads a single 16 bit register on the DUT
Public methodReadTime
Not implemented
Public methodReset
Drives the Reset pin low for 10ms, sleeps for 100ms, and then blocks until the ReadyPin is high (500ms timeout)
Public methodResetAllFX3s
Looks for and resets boards in application mode. Should only be called at program start, after InitBoardList() Note: Should not be used if running multiple instances of the GUI.
Public methodRestoreHardwareSpi
Resets the hardware SPI pins to their default operating mode. Can be used to recover the SPI functionality after a bit-bang SPI transaction over the hardware SPI pins without having to reboot the FX3.
Public methodSetBitBangSpiFreq(Double)
Sets the SCLK frequency for a bit bang SPI connection.
Public methodSetBitBangSpiFreq(UInt32)
Set the SCLK frequency for a bit banged SPI connection. Overloaded to allow for a UInt
Public methodSetBitBangStallTime
Set the bit bang SPI stall time. Driven by a clock with resolution of 49.3ns
Public methodSetPin
Sets the value of a FX3 GPIO pin. This value will persist until the pin is set to a different value, or read from
Public methodSetPinResistorSetting
Set the FX3 GPIO input stage pull up or pull down resistor setting. All FX3 GPIOs have a software configurable pull up / pull down resistor (10KOhm).
Public methodSetupBurstMode
Puts interface into burst mode by setting burstMode to match word count.
Public methodStart
This function is not currently implemented. Calling it will throw a NotImplementedException.
Public methodStartBufferedStream(IEnumerableAddrDataPair, UInt32, UInt32, Int32, BackgroundWorker)
Starts a buffered stream operation. This is usually called from the TextFileStreamManager. DUTType must be set before executing.
Public methodStartBufferedStream(IEnumerableUInt32, UInt32, UInt32, Int32, BackgroundWorker)
Starts a buffered stream operation. The registers listed in addr are read numCaptures times per register buffer. This process is repeated numBuffers times.
Public methodStartBurstStream
Function to start a burst read using the BurstStreamManager
Public methodStartGenericStream
Starts a generic data stream. This allows you to read/write a set of registers on the DUT, triggering off the data ready if needed. The data read is placed in the thread-safe queue and can be retrieved with a call to GetBuffer. Each "buffer" is the result of reading the addr list of registers numCaptures times. For example, if addr is set to [0, 2, 4] and numCaptures is set to 10, each buffer will contain the 30 register values. The total number of register reads performed is numCaptures * numBuffers
Public methodStartI2CStream
Start an asynchronous I2C read stream. This stream runs on the stream thread and places all data in a thread safe queue. The data can be retrieved using GetI2CBuffer()
Public methodStartPWM
This function configures the selected pin to drive a pulse width modulated output.
Public methodStartRealTimeStreaming
This function starts real time streaming on the ADcmXLx021 (interface and FX3). Specifying pin exit is optional and must be 0 (disabled) or 1 (enabled)
Public methodStartStream
Starts a buffered stream for only a single buffer. This is equivalent to StartBufferedStream(addr, numCaptures, 1, CurrentTimeout, Nothing)
Public methodStopPWM
This function call disables the PWM output from the FX3 and returns the pin to a tri-stated mode.
Public methodStopRealTimeStreaming
This function stops real time streaming on the ADcmXLx021 (stream thread in FX3 API and FX3 firmware)
Public methodStopStream
Stops the currently running data stream, if any.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransfer
This function performs a single bi-directional 32 bit SPI transaction. If DrActive is set to false the transfer is performed asynchronously. If DrActive is set to true, the transfer should wait until a data ready condition (determined by DrPin and DrPolarity) is true.
Public methodTransferArray(IEnumerableUInt32)
This function performs an array bi-directional SPI transfer. WriteData.Count() total SPI transfers are performed. If DrActive is set to true, the transfer should wait until a data ready condition (determined by DrPin and DrPolarity) is true, and then perform all SPI transfers. If DrActive is false it is performed asynchronously.
Public methodTransferArray(IEnumerableUInt32, UInt32)
This function performs an array bi-directional SPI transfer. This overload transfers all the data in WriteData numCaptures times. The total number of SPI words transfered is WriteData.Count() * numCaptures. If DrActive is set to true, the transfer should wait until a data ready condition (determined by DrPin and DrPolarity) is true, and then perform all SPI transfers. If DrActive is false it is performed asynchronously.
Public methodTransferArray(IEnumerableUInt32, UInt32, UInt32)
This function performs an array bi-directional SPI transfer. If DrActive is set to true, this overload transfers all the data in WriteData numCaptures times per data ready condition being met. It captures data from numBuffers data ready signals. If DrActive is set to false, all the transfers are performed asynchronously. The total number of SPI transfers is WriteData.Count()*numCaptures*numBuffers. The following pseduo-code snippet would perform 400 total SPI transfers, across 100 data ready conditions. MOSI = {0x1234, 0x5678} myISpi32.DrActive = True MISO = myISpi32.TransferArray(MOSI, 2, 100) During the transfers, the SPI bus would look like the following: MOSI: ---(0x1234)---(0x5678)---(0x1234)---(0x5678)-----------------(0x1234)---(0x5678)---(0x1234)---(0x5678)--...-----(0x1234)-----(0x5678)-----(0x1234)-----(0x5678)-- MISO:----MISO(0)----MISO(1)----MISO(2)----MISO(3)------------------MISO(4)----MISO(5)----MISO(6)----MISO(7)---...-----MISO(196)----MISO(197)----MISO(198)----MISO(199)- DR: ___|¯¯¯|_____________________________________________________|¯¯¯|______________________________________..._____|¯¯¯|____________________________________________
Public methodUserLEDBlink
Blink user LED using timer hardware (not available on Cypress Explorer FX3 board)
Public methodUserLEDOff
Turn off user LED (not available on Cypress Explorer FX3 board)
Public methodUserLEDOn
Turn on user LED (not available on Cypress Explorer FX3 board)
Public methodWaitForBoard
This function is used to wait for an FX3 to be programmed with the ADI bootloader. In general, the programming model would go as follows, to connect and program the first board attached: Dim myFX3 as FX3Connection = New FX3Connection(firmwarepath, bootloaderpath, devicetype) If Not myFX3.WaitForBoard(10) Then Msgbox("No boards found") Exit Sub End If myFX3.Connect(myFX3.AvailableFX3s(0))
Public methodWaitForStreamCompletion
Overload of WaitForStreamCompletion which blocks indefinitely until a stream completion event is seen.
Public methodWaitForStreamCompletion(Int32)
Blocks until the streaming endpoint mutex can be acquired. Allows a user to synchronize external application the completion of a stream. Returns false if there is not a stream running, or if the timeout is reached without the stream mutex being acquired.
Public methodWriteReadTransferArray
Array transfer which performs an initial SPI transmit (MOSI only, no read back) then starts a read stream. This is useful if you need to issue a write to the DUT, then immediately start reading back data, without the USB transfer overhead of approx 150us
Public methodWriteRegByte(AddrDataPair)
This function writes a single register byte, given as an Address / Data pair
Public methodWriteRegByte(IEnumerableAddrDataPair)
This function writes an enumerable list of data to the DUT as AddrDataPairs
Public methodWriteRegByte(IEnumerableUInt32, IEnumerableUInt32)
Overload of WriteRegByte which allows for multiple registers to be specified to write to, as an IEnumerable list of register addresses.
Public methodWriteRegByte(UInt32, UInt32)
This is the most general WriteRegByte, which the others are based on
Public methodWriteRegWord
This function is not currently implemented. Calling it will throw a NotImplementedException.
Top
Explicit Interface Implementations
See Also