EasyManuals Logo

Cypress EZ-USB FX3 User Manual

Cypress EZ-USB FX3
660 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #193 background imageLoading...
Page #193 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 193
Low Performance Peripherals (LPP)
Table 8-4. Modes Supported by Complex GPIO
8.9.4 Examples
This section shows an example code to configure and use FX3 GPIOs.. APIs to access the GPIO block are provided with the
FX3 SDK. Refer to the Cyu3gpio.c file located at C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\lpp_source
(after FX3 SDK installation) for the source code of GPIO-related APIs. Refer to FX3APIGuide.pdf located at C:\Program Files
(x86)\Cypress\EZ-USB FX3 SDK\1.3\doc for more details on the FX3 APIs.
8.9.4.1 Initialize GPIO Block
The CyU3PGpioInit API initializes the FX3 GPIO block, and its definition follows.
CyU3PGpioInit (CyU3PGpioClock_t *clk_p, CyU3PGpioIntrCb_t irq)
Mode Name Description of Functionality Achieved
0 STATIC Use as simple GPIO, drive output to static value and/or observe input value.
1 TOGGLE When TIMER=THRESHOLD, change value of output.
2 SAMPLENOW
Set THRESHOLD=TIMER now. This is a method to observe a current value of the running TIMER register, which is not
readable.
3 PULSENOW
â–  Toggle the pin value immediately.
â–  Set TIMER=0.
â–  When TIMER=THRESHOLD, toggle output back.
â–  Set MODE=STATIC.
4PULSE
â–  Toggle value when TIMER=0.
â–  When TIMER=THRESHOLD, toggle output back.
â–  Set MODE=STATIC.
5PWM
Toggle value when TIMER=0.
When TIMER=THRESHOLD, toggle output back.
6 MEASURE_LOW
Measure the time a signal is low and continue doing so.
Set TIMER=0 on negative edge (negedge) of input.
Set THRESHOLD=TIMER on positive edge (posedge) of input.
7 MEASURE_HIGH
Measure the time a signal is high and continue doing so.
Set TIMER=0 on posedge of input.
Set THRESHOLD=TIMER on negedge of input.
8 MEASURE_LOW_ONCE
Measure the time a signal is low once and then stop.
Set TIMER=0 on negedge of input.
Set THRESHOLD=TIMER on posedge of input.
Set MODE=STATIC.
9 MEASURE_HIGH_ONCE
Measure the time a signal is high once and then stop.
Set TIMER=0 on posedge of input.
Set THRESHOLD=TIMER on negedge of input.
Set MODE=STATIC.
10 MEASURE_NEG
Measure when a signal goes low and continue doing so.
Set THRESHOLD=TIMER on negedge.
11 MEASURE_POS
Measure when a signal goes high and continue doing so.
Set THRESHOLD=TIMER on posedge.
12 MEASURE_ANY
Measure when a signal changes and continue doing so.
Set THRESHOLD=TIMER on posedge or negedge.
13 MEASURE_NEG_ONCE
Measure when a signal goes low once and then stop.
Set THRESHOLD=TIMER on negedge.
Set MODE=STATIC.
14 MEASURE_POS_ONCE
Measure when a signal goes high once and then stop.
Set THRESHOLD=TIMER on posedge.
Set MODE=STATIC.
15 MEASURE_ANY_ONCE
Measure when a signal changes and then stop.
Set THRESHOLD=TIMER on negedge or posedge.
Set MODE=STATIC.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cypress EZ-USB FX3 and is the answer not in the manual?

Cypress EZ-USB FX3 Specifications

General IconGeneral
BrandCypress
ModelEZ-USB FX3
CategoryController
LanguageEnglish

Related product manuals