ADI iSensor FX3 Firmware  v2.9.4-pub
Firmware for the Analog Devices EVAL-ADIS-FX3 IMU Evaluation Platform. This firmware can be compiled using the Cypress EZ USB Suite IDE
Typedefs | Enumerations | Functions
HelperFunctions.h File Reference

Header file for a set of general purpose iSensor FX3 helper functions. More...

#include "main.h"

Go to the source code of this file.

Typedefs

typedef enum DutVoltage DutVoltage
 

Enumerations

enum  DutVoltage { Off = 0, On3_3Volts = 1, On5_0Volts = 2 }
 

Functions

void AdiConfigureWatchdog ()
 Configures the FX3 watchdog timer based on the current board state. More...
 
void AdiGetBuildDate (uint8_t *outBuf)
 Gets the firmware build date, followed by the build time. More...
 
void AdiSendStatus (uint32_t status, uint16_t count, CyBool_t isControlEndpoint)
 Sends status back to PC over control endpoint or manual bulk in endpoint. More...
 
CyU3PReturnStatus_t AdiSetDutSupply (DutVoltage SupplyMode)
 This function configures the DUT supply voltage. More...
 
CyU3PReturnStatus_t AdiSleepForMicroSeconds (uint32_t numMicroSeconds)
 This function blocks thread execution for a specified number of microseconds. More...
 
void AdiReturnBulkEndpointData (CyU3PReturnStatus_t status, uint16_t length)
 Sends a function result to the PC via the ChannelToPC endpoint. More...
 

Detailed Description

Header file for a set of general purpose iSensor FX3 helper functions.

Copyright (c) 2018-2020 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors.

THIS SOFTWARE UTILIZES LIBRARIES DEVELOPED AND MAINTAINED BY CYPRESS INC. THE LICENSE INCLUDED IN THIS REPOSITORY DOES NOT EXTEND TO CYPRESS PROPERTY.

Use of this file is governed by the license agreement included in this repository.

Date
6/17/2020
Author
A. Nolan (alex..nosp@m.nola.nosp@m.n@ana.nosp@m.log..nosp@m.com)

Typedef Documentation

◆ DutVoltage

typedef enum DutVoltage DutVoltage

Enum of possible DUT supply voltages

Enumeration Type Documentation

◆ DutVoltage

enum DutVoltage

Enum of possible DUT supply voltages

Enumerator
Off 

DUT supply off

On3_3Volts 

DUT supply on, at 3.3V regulated output

On5_0Volts 

DUT supply on, at 5V USB output

Function Documentation

◆ AdiConfigureWatchdog()

void AdiConfigureWatchdog ( )

Configures the FX3 watchdog timer based on the current board state.

Returns
void

The watchdog is cleared by a software timer managed in the threadX RTOS. The clear interval is set to 5 seconds less than the watchdog period. If the watchdog timer elapses without being reset (software is locked up) then the FX3 firmware undergoes a hard reset and will reboot onto the second stage bootloader. This will cause an UnexpectedReset event to be raised in the running instance of the FX3Connection (if the FX3 board is connected).

◆ AdiGetBuildDate()

void AdiGetBuildDate ( uint8_t *  outBuf)

Gets the firmware build date, followed by the build time.

Parameters
outBufChar array which build date/time is placed into
Returns
void

◆ AdiReturnBulkEndpointData()

void AdiReturnBulkEndpointData ( CyU3PReturnStatus_t  status,
uint16_t  length 
)

Sends a function result to the PC via the ChannelToPC endpoint.

Parameters
statusThe status code to place in the BulkEndpointBuffer (0 - 3)
lengthThe number of bytes to send to the PC over the bulk endpoint
Returns
void

This function is used to allow early returns out of long functions in the case where an invalid setting or operation is detected. Once this function is called, and the result sent to the PC, the function can be safely exited.

◆ AdiSendStatus()

void AdiSendStatus ( uint32_t  status,
uint16_t  count,
CyBool_t  isControlEndpoint 
)

Sends status back to PC over control endpoint or manual bulk in endpoint.

Parameters
statusThe status code to send back. Is placed in USBBuffer[0-3]
countThe number of bytes to send. Must be at least 4
isControlEndpointBool indicating if data should be sent over control endpoint or bulk endpoint
Returns
void

This function will overwrite the data in USBBuffer[0-3]. If you need to send extra data along with the status, it must be placed starting at USBBuffer[4].

◆ AdiSetDutSupply()

CyU3PReturnStatus_t AdiSetDutSupply ( DutVoltage  SupplyMode)

This function configures the DUT supply voltage.

Parameters
SupplyModeThe DUT Voltage to set (Off, 3.3V, 5V)
Returns
A status code indicating the success of the functions.

This function sets the control pins on the LTC1470 power switch IC. This IC allows software to power cycle a DUT or give it 3.3V/5V to Vdd. This feature only works on the in-house ADI iSensors FX3 Eval board. It does not function on the iSensor FX3 Eval board based on the Cypress Explorer kit.

◆ AdiSleepForMicroSeconds()

CyU3PReturnStatus_t AdiSleepForMicroSeconds ( uint32_t  numMicroSeconds)

This function blocks thread execution for a specified number of microseconds.

Parameters
numMicroSecondsThe number of microseconds to stall for.
Returns
A status code indicating the success of the function.