Application Note, V1.2, August 2008 AP32123 TC1796. SENT Receiver (CPU & PCP implementation) Microcontrollers

Similar documents
Application Note, V 2.2, Nov AP32091 TC1766. Design Guideline for TC1766 Microcontroller Board Layout. Microcontrollers. Never stop thinking.

DAP miniwiggler V3. Application Note. Microcontrollers AP56004 V

XC83x AP Application Note. Microcontrollers. intouch Application Kit - LED Matrix Display V1.0,

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

AVR1510: Xplain training - XMEGA USART. 8-bit Microcontrollers. Application Note. Prerequisites. 1 Introduction

DAVE Software Development Kit overview. Preparing the workbench. Creating a simple APP. Step 1: Create a new APP project

AP TriCore. Sinusodial 3-Phase Output Generation Using The TriCore General Purpose Timer Array. Microcontrollers

USER GUIDE EDBG. Description

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Security & Chip Card ICs SLE 44R35S / Mifare

Application Note, Rev.1.0, September 2008 TLE8366. Application Information. Automotive Power

MBP_MSTR: Modbus Plus Master 12

6 0 0 V h i g h c u r r e n t H i g h S p e e d 3 I G B T o p t i m i z e d f o r h i g h - s w i t c h i n g s p e e d

TLI4946. Datasheet TLI4946K, TLI4946-2K, TLI4946-2L. Sense and Control. May 2009

AN3252 Application note

CHAPTER 11: Flip Flops

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

Application Note, V1.0, 2008 AN Thermal equivalent circuit models. replaces AN Industrial Power

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

Hello, and welcome to this presentation of the STM32 SDMMC controller module. It covers the main features of the controller which is used to connect

User Manual. AS-Interface Programmer

Atmel Norway XMEGA Introduction

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

DALI Control Gear Software Stack

VADC Versatile Analog to Digital Converter. XMC Microcontrollers August 2014

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

(Refer Slide Time: 00:01:16 min)

RS-485 Protocol Manual

Chapter 13. PIC Family Microcontroller

AVR317: Using the Master SPI Mode of the USART module. 8-bit Microcontrollers. Application Note. Features. Introduction

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Definitions and Documents

Bluetooth Audio Data Transfer between Bluetooth chipset (PMB6752&PMB6625) and TriCore Host TC1920

Application Note, V1.0, Nov AN Using the NTC inside a power electronic module IMM INP LP

Z-Wave Gas Reader. Product Manual NQ-9121-EU. From your Z-wave network directly to the cloud! DESCRIPTION

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

How to design and implement firmware for embedded systems

21152 PCI-to-PCI Bridge

Trace Port Analysis for ARM7-ETM and ARM9-ETM Microprocessors

Microprocessor & Assembly Language

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

White Paper. Real-time Capabilities for Linux SGI REACT Real-Time for Linux

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

8051 MICROCONTROLLER COURSE

User Manuals. Connection to Siemens S5 PU (AS511) Part Number: Version: 2. Date:

Guide to using the DALI LightNet tool

AVR319: Using the USI module for SPI communication. 8-bit Microcontrollers. Application Note. Features. Introduction

Serial Communications

AVR305: Half Duplex Compact Software UART. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

DS1621 Digital Thermometer and Thermostat

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

M CORE 14-PIN ENHANCED BACKGROUND DEBUG INTERFACE (14EBDI) USER S MANUAL

Making Basic Measurements. Publication Number August Training Kit for the Agilent Technologies Series Logic Analysis System

Chip Card & Security ICs Mifare NRG SLE 66R35

AVR1301: Using the XMEGA DAC. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

DS1307ZN. 64 x 8 Serial Real-Time Clock

Application Note AN_209. AN_209 PDIUSBD12 to FT120 Migration Guide

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

8254 PROGRAMMABLE INTERVAL TIMER

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

EMC6D103S. Fan Control Device with High Frequency PWM Support and Hardware Monitoring Features PRODUCT FEATURES ORDER NUMBERS: Data Brief

Kvaser Mini PCI Express User s Guide

How To Fix An Lmx9838 Bluetooth Serial Port Module With Bluetooth (Bluetooth 2) From A Bluetooth Bluetooth 4.2 Device With A Bluembee 2.2 Module

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Dolphin In-Circuit programming Updating Firmware in the field

Intel Extreme Memory Profile (Intel XMP) DDR3 Technology

Freescale Semiconductor, I

