Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0

Similar documents
Base Timer Channel (BT) Features. General Description. When to Use a PDL_BT Component 1.0

Capable of adjusting detection timings for start bit and data bit

Setting Oscillation Stabilization Wait Time of the main clock (CLKMO) and sub clock (CLKSO)

PSoC Creator Quick Start Guide

This section describes the various input and output connections for the SysInt Component.

One 32-bit counter that can be free running or generate periodic interrupts

Use the Status Register when the firmware needs to query the state of internal digital signals.

This input determines the next value of the output. The output does not change until the next rising edge of the clock.

Digital Multiplexer and Demultiplexer. Features. General Description. Input/Output Connections. When to Use a Multiplexer. Multiplexer 1.

Digital Logic Gates. Features. General Description. Input/Output Connections. When to Use a Logic Gate. Input 1. Input 2. Inputs 3-8 * 1.

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

Use the Status Register when the firmware needs to query the state of internal digital signals.

PSoC 6 Current Digital to Analog Converter (IDAC7)

The AMuxSeq is capable of having between 2 and 32 analog inputs. The paired inputs are present when the MuxType parameter is set to "Differential.

Use a DieTemp component when you want to measure the die temperature of a device.

Automatic reload of the period to the count register on terminal count

For More Information Please contact your local sales office for additional information about Cypress products and solutions.

Optional Pause Pulse for constant frame length of 282 clock ticks

CE CY8CKIT-042-BLE F-RAM Data Logger

Analog Multiplexer (AMux) Features. General Description. Input/Output Connections. When to Use an AMux Single or differential connections

THIS SPEC IS OBSOLETE

PSoC 4 Current Digital to Analog Converter (IDAC)

Supports a range of speeds of external memories (from 5 to 200 ns) Supports external memory power-down, sleep, and wakeup modes

ModusToolbox USB Configurator Guide

Comparator (Comp) Features. General Description. When to use a Comparator Low input offset. User controlled offset calibration

Configurable transfer modes: single transfer, 1D transfer (using X loop) and 2D transfer (using both X and Y loops).

EZ-PD Analyzer Utility User Guide

W H I T E P A P E R. Introduction. Devices. Energy Comparison of Cypress F-RAM and EEPROM

Cypress BLE-Beacon ios App User Guide

W H I T E P A P E R. Timing Uncertainty in High Performance Clock Distribution. Introduction

CE95314 PSoC 3, PSoC 4, and PSoC 5LP EZI2C

For More Information Please contact your local sales office for additional information about Cypress products and solutions.

AN F²MC-16FX Family, I2C. Contents. 1 Introduction. This application note describes how to communicate via I2C with a Serial EEPROM.

Scanning Comparator (ScanComp) Features. General Description. Input/Output Connections. When to Use a Scanning Comparator. clock - Digital Input* 1.

F²MC-8FX Family MB95200H/210H Series Capacitance Touch Sensor

FM3 Family Motor Graphical Interface User Manual

Supports Analog, Digital I/O and Bidirectional signal types

TI: Uses a short pulse on spi_select to indicate start of transaction. National Semiconductor (Microwire): Transmission and Reception occur separately

The Emulated EEPROM Component should be used to store nonvolatile data on a target device.

Shift Register. Features. General Description 1.20

BGM Adaptor MB E Operation Manual. 8FX Family 8-bit Microcontroller. Doc. # Rev. *A

Peripheral Driver Library (PDL) Component (PDL Application Programming Interface (API) only)

AN FR Family, MB91F467S Emulation. 1 Introduction. 2 Hardware Setup. 2.1 Required parts

Master modes provide all functionality necessary to work in a multi-master environment.

Use the Status Register when the firmware needs to query the state of internal digital signals.

For More Information Please contact your local sales office for additional information about Cypress products and solutions.

Use the Status Register when the firmware needs to query the state of internal digital signals.

EZ I2C Slave. Features. General Description. When to use a EZ I 2 C Slave Industry standard Philips I 2 C bus compatible interface

Chip Errata for the MB96300/MB96600 Series MOVS/MOVSW Overlap of source and destination region, F 2 MC-16FX Microcontroller

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

Nine-Output 3.3 V Buffer

