INTRODUCTION TO FLEXIO

Similar documents
Using FlexIO to emulate communications and timing peripherals

Emulating Dual SPI Using FlexIO

Emulating I2C Bus Master by using FlexIO

KLx7 Product Brief Supports all KLx7 devices

Hello, and welcome to this presentation of the STM32 Low Power Universal Asynchronous Receiver/Transmitter interface. It covers the main features of

RL78 Serial interfaces

Concepts of Serial Communication

Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Universität Dortmund. IO and Peripheral Interfaces

C8051F700 Serial Peripheral Interface (SPI) Overview

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B

Serial Communication. Simplex Half-Duplex Duplex

USIC. Universal Serial Interface Channel TTA Training

Emulating I2S bus on KE06

An SPI interface for the 65(C)02 family of microprocessors

Product Brief Supports all SKEA64 devices

Am186ER/Am188ER AMD continues 16-bit innovation

Product Brief Supports all SKEA8 devices

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

Kinetis KL1x General-Purpose Ultra-Low- Power MCUs Up to 256 KB Flash and 32 KB SRAM

AN Multifunction Serial Interface of FM MCU. Contents. 1 Introduction

AVR XMEGA Product Line Introduction AVR XMEGA TM. Product Introduction.

The 9S12 Serial Peripheral Inteface (SPI) Huang Section 10.2 through 10.6 SPI Block User Guide

Tutorial Introduction

User Manual. LPC-StickView V3.0. for LPC-Stick (LPC2468) LPC2478-Stick LPC3250-Stick. Contents

Introduction to I2C & SPI. Chapter 22

ecog1kg Microcontroller Product Brief

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

USER GUIDE EDBG. Description

KL03 Product Brief Supports all KL03 devices

Interfacing Techniques in Embedded Systems

KE02 Sub-Family Product Brief Supports all KE02 devices with 40 MHz core

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

Module 3.C. Serial Peripheral Interface (SPI) Tim Rogers 2017

Basics of UART Communication

Introducing SPI Xpress SPI protocol Master / Analyser on USB

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n

EDBG. Description. Programmers and Debuggers USER GUIDE

For reference only Refer to the latest documents for details

Product Brief Supports all SKEA128 devices

OUTLINE. SPI Theory SPI Implementation STM32F0 SPI Resources System Overview Registers SPI Application Initialization Interface Examples

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

WS_CCESBF7-OUT-v1.00.doc Page 1 of 8

Module Introduction. PURPOSE: The intent of this module, is to explain several of the important features of Freescale s i.mx1 applications processor.

NXP Unveils Its First ARM Cortex -M4 Based Controller Family

Understanding SPI with Precision Data Converters

Introduction to ARM LPC2148 Microcontroller

Hello, and welcome to this presentation of the STM32L4 System Configuration Controller.

SPI Block User Guide V02.07

Serial Communications

Maxim > Design Support > Technical Documents > Application Notes > Microcontrollers > APP 4465

UNIT IV SERIAL COMMUNICATIONS

User Manual Rev. 0. Freescale Semiconductor Inc. FRDMKL02ZUM

Product Technical Brief S3C2413 Rev 2.2, Apr. 2006

MC68HC908GR8A MC68HC908GR4A Data Sheet

spi 1 Fri Oct 13 13:04:

Arduino Dock 2. The Hardware

EFM32 Series 0: DMA (ARM PrimeCell µdma PL230)

IV B.Tech. I Sem (R13) ECE : Embedded Systems : UNIT -4 1 UNIT 4

Quick Start Guide TRK-KEA. Kinetis EA Series MCUs for Automotive Electronics Applications. StarterTRAK

Serial Communication. Simplex Half-Duplex Duplex

Serial Peripheral Interface (SPI) Host Controller Data Sheet

Amarjeet Singh. January 30, 2012

Microcontroller basics

MC68VZ328 Integrated Processor

Product Technical Brief S3C2412 Rev 2.2, Apr. 2006

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Configurable UART with FIFO ver 2.20

Serial Communications

Hierarchy of I/O Control Devices

Embedded Systems. Read pages

WS_CCESSH5-OUT-v1.01.doc Page 1 of 7

M68HC08 Microcontroller The MC68HC908GP32. General Description. MCU Block Diagram CPU08 1

Menu. What is SPI? EEL 3744 EEL 3744 SPI

Serial Buses in Industrial and Automotive Applications

A. This Errata sheet represents the known bugs, anomalies and work-arounds for the ADuC812 MicroConverter.

SEIKO EPSON CORPORATION

MicroBolt. Microcomputer/Controller Featuring the Philips LPC2106 FEATURES

ECE2049: Embedded Computing in Engineering Design C Term Spring 2018

EE 456 Fall, Table 1 SPI bus signals. Figure 1 SPI Bus exchange of information between a master and a slave.

Addressing scheme to address a specific devices on a multi device bus Enable unaddressed devices to automatically ignore all frames

MC68HC908GR16 Data Sheet

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

Interfacing a Hyper Terminal to the Flight 86 Kit

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

Freescale Semiconductor, Inc.

PARALLEL COMMUNICATIONS