Local Interconnect Network Training. Local Interconnect Network Training. Overview

AN3265 Application note

Single channel data transceiver module WIZ2-434

Hello, welcome to this presentation of the low power timer, or LPTMR, module for Kinetis MCUs. In this session you ll learn about the LPTMR, it s

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

Manchester Encoder-Decoder for Xilinx CPLDs

SD Specifications Part A2 SD Host Controller Simplified Specification

Z8 Encore! XP F64xx Series Flash Microcontrollers. In-Circuit Emulator. User Manual UM

AVR126: ADC of megaavr in Single Ended Mode. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

AN4646 Application note

OptiMOS Power-Transistor Product Summary

Software User Guide UG-461

find model parameters, to validate models, and to develop inputs for models. c 1994 Raj Jain 7.1

O p t i m u m M O S F E T S e l e c t i o n f o r S y n c h r o n o u s R e c t i f i c a t i o n

OptiMOS 3 Power-Transistor

10-/100-Mbps Ethernet Media Access Controller (MAC) Core

AN1754 APPLICATION NOTE

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

DS1621 Digital Thermometer and Thermostat

Axia IP-Audio Driver Update v June, 2013

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

ET-BASE AVR ATmega64/128

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

Transport Layer Protocols

AN3998 Application note

How To Write A Profibus Dpl (Profibus) Program

BLUETOOTH SERIAL PORT PROFILE. iwrap APPLICATION NOTE

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Transcription:

Application Note, V1.2, August 2008 AP32123 TC1796 (CPU & PCP implementation) Microcontrollers

Edition 2008-08-07 Published by Infineon Technologies AG 81726 München, Germany Infineon Technologies AG 2008. All Rights Reserved. LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY, CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT. THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION. INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND (INCLUDING WITHOUT LIMITATION WARRANTIES OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY) WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE. Information For further information on technology, delivery terms and conditions and prices please contact your nearest Infineon Technologies Office (www.infineon.com). Warnings Due to technical requirements components may contain dangerous substances. For information on the types in question please contact your nearest Infineon Technologies Office. Infineon Technologies Components may only be used in life-support devices or systems with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.

AP32123 Revision History: 2008-08 V1.2 Previous Version: Author: Page none Alann Denais Subjects (major changes since last revision) We Listen to Your Comments Any information within this document that you feel is wrong, unclear or missing at all? Your feedback will help us to continuously improve the quality of this document. Please send your proposal (including a reference to this document) to: mcdocu.comments@infineon.com Application Note 3 V1.2, 2008-08

Table of Contents Page 1 Scope...5 2 Needed material...6 3 Installation steps...7 4 Micro controller resources used...8 5 Implementation on the TC1796 (SENT channel 1)...9 5.1 Capturing the SENT Rx signal...9 5.2 Buffering the nibbles...10 5.3 Decoding the frame...10 5.4 Synchronization...12 5.5 Notification to the application layer...13 5.6 Configuration summary...13 5.7 Configuration differences for the PCP version...14 6 2 nd SENT channel...15 6.1 Configuration summary...16 6.2 Configuration differences for the PCP version...17 7 CPU / PCP resources...18 7.1 Load for the CPU & PCP versions...18 7.2 Memory footprint...18 8 Source code example...19 8.1 Documentation...19 8.2 Building the CPU version...19 8.3 Building the PCP version...19 8.3.1 Generating PCP object files...19 8.3.2 Generating the target.elf file...19 8.3.3 Patch for the Tasking PCP compiler version 2.5r2...20 9 Possible extension...21 Application Note 4 V1.2, 2008-08

Scope 1 Scope Dear Reader, Thanks for using this SENT 1 receiver! This tool will help you to receive and decode data coming from a SENT sensor 2, on your target microcontroller. This document will give you step by step instruction in order to install and operate the receiver, but also describe in detail the configuration needed to realize such a function with the TC1796 microcontroller. The aim of this receiver is to decode a SENT compatible signal. For this a TC1796 microcontroller TriBoard is used. The following features are supported by the receiver: Reception and decoding of SENT compliant frames. The decoding is done on the PCP or on the CPU, both version are available as source code. Up to 8 data nibbles per frame. Serial data decoding. Programmable clock rate. Error detection: signal loss, synchronization loss, clock drift, invalid CRC, invalid data nibble, serial data error. Full source code available 3. Have fun with Infineon s SENT receiver! 1 Single Edge Nibble Transmission (SENT) refers to the SAE standard J2716. For more information, please visit www.sae.org. 2 The receiver decodes logical SENT frames. Electrical characteristics as defined by the standard are not covered. 3 The code delivered with this application note is aimed at development and demonstration purpose only. Neither is its quality nor its robustness guaranteed. Application Note 5 V1.2, 2008-08

