You are on page 1of 26

A SMART PERIPHERAL FOR

A SMARTER WORLD
DONNIE GARCIA
LEAD FLEXIO MARKETER
GET TO KNOW THE FLEXIO

EXTERNAL USE

EXPLOSIVE GROWTH OF SMART CONNECTED SOLUTIONS

MCU
MPU
ANALOG
SENSORS

RF
NFC
STANDARD
PRODUCTS

MCU
MPU
ANALOG

SENSORS
NFC
STANDARD
PRODUCTS

SMART
INFRASTRUCTURE

EXTERNAL USE

MCU
MPU
ANALOG
SENSORS

MPU
Analog
RF

SMART
WEARABLES

SMART
INDUSTRY

SMART
HEALTHCARE

SMART
HOME

STANDARD
PRODUCTS

RF
NFC
STANDARD
PRODUCTS

MCU
MPU
SENSORS

ANALOG
STANDARD
PRODUCTS

FlexIO: The Smartest Peripheral

EXTERNAL USE

Use the FlexIO smart peripheral to change raw data into valuable data and reactions
Generate
PWMS, State
machines
and data
passing
Smart
Control

EXTERNAL USE

Fast TTM

Match and
pattern
recognition

Operation in
stop modes

Perf.
Offload

Energy Eff.

Write data by SW

Read data by SW

Shifters and Timers

Shifter buffer N

Pin & polarity


Selection

Start / Stop
detection

RX

.
.
.

Load data

Input
Source

Compare


Store data

FXIO_D0
FXIO_D1
FXIO_D2

MATCH

FXIO_Dn

Shifter (N - 1)
input

TX

FXIO_D0
FXIO_D1
FXIO_D2


Shifter (N + 1)
output

Shifter
input

Shifter output

Shifter N

FXIO_Dn

Shift timing
Start / Stop
insertion
At the
expiration

At the start
of counting

Continuosly

Timer m

EXTERNAL USE

TIMm

TIM0
TIM1
TIM2

.
.
.

Timer & polarity


Selection

.
.
.

Pin & polarity


Selection

The MCU on the


FRDM-K82F has
8 shift registers &
8 Timers

Shifters can be associated with


1, 4, 8, 16 or 32 IO pins supporting a wide range of
interfaces
Write data by SW

Read data by SW

Shifters and Timers

Shifter buffer N

Pin & polarity


Selection

Start / Stop
detection

RX

.
.
.

Load data

Input
Source

Compare


Store data

FXIO_D0
FXIO_D1
FXIO_D2

MATCH

FXIO_Dn

Shifter (N - 1)
input

TX

FXIO_D0
FXIO_D1
FXIO_D2


Shifter (N + 1)
output

Shifter
input

Shifter output

Shifter N

FXIO_Dn

Shift timing
Start / Stop
insertion
At the
expiration

.
.
.

Pin & polarity


Selection

At the start
of counting

Continuosly

Timer m

EXTERNAL USE

TIMm

.
.
.

Timer & polarity


Selection

TIM0
TIM1
TIM2

Shifters can be linked together


so that as data is received, the
data can be shifted into the
next shifter

Timers are used to control


when data is shifted in or
shifted out (Shift timing)

Timer Triggers
Internal

Any FlexIO pin

(to the FlexIO)

Triggers

Any FlexIO Shifter


status flag
Any other timer output

(Chip Specific)

Chip Trigger pin


(EXTRIG_IN)

Triggers

Chip Comparators

External

Chip Timers

DMA Timers (PIT)


PWM timers (FTM)
Low Power Timers (LPTMR)
RTC (Seconds and Alarm)

EXTERNAL USE

Timers: Uses and Generating Shift Timing


Timer Decrement
Control

Example uses
Generating a clock
signal
Counting Triggers
Clock counting
Serial transfer
size

EXTERNAL USE

FlexIO Clock
Trigger input (1)
Trigger input (2)
Pin Input

Shift Clock
Control
Timer Output
Trigger Input
Pin Input

FlexIO Use Case: Functional Description Transmit Data

Write data to be send


Shifter status flag
cleared
x

-1.

Shifter buffer 0
x

Load data

The timer is triggered after


the data is written, as the
shifter status flag is set.

-2.

Write data by SW

Starting at -2, the shifter is


ready for data to be loaded,
SW or DMA is used to write
the data.

TX

xx

7.

Shifter status
flag set

xx

6.

5.

4.

1.

7.

6.

3.

2.

1.

8.

...

5.

4.

3.

2.

0.

1.

0.
Shifter
output

Shifter 0
Shift on positive edge

The timer starts counting


and data is shifted out.
(transmitted)

Start as 0 enabled
Stop as 1 enabled

0.

Trg