Serial Peripheral Interface (SPI)

SPI Universal Serial Communication Interface SPI Mode

Serial Peripheral Interface (SPI) Last updated 8/7/18

Kinetis KE1xF512 MCUs

Implementation of MCU Invariant I2C Slave Driver Using Bit Banging

Unit DMA CONTROLLER 8257

Introduction. PURPOSE: - List and explain the 15 i.mx1 modules that are also used on the i.mx21 device.

EECS 373 Design of Microprocessor-Based Systems

Lecture 10. Serial Communication

Hands-On Workshop: ARM mbed

Transcription:

INTRODUCTION TO FLEXIO Osvaldo Romero Applications Engineer EXTERNAL USE

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 1

Session Objective Lear what is the FlexIO Learn where the FlexIO module can be use. Know the Freescale products that include FlexIO Show FlexIO in action External Use 2

Introduction External Use 3

Scenario Your application needs more UART modules? Do you need more PWM channels for your application? Need more SPI modules? Need an I2C module? Need an extra CAN module? FlexIO can help you! External Use 4

What is FlexIO FlexIO - Flexible input and output peripheral Highly configurable module providing a wide range of functionality including: -Emulation of a variety of communication protocols: UART, I2C, SPI, I2S, etc -Flexible 16-bit timers with support for a variety of trigger, reset, enable and disable conditions -Programmable logic blocks allowing the implementation of digital logic functions on-chip and configurable interaction of internal and external modules CPU -Programmable state machine for offloading basic system control functions from The FlexIO peripheral was initially introduced on the Freescale Kinetis KL43 family External Use 5

FlexIO FlexIO main components Shifter Timer Pin External Use 6

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 7

FlexIO Features External Use 8

FlexIO Features Allows emulation of standard communication interfaces. Supports a wide range of protocols and peripherals including: UART I2C SPI I2S LCD RGB CMT (carrier modulator transmitter) PWM/waveform generation SWD (single wire debug) CAN LIN Creates an interlink between GPIO method of software emulation and exact hardware peripheral module. External Use 9

FlexIO: Shifter Features Array of 32-bit shift registers with transmit, receive and data match modes Responsible for buffering and shifting data into or out of the FlexIO Each shifter has a timer that control the timing shift, load and store events. Support DMA interrupt or polled operation. Receive/transmit/match store/match continuous modes support Input source pin or shifter N+1 output Start/Stop bit generation support Pin selection for shifter (with polarity option) Timer selection for timing of shift/load/store events (positive/negative edge option) Shifter buffer has also its aliases with byte swap/bit swap/bit-byte swap External Use 10

FlexIO: Shifter operation Transmit mode The shifter will load data from the buffer and shift data out when a load event is signaled by the assigned Timer. Receive Mode The shifter will shift data in and store data into the SHIFTBUF register when a store event is signalled by the assigned Timer. Match Store Mode Data is shifted in, check for a match result and store matched data into the buffer register when a store event is signalled by the assigned Timer. Up to 16 bits of data can be compared. When match occurs a flag will set and any enabled interrutps or DMA requests Flag will be cleared when reading buffer. Match Continuous Data is shifted and continuously check for a match result whenever a shift event is signalled by the assigned Timer. External Use 11

FlexIO: Shifter operations State Mode Implement any state machine with up to 8 states, 8 outputs and 3 selectable inputs per state. Basic control functions to be offloaded from the CPU using FlexIO hardware Logic Mode Implement a small amount of programmable digital logic within a FlexIO Shifter. External Use 12

FlexIO: Timer Operation Highly flexible 16-bit timers with support for a variety of internal or external trigger,reset, enable and disable conditions 16-bit timers control the loading, shifting and storing of the shift registers, the counters load the contents of the compare register and decrement down to zero on the FlexIO clock Can generate a PWM waveform, Each timer operates independently. Can be configured to enable or disable at the same time as the previous timer. Timer output can trigger any other timer. 8 bit PWM mode External Use 13

FlexIO: Pin Operation Each timer and shifter can be configured to use any FlexIO pin as: Input Output data Output enable (Open Drain) Bidirectional output Shifters can also be configured to use multiple FlexIO pins in parallel. - 4,8,16 or bits can be shifted on every Shift clock. - Adjacent shifter can be selected as the input source. The least significant 4, 8, 16 or 32-bits from the adjacent shifter will be sampled on Shift clock. External Use 14

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 15

FlexIO applications External Use 16

UART application Two independent parts Transmit & Receive Transmit is supported by using one Timer, one Shifter and one Pin Receive part 1xTimer, 1x Shifter and one Pin The start and stop bit insertion is handled automatically Allows polling and interrupt mode Break and idle characters require software intervention Configurable bit order (bit swapped buff MSB first) Multiple transfers can be supported using DMA controller Does not support automatic insertion of parity bits External Use 17

SPI Master Supported using: Two timers Two shifters Four pins CPHA=0 and CPHA=1 can be supported. Writing to the transmit buffer by either core or DMA is used to initiate each transfer. Due to synchronization delays, the setup time for the serial input data is 1.5 FlexIO clock cycles, so the maximum baud rate is divide by 4 of the FlexIO clock frequency. External Use 18

