Interfacing MPC5xx Microcontrollers to the MFR4310 FlexRay Controller David Paterson MCD Applications, East Kilbride

Similar documents
Interfacing MPC5500 Microcontrollers to the MFR4310 FlexRay Controller Robert Moran MCD Applications, East Kilbride, Scotland

Interfacing the MC9S12XDP512V2 Microcontroller to the MFR4310 FlexRay Controller David Paterson MCD Applications, East Kilbride, Scotland

Interfacing HCS12 Microcontrollers to the MFR4200 FlexRay Controller

Upgrade the Solution With No Changes 2 Upgrade the Solution With No Changes If a Codebase does not contain updates to its properties, it is possible t

PCB Layout Guidelines for the MC1321x

MPC8349E-mITX-GP Board Errata

USB Bootloader GUI User s Guide

Electrode Graphing Tool IIC Driver Errata Microcontroller Division

MC33696MODxxx Kit. 1 Overview. Freescale Semiconductor Quick Start Guide. Document Number: MC33696MODUG Rev. 0, 05/2007

Component Development Environment Installation Guide

Using IIC to Read ADC Values on MC9S08QG8

Mechanical Differences Between the 196-pin MAP-BGA and 196-pin PBGA Packages

56F8300 BLDC Motor Control Application

Using the Project Board LCD Display at 3.3 volts

HC912D60A / HC912Dx128A 0.5µ Microcontrollers Mask sets 2K38K, 1L02H/2L02H/3L02H & K91D, 0L05H/1L05H/2L05H

Using the Multi-Axis g-select Evaluation Boards

MPC8260 IDMA Timing Diagrams

MC56F825x/MC56F824x (2M53V) Chip Errata

MPC5200(b) ATA MDMA, UDMA Functionality BestComm Setup Recommendations

etpu General Function Set (Set 1) David Paterson MCD Applications Engineer

Pad Configuration and GPIO Driver for MPC5500 Martin Kaspar, EMEAGTM, Roznov Daniel McKenna, MSG Applications, East Kilbride

ColdFire Convert 1.0 Users Manual by: Ernest Holloway

Using the PowerQUICC II Auto-Load Feature

MFR4310 and MFR4300 Differences Thomas Luedeke Vladimir Litovtchenko

EchoRemote Evaluation Software for Windows

MTIM Driver for the MC9S08GW64

56F805. BLDC Motor Control Application with Quadrature Encoder using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers

Updating the Firmware on USB SPI Boards (KITUSBSPIEVME, KITUSBSPIDGLEVME)

MCF5445x Configuration and Boot Options Michael Norman Microcontroller Division

etpu Automotive Function Set (Set 2)

Functional Differences Between the DSP56307 and DSP56L307

MC33897 Single-Wire CAN Transceiver Reliability and Quality Documents

Clock Mode Selection for MSC8122 Mask Set K98M

Design Recommendations to Implement Compatibility Between the MC13783VK and the MC13783VK5

Migrating from the MPC852T to the MPC875

DSP56F827 Digital Signal Controller

Interfacing the MC9S12XDP512V2 Microcontroller to the MFR4200 FlexRay Controller

Introduction to LIN 2.0 Connectivity Using Volcano LTP

MC33794 Touch Panel System Using E-Field Sensor Setup Instructions

Functional Differences Between DSP56302 and DSP56309 (formerly DSP56302A)

MCF5216 Device Errata

Symphony SoundBite: Quick Start with Symphony Studio. Installation and Configuration

Using the Knock Window etpu Function

SGTL5000 I 2 S DSP Mode

Optically-Isolated Multilink BDM Interface for the S08/S12 Microcontrollers by Michael A. Steffen

56F805. Digital Power Factor Correction using Processor Expert TM Targeting Document. 56F bit Digital Signal Controllers. freescale.

XGATE Library: ATD Average Calculating a rolling average from ATD results

MPC7410 RISC Microprocessor Hardware Specifications Addendum for the MPC7410TxxnnnLE Series