PSoC Creator 4.2 Production Release Notes

CY8CKIT-002. PSoC MiniProg3 Program and Debug Kit Guide. Doc. # Rev. *H

FM4 S6E2Cx Series Over The Air Update 32-Bit Microcontroller With Embedded Dual Flash

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

FM Universal Peripheral Driver Library Quick Start Guide

MB39C811-EVB-03. PMIC for Solar/Vibration Energy Harvesting, Evaluation Board Operation Guide. Doc. No Rev. *B

FM0+ Family S6E1A1 Series, Flash Programming Guide

Sequencing Successive Approximation ADC (ADC_SAR_Seq) Features. General Description. When to Use the ADC_SAR_Seq Supports PSoC 5LP devices

PSoC 1 In-Circuit Emulator Development Kit Guide

CE56273 Associated Part Families: CY8C38xx/CY8C55xx Software: PSoC Creator Related Hardware: CY8CKIT-001 Author: Anu M D

External Library. Features. General Description 1.0. The library provides documentation for external components

Version February 02, 2018

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA

Voltage Reference (Vref) Features. General Description. Input/Output Connections. When to Use a Vref Voltage references and supplies

EDBG. Description. Programmers and Debuggers USER GUIDE

Cypress EZ-PD Configuration Utility User Manual

FM4 S6E2H-Series Starter Kit Guide

PSoC 1 I 2 C Bootloader

Cypress HX2VL Configuration Utility Blaster User Guide

The color of the Clock component waveform symbol will change based on the clock's domain (as shown in the DWR Clock Editor), as follows:

PSoC 4 Voltage Comparator (Comp) Features. General Description. When to Use Comparator Low input offset. User controlled offset calibration

PSoC 4 Low Power Comparator (LPComp) Features. General Description. When to Use a LPComp 2.0. Low input offset. User controlled offset calibration

This Application Note demonstrates an SPI-LIN slave bridge using a PSoC device. Demonstration projects are included.

FR Family SOFTUNE Workbench User's Manual for V6

Filter_ADC_VDAC_poll Example Project Features. General Description. Development Kit Configuration

Operational Amplifier (Opamp) Features. General Description. Input/Output Connections. Noninverting Analog Follower or Opamp configuration

USER GUIDE EDBG. Description

Graphic LCD Interface (GraphicLCDIntf) Features. General Description. When to Use a GraphicLCDIntf 1.80

Comparator (Comp) Features. General Description. When to use a Comparator 1.60

CapSense I 2 C/SPI Timer Flash RAM

GPIF II Designer - Quick Start Guide

EZ I 2 C Slave. Features. General Description. When to use a EZ I 2 C Slave 1.50

CY7C603xx CYWUSB

AN EZ-USB FX3 I 2 C Boot Option. Application Note Abstract. Introduction. FX3 Boot Options

Cypress Peripheral Driver Library v2.1 Quick Start Guide

For one or more fully configured, functional example projects that use this user module go to

Writing to Internal Flash in PSoC 3 and PSoC 5

HX2VL Development Kit Guide. Doc. # Rev. *A

DMX512 Receiver Datasheet DMX512Rx V 1.0. Features and Overview

EZ-PD Dock Reference Design Guide

CY4701 EZ-USB GX3 Reference Design Guide

16-Mbit (512 K words 32 bits) Static RAM with Error-Correcting Code (ECC)

HX2VL Development Kit Guide. Doc. # Rev. **

8 to 1 Analog Multiplexer Datasheet AMux8 V 1.1. Features and Overview

Cypress HX2VL Configuration Utility Blaster User Guide

PSoC 4 Operational Amplifier (Opamp) Features. General Description. When to Use the Opamp Follower or Opamp configuration

Preliminary. Gas Sensor Analog Front End Datasheet GasSensorAFE V Features and Overview. This datasheet contains Preliminary information.

The following table lists user modules used in this code example and the hardware resources occupied by each user module.

4 to 1 Analog Multiplexer Data Sheet

Transcription:

1.0 Features Configures the Multi-Function Serial (MFS) Interface to one of the following modes: UART (Asynchronous normal serial interface) Clock synchronous serial interface (SPI and I 2 S can be supported) LIN bus interface I 2 C bus interface General The Peripheral Driver Library (PDL) component is multifunction peripheral block that implements the following communication interfaces: UART, CSIO, LIN, I2C. Each is available as a pre-configured schematic macro in the PSoC Creator Component Catalog. The base component in the catalog is setup in the unconfigured This component uses firmware drivers from the PDL_MFS module, which is automatically added to your project after a successful build. When to Use a PDL_MFS Component Use the PDL_MFS component to configure the initialization settings of the MFS peripheral block for UART, CSIO, LIN or I2C interface any time the device must connect to external buses. Quick Start Follow the quick start steps below to configure and initialize the MFS peripheral block. 1. Drag a PDL_MFS component from the Component Catalog FMx/Communication folder onto your schematic. The placed instance takes the name MFS_1. Cypress Semiconductor Corporation 198 Champion Court San Jose, CA 95134-1709 408-943-2600 Document Number: 002-15651 Rev. ** Revised September 2, 2016

PSoC Creator Component Datasheet 2. Double-click to open the component s Configure dialog. 3. On the Basic tab set the configuration of the component. 4. Depending on the selected component configuration, will be added a tab with specific parameters. 5. Assign pins in your device using the Pin Editor. If you are creating a design for a development kit, refer the kit User Guide for suitable pin assignments. 6. Build the project to verify the correctness of your design. This will add the required PDL modules to the Workspace Explorer and generate configuration data for the MFS_1 instance. 7. In the main.c file, initialize the peripheral and start the application. The example assumes the MFS is configured in UART Mfs_Uart_Init(&MFS_1_HW, &MFS_1_Config); MFS_1_SetPinFunc_SIN(); MFS_1_SetPinFunc_SOT(); Mfs_Uart_EnableFunc(&MFS_1_HW, UartTx); Mfs_Uart_SendData(&MFS_1_HW, 1 ); 8. Build and program the device. Component Parameters The PDL_MFS component Configure dialog allows you to edit the configuration parameters for the component instance. Basic Tab This tab contains the component parameters used in the basic peripheral initialization settings. buseextclk MFSConfig Use an external clock on SCK pin Selects the MFS operating mode to one of the following modes: UART - configured to be in UART CSIO - configured to be in CSIO I2C - configured to be in I2C LIN - configured to be in LIN Unconfigured - This is the default The component will not generate configuration structures to initialize the MFS block. The structures must be user provided. Page 2 of 9 Document Number: 002-15651 Rev. **

FIFO Tab This tab contains the FIFO configuration settings. enfifosel Select the FIFO function u8bytecount1 Size of FIFO 1 u8bytecount2 Size of FIFO 2 Interrupts Tab This tab contains the Interrupts configuration settings. btouchnvic brxirq pfnrxirqcb btxirq pfntxirqcb btxfifoirq pfntxfifoirqcb btxidleirq pfntxidleirqcb bcserrirq pfncserrirqcb bserialtimerirq pfnserialtimerirq bwaitselection bstopdetectirq pfnstopdetectirqcb blinbreakirq Install interrupts in NVIC Receive interrupt enable Receive interrupt callback. Note: this generates a declaration only - USER must implement the function Transmit interrupt enable Transmit interrupt callback. Note: this generates a declaration only - USER must implement the function Transmit FIFO interrupt enable Transmit FIFO interrupt callback. Note: this generates a declaration only - USER must implement the function Transmit idle interrupt enable Transmit idle interrupt callback. Note: this generates a declaration only - USER must implement the function. Chip Select interrupt enable. It is visible when CSIO mode is selected Chip Select interrupt callback. Note: this generates a declaration only - USER must implement the function. It is visible when CSIO mode is selected Serial Timer interrupt enable. It is visible when CSIO mode is selected Serial Timer interrupt callback. Note: this generates a declaration only - USER must implement the function. It is visible when CSIO mode is selected Generate interrupt after ACK (wait) or before ACK. It is visible when I2C mode is selected Stop condition interrupt enable. It is visible when I2C mode is selected Stop condition interrupt callback. Note: this generates a declaration only - USER must implement the function. It is visible when I2C mode is selected LIN break field interrupt enable. It is visible when LIN mode is selected Document Number: 002-15651 Rev. ** Page 3 of 9