SPI Slave Supported using: - One Timer - Two Shifters - Four pins CPHA=0 and CPHA=1 supported Due to synchronization delays, the output valid time for the serial output data is 2.5 FlexIO clock cycles, so the maximum baud rate is divide by 6 of the FlexIO clock frequency. External Use 19

I2C Master Supported using: - Two timers - Two shifters - Two pins FlexIO inserts a stop bit after every word to generate/verify the ACK/NACK Data transfers can be supported using the DMA controller Due to synchronization delays, the data valid time for the transmit output is 2 FlexIO clock cycles, so the maximum baud rate is divide by 6 of the FlexIO clock frequency. External Use 20

I2S Master Supported using - Two timers - Two Shifters - Four pins Data transfers can be supported using the DMA Due to synchronization delays, the setup time for the receiver input is 1.5 FlexIO clock cycles, so the maximum baud rate is divide by 4 of the FlexIO clock frequency. External Use 21

I1S Slave Supported using - Two timers - Two shifters - Four pins Due to synchronization delays, the output valid time for the serial output data is 2.5 FlexIO clock cycles, so the maximum baud rate is divide by 6 of the FlexIO clock frequency. External Use 22

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 23

FlexIO in Freescale products External Use 24

Freescale Families with FlexIO KL1x - MKL17Z128 - MKL17Z256 KL2x - MKL27Z128 - MKL27Z256 KL3x - MKL33Z128 - MKL33Z256 KL4X - MKL43Z128 - MKL43Z256 External Use 25

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 26

FlexIO Demo External Use 27

FlexIO Demo: UART using KL43 It is used PTE22(FlexIO_D6) and PTE23 (FlexIO_D7) of KL43 Pins are routed to Tx/Rx OpenSDA interface External Use 28

UART use case Two independent parts Transmit & Receive Transmit is supported by using one Timer, one Shifter and one Pin Receive part 1xTimer, 1x Shifter and one Pin The start and stop bit insertion is handled automatically Allows polling and interrupt mode Break and idle characters require software intervention Configurable bit order (bit swapped buff MSB first) Multiple transfers can be supported using DMA controller Does not support automatic insertion of parity bits External Use 29

FlexIO UART transmit mode UART Transmit procedure: Shifter configuration ->Transmit mode Shifter load data from shifter buffer Shift the data (event by the assigned Timer) Start/stop bit are automatically loaded before/after data is loaded Using timer status flag for sending next data Difference between polling vs. interrupt mode Checking the status flag (polling) Timer status flag generate interrupt (interrupt) External Use 30

Block diagram of the UART transmitter on FlexIO FlexIO Clk. Timer trigger Bit clk * n-bits Shifter Pin UART Transmit procedure: Shifter configuration ->Transmit mode Shifter load data from shifter buffer Shift the data (event by the assigned Timer) Start/stop bit are automatically loaded before/after data is loaded Shifter buffer Using timer status flag for sending next data Difference between polling vs. interrupt mode Checking the status flag (polling) Timer status flag generate interrupt (interrupt) External Use 31

FlexIO UART receive mode UART Receive procedure: Shifter configuration -> Receive mode Shifter shifts data in when the store event is signaled Status flag to indicate when data can be read (generate interrupt) Waiting for shifter status flag in polling mode Store into the shifter buffer Reading bit swapped shifter buffer (without any logical operation) External Use 32

Block diagram of the UART receiver on FlexIO UART Receive procedure: Shifter configuration -> Receive mode Shifter shifts data in when the store event is signaled Status flag to indicate when data can be read (generate interrupt) Waiting for shifter status flag in polling mode Store into the shifter buffer Reading bit swapped shifter buffer (without any logical operation) FlexIO Clk. Timer trigger Bit clk * n-bits Pin Shifter Shifter buffer External Use 33

FlexIO bare metal drivers Driver is divided into two parts Main low level driver Initialization of peripheral Basic setting of timers and shifters Writing and reading to the register Sub drivers for each use case Focused on emulation of the peripheral (SPI, UART ) Allow using more instances of one driver Application can use both of driver layers Callback function implemented External Use 34

FlexIO bare metal drivers APPLICATION flexio_uart.c flexio_uart.h flexio_spi_master.c flexio_spi_master.h flexio_spi_slave.c flexio_spi_slave.h flexio_i2c.c flexio_i2c.h flexio_i2s.c flexio_i2s.h flexio.c, flexio.h FlexIO bare metal drivers External Use 35

Agenda Introduction to FlexIO FlexIO Main Features FlexIO Applications Freescale Products with FlexIO Collaterals\Tools for FlexIO FlexIO Demo Summary and Q&A External Use 36

Summary External Use 37

Summary FlexIO can help you emulate -UART -I2C -SPI -I2S -PWM FlexIO Module consist on three parts: shifter, timer and I/O. MCUs with FlexIO are: Start you development with FlexIO using External Use 38

References AN5034: Emulating UART by Using FlexIO AN4955: Emulating the I2S Bus Master with the FlexIO Module External Use 39