Needed material 2 Needed material The following HW and SW material is mandatory to operate the tool: A PC with local administration rights. A functional TC1796 TriBoard (incl. cables, power supplies and adapter board). A debugger supporting TC1796. An oscilloscope. The Receiver source code and executable (included in this package). Optional: Tasking VX-toolset for TriCore, v2.5. Optional: Tasking VX-toolset for TriCore & PCP, v2.5 A SENT compatible sensor or the SENT simulator (see appnote AP32118) It is strongly recommended to have the Tasking toolchain installed and running on the PC where the receiver is running, so that the default parameters of the receiver can be changed (recompilation needed). For more information about the toolchain, please visit www.tasking.com. The Receiver software delivered with this application note is made of: Source code Object file for the PCP version Executable files (.elf and.hex) for each PCP and CPU version Two tasking project files for the toolchain v2.5, one for each PCP and CPU version. Application Note 6 V1.2, 2008-08

Installation steps 3 Installation steps It is assumed that the user knows how to operate the different tools mentioned above (Compiler, Debugger, TriBoard, etc.). The following steps may be followed to install operate the receiver: Install all the needed SW tools (Tasking toolchain, debugger). Connect a TriBoard to the debugger. Connect the SENT Rx signal to the pin 2.8, Connect the SENT ground signal to the TriBoard digital ground Connect an scope to the pin 2.9 (DMA trigger) Connect a scope to the pin 2.10 (Decoding ISR execution time) Build the project. Start a debugger session. Run the program, and look for the global variable System. The member structure System.SentStatus holds the received information. Further more the DMA trigger signal is made available on the pin 2.9 on the scope. This example implements a second SENT channel 4 : o SENT Rx signal: pin 3.0 o DMA trigger pin 3.1 4 The 2 nd SENT channel is disabled by default. It can be enabled with the switch SENT_ENABLE_CHANNEl_1 Application Note 7 V1.2, 2008-08

Micro controller resources used 4 Micro controller resources used GPTA: Event capture, Signal generation ERU: Trigger routing between GPTA LTC cell and DMA DMA: Data buffering PCP/CPU: Data processing Application Note 8 V1.2, 2008-08

Implementation on the TC1796 (SENT channel 1) 5 Implementation on the TC1796 (SENT channel 1) Figure 1 SENT channel resources usage The Figure 1 presents the implementation of the SENT driver on the TC1796. The decoding of the SENT frames can be seen as 4 steps: Capturing and buffering the nibbles (GPTA & DMA) Checking for signal timeout (GPTA) Decoding the frame (PCP or CPU according to the implemented version) Synchronization on the frame start/end (PCP or CPU according to the implemented version) 5.1 Capturing the SENT Rx signal The Rx signal present on the P2.8 pin is connected to the GPTA input signal IN0. The input multiplexer is setup to connect the signal IN0 to the LTC0. The SENT nibble start is defined by the falling edge of the SENT signal and the nibble value by the time between two consecutive falling edges. In order to acquire each nibble, the GPTA is setup to continuously capture the time between two falling edges. The acquisition is implemented using two LTCs, the 1 st one as a reset timer (LTC0) that counts up and is reset when an event on the next cell occurs. The 2 nd one is configured as a capture (LTC1) that captures the timer value on each falling edge and reset the timer LTC0. The captured value represents the nibble value in GPTA ticks. In order to process the incoming nibbles a trigger event is generated using the following configuration: LTC1 set the trigger signal on falling edge of Rx (cell action: Set) LTC2 reset the trigger signal after a time T inhibit (cell action: copy or reset) Application Note 9 V1.2, 2008-08