XGATE Library: Using the Freescale XGATE Software Library Steve McAslan MCD Applications, East Kilbride

Power Cycling Algorithm using the MMA73x0L 3-Axis Linear Accelerometer

MPC8260 SDRAM Timing Diagrams

IIC Driver for the MC9S08GW64

Programming the Keyboard Interrupt Module (KBI) on HC(S)08 MCUs

Using the CAU and mmcau in ColdFire, ColdFire+ and Kinetis

PDB Driver for the MC9S08GW64

Affected Chips Description Impact and Workaround

Gallium Arsenide PHEMT RF Power Field Effect Transistor

MCF54451, MCF54452, MCF54453, MCF54454,

Mask Set Errata for Mask 2M40J

Interfacing HCS12 Microcontrollers to the MFR4310 FlexRay Controller David Paterson MCD Applications, East Kilbride

2005: 0.5 PQ-MDS-PCIEXP

16-bit MCU: S12XHY256 Automotive Cluster Demo by: Jose M. Cisneros Steven McLaughlin Applications Engineer Microcontroller Solutions Group, Scotland

Using the Asynchronous DMA features of the Kinetis L Series

1 Introduction. 2 Problem statement. Freescale Semiconductor Engineering Bulletin. Document Number: EB727 Rev. 0, 01/2010

Managing Failure Detections and Using Required Components to Meet ISO7637 pulse 1 on MC33903/4/5 Common Mode Choke Implementation

Differences Between the DSP56301, DSP56311, and DSP56321

Using the ColdFire+ Family Enhanced EEPROM Functionality Melissa Hunter Derrick Klotz

LFAE Bootloader Example and Interface for use with AN2546 Daniel McKenna MCD Applications, East Kilbride Scotland

56F Phase AC Induction Motor V/Hz Control using Processor ExpertTM Targeting Document 56F bit Digital Signal Controllers

Use of PGA on MC56F800x Interaction of PDB, PGA and ADC

Configuring the MCF5445x Family for PCI Host Operation

MPR083 Proximity Evaluation Kit User s Guide

Freescale BeeStack Documentation Overview Document Number: BSDO Rev /2008

Integrating FreeMASTER-Time Debugging Tool with CodeWarrior for Microcontrollers v10.x Project

MPR121 Jitter and False Touch Detection

Ordering Information Industry standard SOT343R package Device weight = g (typical) Available only in tape and reel packaging Available only in

Using the Serial Peripheral Interface (SPI) Module on 68HC(9)08 Microcontrollers

SynkroRF Network. User s Guide

Utilizing Extra FC Credits for PCI Express Inbound Posted Memory Write Transactions in PowerQUICC III Devices

Introduction to the S12G Family EEPROM Including a Comparison between the S08DZ, S12XE, and S12P Families

Using the Kinetis Family Enhanced EEPROM Functionality

Using DMA to Emulate ADC Flexible Scan Mode on Kinetis K Series

TLB Translation Setup for MPC745x and MPC744x in Non-Extended Mode

Simplified Device Data Structures for the High-End ColdFire Family USB Modules Melissa Hunter Applications Microcontroller Solutions Group

MPXHZ6400A. Freescale Semiconductor Technical Data. MPXHZ6400A Rev 0, 08/2005

MSC8144AMC-S Getting Started Guide

56F Phase Switched Reluctance Motor Control With Hall Sensors using Processor Expert Targeting Document

MPR121 Proximity Detection

MPC7455 RISC Microprocessor Hardware Specifications Addendum for the XPC74n5RXnnnNx Series

SCI Driver for the MC9S08GW64

Integrated Silicon Pressure Sensor On-Chip Signal Conditioned, Temperature Compensated and Calibrated

Implementing a Double-Precision (32-Bit) Complex FIR Filter on the MSC8101 Device

MBC13720 SiGe:C Low Noise Amplifier with Bypass Switch Device