EXTERNAL USE

at the
expiration

Timer status flag set when


STOP bit has been sent

Timer 0
Disable on compare

Enable on trigger
(shifter 0 status)
rising edge

At the start
of counting

FXIO_D4
(PTE20)

Data is shifted into the shift


register until the bit count is
reached at the expiration of
the timer.
The data is transferred to the
shift buffer and can be read.

EXTERNAL USE

Store data

Starting at -1, timer counting


is triggered by the rising
edge of a FlexIO pin (a
clock).

Read data by SW

FlexIO Use Case: Functional Description Receive Data

Write data by SW

Read data by SW

Logical Operators: Match Capabilities

Shifter buffer N

Pin & polarity


Selection

Start / Stop
detection

RX

.
.
.

Load data

Input
Source

Compare


Store data

FXIO_D0
FXIO_D1
FXIO_D2

MATCH

FXIO_Dn

Shifter (N - 1)
input

TX

FXIO_D0
FXIO_D1
FXIO_D2


Shifter (N + 1)
output

Shifter
input

Shifter output

Shifter N

FXIO_Dn

Shift timing
Start / Stop
insertion
At the
expiration

At the start
of counting

Continuosly

Timer m

EXTERNAL USE

TIMm

TIM0
TIM1
TIM2

.
.
.

Timer & polarity


Selection

10

.
.
.

Pin & polarity


Selection

Each shift register


supports 16 bits of
match data and 16
bits of mask data to
easily configure
thresholds
Match can be used to
monitor data and
create reactions

Logical Operators: Logic Mode

Input
masking

In logic mode, 4 FlexIO pins


along with the output of one
FlexIO shifter can be used to
generate a 5 input x 32 output
logical look up table.
A shifter holds the output
value that will be placed onto
the output pin based on the 5
input states.
Note that a FlexIO pin can
also be a trigger to a FlexIO
timer, allowing this function to
be expanded.

11

EXTERNAL USE

State Machine:
Up to 3 input pins, setting 8 states, controlling up to 8 output pins

0 fl
tus
sta d
ter
re
Shif clea

Output disable

ag

12

EXTERNAL USE

FlexIO Stop Light State Machine

13

EXTERNAL USE

FlexIO: Camera interface and TFT interface


8-bit Camera Interface

14

EXTERNAL USE

16-bit TFT interface

CMOS VGA Camera OV7670 FlexIO Use Case Demonstration

Functional description QVGA with RGB565 mode


VSYNC PTA13

SIOC
SIOD

SDA

Reset Source
address and
CITER

PORT, GPIO
Falling edge
IRQ (or DMA)

I2C

FlexIO

Shifter status 0 set

SCL

eDMA

Shifter buffer 0

150k QVGA frame buffer

Shifter 0

Tr

Shifter buffer 1

XCLK

OSCERCLK

OSC

SRAM_L

Shifter 1
Shifter buffer 2
Shifter 2
Shifter buffer 3

D0
D1
D2
D3
D4
D5
D6
D7

FXIO_D24
FXIO_D25
FXIO_D26
FXIO_D27
FXIO_D28
FXIO_D29

Shifter 3
Shifter buffer 4
Shifter buffer 5
Shifter 5
Shifter buffer 6
Shifter 6
Shifter buffer 7
Shifter 7
data sampling

FXIO_D30
FXIO_D31

PCLK

FXIO_D1

HREF

FXIO_D18

DMA
CH1

data shifting
Store event
Shift timing

output
Timer 0
input

Tr

Expiration
(32x)

trigger

FB_AD0:15

16-bit width (RGB565)


FB_CS, FB_ALE
FB_RW

15

EXTERNAL USE

32B burst

Shifter 4

FlexBUS

16 x 16-bits
per request

DMA
CH0

K80F150M

FlexIO in SDK 2.0

Start with the Kinetis SDK to leverage


examples and drivers.

16

EXTERNAL USE

FRDM-K82F board support


SDK_2.0_FRDM-K82F\boards\frdmk82f\driver_examples\flexio\

17

EXTERNAL USE

FRDM-K82F: A platform for embedded innovations


FRDM-K82F
Manage
Power
K82 MCU with
low static and
dynamic IDDs

1.8V power
rail

Optional
coin cell
socket

18

EXTERNAL USE

Connect

Sense &
Store

FS USB host
and device

On chip ADC
and
comparators

Expansion
through
shield boards

6 Axis sensor
(FXOS8700)

Standard BT
header

32MB Serial
NOR

Standard RF
header

Compute
150MHz
Cortex M4F
with code
and system
cache

Interface

Display &
Camera

Capacitive
touch pads

FlexIO
header for
camera or
display
interface

Push
buttons

Expansion
through
shield
boards