Implementation on the TC1796 (SENT channel 1) The trigger signal is routed to the GPTA OUT0 5 The inhibit time T inhibit avoids unnecessary triggering due to high frequency noise that could be seen on the Rx pin. This also acts as a filter 6 and strengthens the signal reception quality. In order to check for the presence of the SENT signal, a 4 th LTC cell is used (LTC3). This cell compares the timer value with the maximal nibble time 7 and generates a timeout event to the processor in case a nibble is missing. See the Sent_TimeoutIsr_0() function. 5.2 Buffering the nibbles In order to offload the processor that decodes the SENT frame, the nibbles are buffered by the DMA engine until a complete frame has been received 8. Then the DMA raise an interrupt to the processor which decode the full frame. See the Sent_NibbleIsr_0() function. The trigger defined previously is used to trigger a DMA move on each captured nibble. For that purpose the ERU is configured to route the signal GPTA OUT0 to the request line 1 of the DMA channel 0. The ERU is configured as follow: OUT0 is connected to the ERU input channel 0, input IN02 The ERU input channel 0 generates a pulse on INT00, on the rising edge of OUT0 signal The ERU output channel 0 forward the INT00 signal to IOUT0 The IOUT0 is connected to the request line 1 of the DMA channel 0 The DMA channel 0 is configured so that on each trigger event, the captured nibble value is read and copied to a circular buffer. The DMA destination pointer is incremented on each DMA move. Once the buffer end is reached, the destination pointer is set to the beginning of the buffer, and so on. This configuration implies some restriction on the buffer base address and buffer size: The buffer size should buffer at least 2 full frames, so that 1 frame can be processed while the next one is being buffered. The move size must be set according to the memory access modes, and be at least 16 bit. The DMA circular buffer wrap around mechanism only allow a buffer base address aligned on multiple of the buffer size itself. In the current implementation, the frame size is 9 nibbles (24 data bits). Therefore the buffer should be at least 18 nibbles long. The next power of two, in order to be able to use the circular buffer is then 32 nibbles. For the CPU version, the buffer is located in the LDRAM which can be accessed 16 bit wise; therefore the buffer size is set to 64 bytes. The base address of the buffer should have the 6 least significant bits set to 0. For the PCP version, the buffer is located in the PCP RAM which can only be accessed 32 bit wise; therefore the buffer size is set to 128 bytes. The base address of the buffer should have the 7 least significant bits set to 0. 5.3 Decoding the frame As described previously, the SENT nibbles are buffered by the DMA engine and an interrupt is generated to the processor once a full frame is supposed to be buffered. The interrupt will then check the incoming nibbles for: 5 The trigger signal is also routed to the GPTA OUT1 for debugging purpose (oscilloscope probe) 6 Note that glitches that appear during the OUT0 high state will still be captured by the LTC, but ignored by the nibble decoding process because no DMA transfer is triggered. 7 The maximal nibble time limit is defined by the calibration pulse: 56*(T TickNominal *1.25). 8 A complete frame is supposed to be received when all frame s nibbles have been received, for example FrameSize = 9 nibbles for a frame with 24 bits data (1x calibration pulse + 1x status and communication + 6x data nibbles + 1x CRC). Application Note 10 V1.2, 2008-08

A valid calibration pulse Valid nibbles AP32123 Implementation on the TC1796 (SENT channel 1) A Valid Frame CRC, and valid serial CRC if a serial frame has been received Then save the received data, and optionally generate an interrupt to the CPU. The Figure 2 presents in details the decoding of the SENT frame. Figure 2 IsrNibbles() The Figure 3 presents the action on nibble timeout. Figure 3 IsrTimeout() Application Note 11 V1.2, 2008-08

Implementation on the TC1796 (SENT channel 1) 5.4 Synchronization As soon as enabled, the driver starts buffering the incoming nibbles. Each time a full frame nibble count has been received (9 nibbles for the current implementation); an interrupt is raised to the processor. In most of the cases the interrupt is not synchronized on the end of the SENT frame, and the latency between the last frame nibble and the notification to the processor may last up to (FrameSize-1) nibbles in the worst case. See figure below: Figure 4 Not synchronized frame state In order to reduce the latency between the time a full frame is has been received and the start of the frame processing, the DMA interrupt is synchronized on the SENT frame last nibble. In this case the latency is reduced to the time needed by the processor to handle the received frame. The synchronization is checked each time a complete frame has been received. In case the DMA is not synchronized, the next DMA interrupt is delayed so that it is raised exactly at the end of the frame as shown in Figure 5. Figure 5 Synchronized frame state In order for the synchronization to be valid, it must be ensure that the reconfiguration of the DMA transfer count value is done between the falling edge of the SENT signal that triggered the interrupt and the next SENT signal falling edge. In the case this condition can not be fulfilled, the synchronization might not be done properly and the SENT frame decoding will not be valid (unknown behavior). The reason for not being able to fulfill this condition is a too high processor load. In such case the synchronization should be disabled (undefined the switch SENT_ENABLE_FRAME_SYNC). Application Note 12 V1.2, 2008-08