Comparison of MC9S08QE128 and MCF51QE128 Microcontrollers Scott Pape and Eduardo Montanez Systems Engineering, Freescale Microcontroller Division

PowerQUICC II Parity and ECC Capability

NetComm Software Errata

Using the ColdFire EMAC Unit to Improve RSA Performance Jim Stephens Freescale Semiconductor

Using an I 2 C EEPROM During MSC8157 Initialization

1 Introduction. 2 Objective. Freescale Semiconductor Application Note. Document Number: AN3265 Rev. 1, 05/2007

Mask Set Errata for Mask 5L35K

Transcription:

Freescale Semiconductor Application Note Document Number: AN3256 Rev. 2, 2/2008 Interfacing MPC5xx Microcontrollers to the MFR4310 FlexRay Controller by: David Paterson MCD Applications, East Kilbride 1 Introduction Freescale Semiconductor offers a range of standalone FlexRay communication controllers (MFR4xxx) that can be interfaced with 16-bit and 32-bit microcontrollers (MCU). This application note describes the hardware, software and timing considerations necessary for reliable communication between the MFR4310 controller and the MPC5xx family of MCUs. 2 Objective The aim of the document is to demonstrate the simplicity of the hardware interface between the MFR4310 and the MPC5xx and to provide an example of the software used to configure the MPC5xx for operation. The information contained can help you quickly design a fully functional FlexRay node based on the MPC5xx Family of MCUs. Evaluation boards with software are available from Freescale, to assist in the development of FlexRay applications. (See http://www.freescale.com/flexray.) Contents 1 Introduction................................... 1 2 Objective..................................... 1 3 Hardware Design Requirements................... 2 3.1 Selecting the MPC Mode..................... 2 3.2 Bus Signals............................... 3 3.2.1 Data and Address Pins................. 3 3.2.2 Control Signals....................... 3 3.2.3 Voltage Levels....................... 3 4 Software..................................... 3 4.1 Pad Configuration for EBI Operation............ 4 4.2 Chip Select Configuration.................... 5 4.3 Wait State Requirements..................... 5 4.4 Interface Considerations..................... 5 4.5 MPC5xx initialization Software................ 6 4.6 Module Version Register..................... 6 5 Conclusions................................... 6 6 References................................... 7 Note: In this document, active-low signals are indicated by a # at the end of the signal name, e.g. IRQn#. Freescale Semiconductor, Inc., 2006 2008. All rights reserved.

Hardware Design Requirements 3 Hardware Design Requirements The MPC5xx family interfaces with the MFR4310 via the external bus interface (EBI). On the MPC5xx, the EBI provides individual address, data, and control signals. The MFR4310 must be connected to the MPC5xx using the MFR4310 MPC mode. MPC5xx Family DATA0 DATA15 D15 D0 MFR4310 ADDR19 ADDR30 A12 A1 WE/BE0# WE/BE1# CSn# OE# BSEL0# BSEL1# CE# OE# VDDXn IRQn# PL Interface INT_CC# TXD_BG2/IF_SEL0 TXD_BG1/IF_SEL1 VSSXn 3.1 Selecting the MPC Mode Figure 1. Connecting MFR4310 to MPC5xx MCUs The interface mode required for operating the Controller Host Interface (CHI) is the MPC interface. There is one CHI and Host Interface Clock for MPC mode CHICLK_CC. This is the selectable external CHI clock input. Note the following implementation constraints: The minimum external clock frequency for CHICLK_CC (when selected) is 20 MHz. The maximum external clock frequency for CHICLK_CC is 76 MHz. 2 Freescale Semiconductor

Software Table 1. MFR4310 Interface Select IF_SEL0 Pin IF_SEL1 Interface CHI and Host Interface Clock CRSR.ECS 0 0 MPC Interface CHICLK_CC 1 0 1 HCS12 synchronous interface CLK_CC 0 1 0 Asynchronous memory interface 1 CLK_CC 0 1 1 Asynchronous memory interface CHICLK_CC 1 1 This is the default interface (that is, if no external pull resistors are connected to IF_SEL0 and IF_SEL1, the internal pullup on IF_SEL0 and the internal pulldown on IF_SEL1take effect). To select the MPC interface, IF_SEL0 and IF_SEL1 must both be pulled low. 3.2 Bus Signals 3.2.1 Data and Address Pins On the MFR4310, D0 is the least significant bit (LSB) of the data bus, and A1 is the LSB of the address bus; however, on the MPC5xx, ADDR0 is the most significant bit of the address. Therefore, the data and address pins must be connected in reverse order to the MFR4310; that is, with D0 on the MFR4310 connected to DATA15 on the MPC5xx, and A1 on the MFR4310 connected to ADDR30 on the MPC5xx. 3.2.2 Control Signals The MFR4310 has a 16-bit data bus, however 8-bit data access is possible via BSEL0# and BSEL1# signals. NOTE Chip selects CS[0:3]# on the MPC5xx can be used to interface to the MFR4310. However, note that CS0# is the global chip select for boot memory. 3.2.3 Voltage Levels The MFR4310 must be configured for 3.3 V I/O (by powering VDDR with 3.3 V) to allow correct interfacing to the MPC5xx, whose EBI pins must also be powered from 3.3 V. Refer to the electrical specifications provided in the MPC561 reference manual (reference 1) and the MFR4310 data sheet (reference 2) for more information. 4 Software The software setup described in this section is concerned mainly with initializing the MPC5xx to allow successful communication with the MFR4310 Controller Host Interface. Freescale Semiconductor 3

Software When both devices have been initialized, the MPC5xx can read and write the MFR4310 registers. 4.1 Pad Configuration for EBI Operation The MPC5xx memory controller must be initialized for the EBI to use the correct chip select, and the correct number of wait states (which depends on the internal bus frequency). Figure 2 shows the steps needed to allow communication between the devices. NOTE After this sequence, the FlexRay Block is configured as a FlexRay node and is ready to be integrated into the FlexRay cluster. See the detailed initialization sequence in the FlexRay Module chapter of the MFR4310 data sheet (reference 2). Start Configure EBI (USIU clocks, etc.) Configure Chip Select Configure FlexRay Block Enable FlexRay Block Configure Protocol Engine Configure Message Buffers and FIFOs Start FlexRay Block as a FlexRay Node Figure 2. Configuration Flow 4 Freescale Semiconductor

4.2 Chip Select Configuration Software As shown in Figure 2, the second step in the initialization sequence is to configure the chip select on the MPC5xx. The memory controller controls the chip select generation for the MPC5xx. There are four chip selects on the MPC5xx, any one of which can be chosen as the chip select for the MFR4310. NOTE CS0# is the global chip select, which is used primarily for booting from external Flash memory. If it is used for this primary purpose, it cannot be used for MFR4310 communication, and a different chip select must be used. The option registers, OR[0:3], and the base registers, BR[0:3], are used to configure the chip select. Refer to the memory controller chapter of the MPC5xx reference manual for more detailed information on chip select configuration. 4.3 Wait State Requirements A number of wait states are required for successful read/write accesses between the MPC5xx and the MFR4310. Table 2 details the number of wait states required for successful operation when running with the external CHI clock. This number should be set in the memory controller option register, bits SCY. Table 2. Minimum Wait States Required CHICLK_CC as the Interface Clock Host Operating Frequency (MHz) CHICLK_CC (MHz) Minimum Wait States in SCY 4.4 Interface Considerations 56 56 3 52 52 3 48 48 3 44 44 3 40 40 2 36 36 2 32 32 2 28 28 2 24 24 2 20 20 2 BSEL0# and BSEL1# must be connected to WE/BE0# and WE/BE1# respectively via the MPC interface, as shown in Figure 1. This will allow 8-bit and 16-bit accesses. Freescale Semiconductor 5

Conclusions 4.5 MPC5xx initialization Software In Section 4.3, Wait State Requirements, it is shown that wait states are required for successful read/write cycles between the MPC5xx and MFR4310 when running at various frequencies, when CHICLK_CC is enabled. The number of wait states can be set in the appropriate chip select's option register OR[SCY] field. For example, if CS1# is being used for communication with the MFR4310, running at 56 MHz with CHICLK_CC, the following register settings could be used: Chip Select Settings: USIU.OR1.R = 0xFFFF8036; // Cycle length in clocks (SCY) = 3. USIU.BR1.R = 0x00400803; // Base address = 0x400000, port size 16bit: 0x00400803. USIU Settings: USIU.SCCRK.R = 0x55ccaa33; USIU.SCCR.R = 0x01200100; USIU.PLPRCRK.R = 0x55ccaa33; USIU.PLPRCR.R = 0x00d00000; // Unlock SCCR with special key. // RTC and PIT clock divided by 256 - regardless of // MODCLK settings. // High Frequency Clock Selected. // Limp mode is disabled. // OSCM clock is selected as input to RTC and PIT. // EngClk is Div2 of OSC/2. // Unlock PLPRC with special key. // 14 x PLL operation on normal power mode (d=56mhz, 9=40MHz). NOTE Refer to the MPC561 reference manual (reference 1) for descriptions of the register bit fields. 4.6 Module Version Register The MFR4310 module version register (MVR) contains a value specific to the mask set as defined in Table 3 (0x8566 in the case of the 1M63J mask set). Table 3. MFR4310 Part ID and Module Version Numbers Device Mask Set Number Part ID PIDR AVNR MVR When the power-on reset signal is asserted, the Clocks and Reset Generator (CRG) asserts the system reset signal. The CRG will deassert the system reset signal synchronously, approximately 16420 EXTAL/CLK_CC clock periods after the deassertion of the power-on reset signal. Refer to the CRG chapter in the MFR4310 reference manual. 5 Conclusions MFR4310 1M63J 4310 0000 8566 The MFR4310 FlexRay controller can be successfully connected to the MPC5xx family of MCUs, with the correct number of wait states set in the MPC5xx option register for the appropriate chip select. The 6 Freescale Semiconductor

References MPC5xx interfaces directly to the MFR4310 controller via the external bus no glue logic is required. Software configuration is also straightforward, the peripheral being simply memory-mapped into the global address space. The results observed verify the optimal timing parameters required for successful communication between the host microcontroller (MPC5xx) and the stand-alone FlexRay communication controller (MFR4310). 6 References 1. MPC561/MPC562/MPC563/MPC564 Reference Manual (MPC561RM) 2. MFR4310 FlexRay Communication Controller Reference Manual (MFR4310RM) These documents are available on the Freescale Semiconductor web site at http://www.freescale.com. More information on FlexRay and FlexRay products can be found at http://www.freescale.com/flexray Freescale Semiconductor 7

How to Reach Us: Home Page: www.freescale.com E-mail: support@freescale.com USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, CH370 1300 N. Alma School Road Chandler, Arizona 85224 +1-800-521-6274 or +1-480-768-2130 support@freescale.com Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) support@freescale.com Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064 Japan 0120 191014 or +81 3 5437 9125 support.japan@freescale.com Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong +800 2666 8080 support.asia@freescale.com For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado 80217 1-800-441-2447 or 303-675-2140 Fax: 303-675-2150 LDCForFreescaleSemiconductor@hibbertgroup.com Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including Typicals, must be validated for each customer application by customer s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. The PowerPC name is a trademark of IBM Corp. and is used under license. Freescale Semiconductor, Inc. 2006 2008. All rights reserved. RoHS-compliant and/or Pb-free versions of Freescale products have the functionality and electrical characteristics as their non-rohs-compliant and/or non-pb-free counterparts. For further information, see http://www.freescale.com or contact your Freescale sales representative. For information on Freescale s Environmental Products program, go to http://www.freescale.com/epp. Document Number: AN3256 Rev. 2 2/2008