Crypto.
engines

On chip
temperature
sensor

Floating
point

Timer1 contains data


bit count
Shifter1 is used for
data (transmit or
receive)

Timer[2:4] is used for


setting shift count

EXTERNAL USE

Timer5 is used for


Red LED (Waiting
for Shifter7 trigger)

Built from the Kinetis SDK FlexIO driver example in the


is used for Z
belowShifter7
directory

SDK_2.0_FRDM-K82F\boards\frdmk82f\driver_examples\flexio\i2c\read_accel_value_transfe
r
data matching
Timer6 is used for

Blue LED (Waiting

Uses the FlexIO I2C Master DriverforinShifter6


order totrigger)
interface to
used for Y6-axis sensor
the onShifter6
board is
FXSO8700
data matching

Timer7 is used for

Readings are displayed using a UART


terminal
Greenand
LEDa(Waiting
Shifter5
is
used
for
X
program
for Shifter5 trigger)
data matching

19

RGB LED Control

Timer0 generates
baud and bit timing

I2C Sniffing

I2C Master Emulation

Using FlexIO: Flex your mind. Enhance your design.

20

Timer1 contains data


bit count
Shifter1 is used for
data (transmit or
receive)

EXTERNAL USE

Timer[2:4] is used for


setting shift count
Shifter7 is used for Z
data matching
Shifter6 is used for Y
data matching
Shifter5 is used for X
data matching

RGB LED Control

Timer0 generates
baud and bit timing

I2C Sniffing

I2C Master Emulation

Using FlexIO: Flex your mind. Enhance your design.

Timer5 is used for


Red LED (Waiting
for Shifter7 trigger)
Timer6 is used for
Blue LED (Waiting
for Shifter6 trigger)
Timer7 is used for
Green LED (Waiting
for Shifter5 trigger)

21

Timer1 contains data


bit count
Shifter1 is used for
data (transmit or
receive)

EXTERNAL USE

Timer[2:4] is used for


setting shift count
Shifter7 is used for Z
data matching
Shifter6 is used for Y
data matching
Shifter5 is used for X
data matching

RGB LED Control

Timer0 generates
baud and bit timing

I2C Sniffing

I2C Master Emulation

Using FlexIO: Flex your mind. Enhance your design.

Timer5 is used for


Red LED (Waiting
for Shifter7 trigger)
Timer6 is used for
Blue LED (Waiting
for Shifter6 trigger)
Timer7 is used for
Green LED (Waiting
for Shifter5 trigger)

22

EXTERNAL USE

Timer1 contains data


bit count
Shifter1 is used for
data (transmit or
receive)

Timer [2:4] is used


for setting shift count
Shifter7 is used for Z
data matching
Shifter6 is used for Y
data matching
Shifter5 is used for X
data matching

RGB LED Control

Timer0 generates
baud and bit timing

I2C Sniffing

I2C Master Emulation

Using FlexIO: Flex your mind. Enhance your design.

Timer5 is used for


Red LED (Waiting
for Shifter7 trigger)
Timer6 is used for

Building
example, other
Bluefrom
LED the
(Waiting
FlexIO
resources
can be used
for Shifter6
trigger)
to monitor specific data within
2C communications with the
the ITimer7
is used for
6-Axis
Sensor
Green
LED (Waiting
for Shifter5 trigger)

23

EXTERNAL USE

Timer1 contains data


bit count
Shifter1 is used for
data (transmit or
receive)

Timer [2:4] is used


for setting shift count
Shifter7 is used for Z
data matching
Shifter6 is used for Y
data matching
Shifter5 is used for X
data matching

RGB LED Control

Timer0 generates
baud and bit timing

I2C Sniffing

I2C Master Emulation

Using FlexIO: Flex your mind. Enhance your design.

Timer5 is used for


Red LED (waiting for
Shifter7 trigger)
Timer6 is used for
Blue LED (waiting for
Shifter6 trigger)
Timer7 is used for
Green LED (waiting
for Shifter5 trigger)

Meet the Challenge: https://www.hackster.io/challenges/KinetisFlexIO

Get started flexing your mind


Step 1: Register To Participate
Start by creating a free account on Hackster.io (or
sign-in if already a member) and register for the
contest by clicking "Register as a participant".
Step 2: Submit an idea, what will you build if
you won a Kinetis board?

24

Learn more about Kinetis with FlexIO from our


FAQs
Download the SDK and read the documentations
Click "Submit your idea" and fill in the template
Start with a high quality image (which is fun, and
legal to use)
Tell us what you want to create
Allow up to 48 hours for us to approve your idea

EXTERNAL USE

READY NOW TO SUPPORT YOU TO ACHIEVE SUCCESS

2015 NXP Semiconductors

You might also like