Implementation on the TC1796 (SENT channel 1) 5.5 Notification to the application layer When a SENT frame has been received, a sticky status Flag is set which can be reset with the function Sent_ResetStatus(). When an error has been detected, a sticky status Flag is set which can be reset with the function Sent_ResetErrors(). The application can use the polling method or react on an interrupt being set by the driver. This interrupt is generated on the following events: A valid frame has been received A valid serial frame has been received An error has been detected To enable the interrupt generation, the following switches must be defined: SENT_ENABLE_DATA_INTERRUPT SENT_ENABLE_SDATA_INTERRUPT SENT_ENABLE_ERROR_INTERRUPT 5.6 Configuration summary P2.8 LTC0 (Timer) LTC1 (Nibble capture) LTC2 (HF filter) LTC3 (Timeout) ERU input channel 0 ERU output channel 0 DMA channel 0, Engine 0 Direction : Input Pull-up / pull-down : No Mode : Timer with reset from next cell Input : GPTA clock bus 0 Input mode : Level sensitive (high level) Initial value : 0x0000 Interrupt : No Action on event : Hold Output : none Mode : Capture last timer Input : Pin P2.8 Input mode : Edge sensitive (falling edge) Interrupt : No Action on event : Set Output : none Mode : Compare with last timer Compare value : 5 * T Tick * 0.75 Interrupt : No Action on event : Copy or reset Output : OUT0 Mode : Compare with last timer Compare value : 56 * T Tick * 1.25 Interrupt : Yes (timeout) Action on event : Hold Output : none Input : IN02 (GPTA OUT0) Edge detection : Rising edge Auto reset flag : Enabled Output : INT00 ERU INTF0 : Disabled ERU INTF1 : Disabled ERU INTF2 : Disabled ERU INTF3 : Disabled Pattern trigger : Disabled Interrupt gating : Always Output : IOUT0 DMA move size : 16 bit DMA transfer : 1 DMA move DMA transaction : FrameSize or TransactionCount Transfer mode : Single transfer, continuous Application Note 13 V1.2, 2008-08

Implementation on the TC1796 (SENT channel 1) Timeout interrupt Nibble interrupt SENT channel interrupt Source : No increment Destination : Positive increment by 16 bit, wrap around at 64 bytes Source address : LTC1 value Destination address : Channel buffer address Trigger : Request line 1 (IOUT0) Channel interrupt : Interrupt node pointer 1, Interrupt on Count=0. Interrupt generated after each transaction. Region enabled : GPTA0, GPTA1,LTCA2, DMI image Transaction lost error : Disabled Source error : Disabled Destination error : Disabled DMA priority : Low DMA channel priority : Low Shadow : No Source : LTC3 Priority : 8 Source : DMA channel 0 Priority : 9 Source : software, on SEND frame received & error Priority : 1 5.7 Configuration differences for the PCP version DMA channel 0, Engine 0 DMA move size : 32 bit Destination : Positive increment by 32 bit, wrap around at 128 bytes Application Note 14 V1.2, 2008-08

2nd SENT channel 6 2 nd SENT channel A second SENT channel has been implemented in a similar way than the 1 st channel. The specific channel configuration is described in the figure below. Note that the channel is by default disabled and can be enabled with the switch SENT_ENABLE_CHANNEl_1. Figure 6 SENT channel 2 resources usage Application Note 15 V1.2, 2008-08