PSoC Creator Component Datasheet pfnlinbreakirq LIN break field interrupt callback. Note: this generates a declaration only - USER must implement the function. It is visible when LIN mode is selected Chip Select Tab This tab contains the Chip Select configuration settings. Visible when CSIO mode is selected. bactivehold Hold active status until all bytes are transferred bscsnen SCSn Enable, n = 0..3 encsclkdiv CS serial timer clock divider encsendpin Chip select pin selection encsstartpin Chip select pin selection enlevel Active level selection, only apply to SCS0 u16csdeselecttime Chip select deselection time (gap between two bytes's transfer) u8csholddelaytime Chip select hold time u8cssetupdelaytime Chip select setup time u8scsntransferbytecnt SCSn Transfer byte count, n = 0..3 CSIO Tab This tab contains the general CSIO configuration settings. Visible when CSIO mode is selected. binvertclk enactmode encsiobitdirection encsiodatalength encsiomsmode ensyncwaittime u32csiobaudrate SCK Mark level high (false) or low (true) CSIO Active mode CSIO bit direction CSIO data length CSIO Master or Slave mode CSIO wait time insertion Baud rate in bps Page 4 of 9 Document Number: 002-15651 Rev. **

Serial Timer Tab This tab contains the Serial Timer configuration settings in CSIO Visible when CSIO mode is selected. enstclkdiv u16comparevalue u8transferbytecnt CSIO serial timer clock divider Compare value to control transfer start Transfer byte count UART Tab This tab contains the UART configuration settings. Visible when UART mode is selected. bhwflow binvertdata enmode enparity enstopbit enuartbitdirection enuartdatalength u32uartbaudrate Hardware flow control Encode data as NRZ UART Mode UART parity UART stop bits UART bit direction UART data length Baud rate in bps I2C Tab This tab contains the I2C configuration settings. Visible when I2C mode is selected. bdmaenable eni2cmsmode u32i2cbaudrate u8slaveaddress u8slavemaskaddr Use DMA I2C Master or Slave mode Baud rate in bps I2C Slave address (not used in Master mode) I2C Slave Mask (not used in Master mode) Document Number: 002-15651 Rev. ** Page 5 of 9

PSoC Creator Component Datasheet LIN Tab This tab contains the LIN configuration settings. Visible when LIN mode is selected. enbreaklength endelimiterlength enlinmsmode enstopbits u32linbaudrate Break Generation Length (only applicable in LIN master mode) Break Delimiter Length (only applicable in LIN master mode) LIN Master or Slave mode LIN stop bit length Baud rate in bps Component Usage After a successful build, firmware drivers from the PDL_MFS module are added to your project in the pdl/driver/mfs folder. Pass the generated data structures to the associated PDL functions in your application initialization code to configure the peripheral. Generated Data The PDL_MFS component populates the following peripheral initialization data structure(s). The generated code is placed in C source and header files that are named after the instance of the component (e.g. MFS_1_config.c). Each variable is also prefixed with the instance name of the component. Data Structure Type Name stc_mfs_fifo_config_t MFS_1_FifoConfig FIFO configuration structure stc_mfs_uart_config_t MFS_1_Config UART configuration structure. Generated if the UART mode selected stc_mfs_i2c_config_t MFS_1_Config I2C configuration structure. Generated if the I2C mode selected stc_csio_serial_timer_t MFS_1_SerialTimer Serial timer configuration. Generated if the CSIO mode selected stc_csio_cs_t MFS_1_CsConfig Chip selection configuration. Generated if the CSIO mode selected stc_mfs_csio_config_t MFS_1_Config CSIO configuration structure. Generated if the CSIO mode selected stc_mfs_lin_config_t MFS_1_Config LIN configuration structure. Generated if the LIN mode selected Once the component is initialized, the application code should use the peripheral functions provided in the referenced PDL files. Refer to the PDL documentation for the list of provided API functions. To access this document, right-click on the component symbol on the schematic and choose Open API Documentation option in the drop-down menu. Page 6 of 9 Document Number: 002-15651 Rev. **

Preprocessor Macros The PDL_MFS component generates the following preprocessor macro(s). Note that each macro is prefixed with the instance name of the component (e.g. MFS_1 ). Macro MFS_1_HW MFS_1_SetPinFunc_SIN() MFS_1_SetPinFunc_SOT() MFS_1_SetPinFuncSCK() MFS_1_SetPinFunc_SCS0() MFS_1_SetPinFunc_SCS1() MFS_1_SetPinFunc_SCS2() MFS_1_MFS_CONFIG Hardware pointer to the block instance in the device. This should be used in all API calls when specifying the block to access. Macro to assign MFS SIN signal in the device pin. Macro to assign MFS SOT signal in the device pin. Macro to assign MFS SCK signal in the device pin. Macro to assign MFS SCS0 signal in the device pin. Generated only in CSIO Macro to assign MFS SCS1 signal in the device pin. Generated only in CSIO Macro to assign MFS SCS2 signal in the device pin. Generated only in CSIO MFS interface. Is set to one of the following values based on the MFSConfig parameter option: MFS_1_MFS_UNCONFIGURED, MFS_1_MFS_UART, MFS_1_MFS_I2C, MFS_1_MFS_CSIO or MFS_1_MFS_LIN. Data in RAM The generated data may be placed in flash memory (const) or RAM. The former is the more memory-efficient choice if you do not wish to modify the configuration data at run-time. Under the Built-In tab of the Configure dialog set the parameter CONST_CONFIG to make your selection. The default option is to place the data in flash. Interrupt Support If the PDL_MFS component is specified to trigger interrupts, it will generate the callback function declaration that will be called from the MFS ISR. The user is then required to provide the actual callback code. If a null string is provided the struct is populated with zeroes and the callback declaration is not generated. In that case it is the user s responsibility to modify the struct in firmware. The component generates the following function declarations. Function Callback MFS_1_TxIrqCb MFS_1_RxIrqCb MFS_1_TxIdleIrqCb TX interrupt callback function RX interrupt callback function TX idle interrupt callback function Document Number: 002-15651 Rev. ** Page 7 of 9

PSoC Creator Component Datasheet Function Callback MFS_1_TxFifoIrqCb CsErrIrqCb SerialTimerIrqCb StopDetectIrqCb TxLinBreakIrqCb TX FIFO interrupt callback function Chip Select interrupt callback. Note: this generates a declaration only - USER must implement the function. This interrupt callback function may be generated only in CSIO Serial Timer interrupt callback. Note: this generates a declaration only - USER must implement the function. This interrupt callback function may be generated only in CSIO Stop condition interrupt callback. Note: this generates a declaration only - USER must implement the function. This interrupt callback function may be generated only in I2C LIN break field interrupt callback. Note: this generates a declaration only - USER must implement the function. This interrupt callback function may be generated only in LIN Code Examples and Application Notes There are numerous code examples that include schematics and example code available online at the Cypress Code Examples web page. Cypress also provides a number of application notes describing how FMx devices can be integrated into your design. You can access the Cypress Application Notes search web page at www.cypress.com/appnotes. Resources The PDL_MFS component uses the Multi-Function Serial Interface (MFS) peripheral block. References FM0+ Family of 32-bit ARM Cortex -M0+ Microcontrollers Peripheral Manuals Cypress FM0+ Family of 32-bit ARM Cortex -M0+ Microcontrollers Page 8 of 9 Document Number: 002-15651 Rev. **

Component Changes This section lists the major changes in the component from the previous version. Version of Changes Reason for Changes / Impact 1.0 Initial Version Cypress Semiconductor Corporation, 2016. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC ( Cypress ). This document, including any software or firmware included or referenced in this document ( Software ), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress s patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software is prohibited. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. Cypress products are not designed, intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of the device or system could cause personal injury, death, or property damage ( Unintended Uses ). A critical component is any component of a device or system whose failure to perform can be reasonably expected to cause the failure of the device or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products. You shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or death, arising from or related to any Unintended Uses of Cypress products. Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, WICED, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more complete list of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respective owners. Document Number: 002-15651 Rev. ** Page 9 of 9