2nd SENT channel 6.1 Configuration summary P3.0 LTC8 (Timer) LTC9 (Nibble capture) LTC10 (HF filter) LTC11 (Timeout) ERU input channel 0 ERU output channel 0 DMA channel 0, Engine 0 Timeout interrupt Nibble interrupt SENT interrupt channel Direction : Input Pull-up / pull-down : No Mode : Timer with reset from next cell Input : GPTA clock bus 0 Input mode : Level sensitive (high level) Initial value : 0x0000 Interrupt : No Action on event : Hold Output : none Mode : Capture last timer Input : Pin P3.0 Input mode : Edge sensitive (falling edge) Interrupt : No Action on event : Set Output : none Mode : Compare with last timer Compare value : 5 * T Tick * 0.75 Interrupt : No Action on event : Copy or reset Output : OUT8 Mode : Compare with last timer Compare value : 56 * T Tick * 1.25 Interrupt : Yes (timeout) Action on event : Hold Output : none Input : IN12 (GPTA OUT8) Edge detection : Rising edge Auto reset flag : Enabled Output : INT11 ERU INTF0 : Disabled ERU INTF1 : Disabled ERU INTF2 : Disabled ERU INTF3 : Disabled Pattern trigger : Disabled Interrupt gating : Always Output : IOUT1 DMA move size : 16 bit DMA transfer : 1 DMA move DMA transaction : FrameSize or TransactionCount Transfer mode : Single transfer, continuous Source : No increment Destination : Positive increment by 16 bit, wrap around at 64 bytes Source address : LTC9 value Destination address : Channel buffer address Trigger : Request line 1 (IOUT1) Channel interrupt : Interrupt node pointer 1, Interrupt on Count=0. Interrupt generated after each transaction. Region enabled : GPTA0, GPTA1,LTCA2, DMI image Transaction lost error : Disabled Source error : Disabled Destination error : Disabled DMA priority : Low DMA channel priority : Low Shadow : No Source : LTC11 Priority : 10 Source : DMA channel 0 Priority : 11 Source : software, on SEND frame received & error Priority : 1 Application Note 16 V1.2, 2008-08

2nd SENT channel 6.2 Configuration differences for the PCP version DMA channel 0, Engine 0 DMA move size : 32 bit Destination : Positive increment by 32 bit, wrap around at 128 bytes Application Note 17 V1.2, 2008-08

CPU / PCP resources 7 CPU / PCP resources 7.1 Load for the CPU & PCP versions Frame decoding 9 Frame time CPU Version PCP version (us) (CPU @150Mhz) (PCP @75Mhz) Time for full frame decoding 6.1us 44.4us Average case 10 642.0 1.0% 6.9% Worst case 11 364.8 1.7% 12.2% Best case 12 993.6 0.6% 4.5% 7.2 Memory footprint Code (bytes) Data (bytes) CPU version CPU 11140 7788 PCP version CPU 14310 7192 PCP 3452 1776 9 Frame length of 9 nibbles for 24 data bits. Serial frame decoding disabled 10 Having a nominal frame tick of 3us, average frame length 214 ticks 11 Having a nominal frame tick of 3us - 20% = 2.4us, min frame length 152 ticks 12 Having a nominal frame tick of 3us + 20% = 3.6us, max frame length 276 ticks Application Note 18 V1.2, 2008-08

Source code example 8 Source code example 8.1 Documentation The source code documentation can be found in HTML format, see the file\doc\html\index.. The documentation structure is as follow: Tab Description Main page General information Module Structured source code documentation. Data structures Information on data structures Files File description Note that the default configuration can be modified in the file configuration.h. 8.2 Building the CPU version Load and compile the tasking project AP32123_SENTR(TC1796_RAM).pjt. Note that a DAvE initialization version is also provided. See the project AP32123_SENTR(TC1796_RAM)_DAvE.pjt. 8.3 Building the PCP version The PCP version is built in two steps: Generate the object file for the using the PCP compiler Compile the whole project using the Tricore compiler 8.3.1 Generating PCP object files Run the batch file BuildPcp.bat. This will launch mkpcp using the default make file makefile. The environment variable PATH should contain the path to mkpcp.exe. The default path is C:\Program Files\TASKING\Tricore v2.5r1\cpcp\bin. The following object files will be generated: Sent_core.c pcp_sent_core.o Sent_pcp.c pcp_sent_pcp.o Bsp.c pcp_bsp.o 8.3.2 Generating the target.elf file Load and compile the tasking project AP32123_SENTR(TC1796_PCP_RAM).pjt. Application Note 19 V1.2, 2008-08

Source code example 8.3.3 Patch for the Tasking PCP compiler version 2.5r2 The Tasking Vx toolset for Tricore and PCP v2.5r2, disable the channel by clearing the flag CEN of register R7. This produces the error Disable channel request (DCR flag). In order to avoid such errors, the function _sti() and _ldi()have been re-written, and overwrite the ones defined in the tasking library. Furthermore, all instruction that set the register R7 (LDL.IL R7, #const) are patched so that the bit CEN is set. The patch is enabled when the constant PATCH_CEN is defined to 1 in the file CompilerFix.h. Application Note 20 V1.2, 2008-08

Possible extension 9 Possible extension It is possible to use the FPC to filter the SENT signal against glitches. This is currently not part of the implementation. Application Note 21 V1.2, 2008-08

http://www.infineon.com Published by Infineon Technologies AG