Page 2 - User’s Manual; BOSCH; TTCAN; Copyright Notice and Proprietary Information
User’s Manual BOSCH - 2/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Copyright Notice and Proprietary Information Copyright © 1998, 1999, 2002 Robert Bosch GmbH. All rights reserved. This software and manual areowned by Robert Bosch GmbH, and may be used only as authorized in the license agreeme...
Page 6 - About this Document; Helvetica bold
User’s Manual BOSCH - 6/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 1. About this Document 1.1 Change Control 1.1.1 Current Status Revision 1.6 1.1.2 Change History Issue Date By Change Draft 0.0 30.06.00 F. Hartwich First Draft Revision 0.1 12.01.01 F. Hartwich Gap Control Revision 0.2 21.10.0...
Page 7 - Terms and Abbreviations
User’s Manual BOSCH - 7/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 1.5 Terms and Abbreviations This document uses the following terms and abbreviations. Term Meaning CAN Controller Area Network BSP Bit Stream Processor BTL Bit Timing Logic CRC Cyclic Redundancy Check Register DLC Data Length C...
Page 8 - Functional Description; Functional Overview
User’s Manual BOSCH - 8/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 2. Functional Description 2.1 Functional Overview The TTCAN is a CAN IP module that can be integrated as stand-alone device or as part of anASIC. It is described in VHDL on RTL level, prepared for synthesis. It consists of thec...
Page 9 - Message Handler; CPU IFC Register 2; Module Interface
User’s Manual BOSCH - 9/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 2.2 Block Diagram Figure 1: Block Diagram of the TTCAN CAN_CoreCAN Protocol Controller and Rx/Tx Shift Register, handles all ISO 11898-1 protocol functions. Message HandlerState Machine that controls the data transfer between t...
Page 10 - Setting Init does not change any configuration register.; Bus
User’s Manual BOSCH - 10/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 2.3 Operating Modes 2.3.1 Software Initialisation The software initialization is started by setting the bit Init in the CAN Control Register, eitherby software or by a hardware reset, or by going Bus_Off. While Init is set, al...
Page 11 - StW
User’s Manual BOSCH - 11/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm set to not valid any time, even when their requested transmission is still pending. The old datawill be discarded when a message is updated before its pending transmission has started. Depending on the configuration of the Mes...
Page 15 - Programmer’s Model; Address; r signifies the actual value of the CAN_RX pin.
User’s Manual BOSCH - 15/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3. Programmer’s Model The TTCAN module allocates an address space of 256 bytes. The registers are organized as16-bit registers, with the high byte at the odd address and the low byte at the even address. The two sets of interf...
Page 17 - ting or resetting Init. If the device goes
User’s Manual BOSCH - 17/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.2 CAN Protocol Related Registers These registers are related to the CAN protocol controller in the CAN Core. They control theoperating modes and the configuration of the CAN bit timing and provide status information. 3.2.1 C...
Page 18 - rw
User’s Manual BOSCH - 18/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.2.2 Status Register (addresses 0x03 & 0x02) BOff Bus_Off Statusone The CAN module is in Bus_Off state. zero The CAN module is not Bus_Off. EWarn Warning Status one At least one of the error counters in the EML has reache...
Page 19 - RP
User’s Manual BOSCH - 19/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The LEC field holds a code which indicates the type of the last error to occur on the CAN bus.This field will be cleared to ‘0’ when a message has been transferred (reception or transmis-sion) without error. The unused code ‘7...
Page 20 - ures the TTCAN for a bit rate of 500 kBit/s.; Figure 6: IF1 and IF2 Message Interface Register Sets
User’s Manual BOSCH - 20/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm BRP Baud Rate Prescaler0x00-0x3F The value by which the oscillator frequency is divided for gener-ating the bit time quanta. The bit time is built up from a multipleof this quanta. Valid values for the Baud Rate Prescaler are[...
Page 21 - Mask
User’s Manual BOSCH - 21/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm single transfer. This transfer, performed in parallel on all selected parts of the Message Object,guarantees the data consistency of the CAN message. Figure 6 shows the structure of the twoInterface Register sets. The function...
Page 22 - Note : When writing to a Message Object, this bit is ignored.
User’s Manual BOSCH - 22/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm ClrIntPnd Clear Interrupt Pending Bit Note : When writing to a Message Object, this bit is ignored. TxRqst/NewDatAccess Transmission Request Bit one set TxRqst bit zero TxRqst bit unchanged Note : If a transmission is requeste...
Page 23 - Busy
User’s Manual BOSCH - 23/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 6 CAN_CLK periods, the transfer between the Interface Register and the Message RAM hascompleted and the Busy bit is cleared to ‘0’. The upper limit of the wait time occurs when themessage transfer coincides with a CAN message ...
Page 24 - Message Object in the Message Memory; initialization of the Message Object before MsgVal is set to
User’s Manual BOSCH - 24/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.3.3.3 IFx Message Control Registers 3.3.3.4 IFx Data A and Data B Registers The data bytes of CAN messages are stored in the IFx registers in the following order: In a CAN Data Frame, Data(0) is the first, Data(7) is the las...
Page 27 - Message Handler Registers
User’s Manual BOSCH - 27/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Data 0 1st data byte of a CAN Data Frame Data 1 2nd data byte of a CAN Data Frame Data 2 3rd data byte of a CAN Data Frame Data 3 4th data byte of a CAN Data Frame Data 4 5th data byte of a CAN Data Frame Data 5 6th data byte ...
Page 29 - Registers for Time Triggered Communication
User’s Manual BOSCH - 29/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.4.5 Message Valid 1 Register MsgVal32-1Message Valid Bits (of all Message Objects) one This Message Object is configured and should be considered by the Mes-sage Handler. zero This Message Object is ignored by the Message Ha...
Page 30 - res; TTMode
User’s Manual BOSCH - 30/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm In the Trigger Memory, the Triggers must be sorted according to their Time_Marks. There maynot be two Triggers that are active at the same Cycle Time and Cycle_Count. For details seechapter 5.1.3. Type Trigger Type0 Tx_Ref_Tri...
Page 32 - CCM
User’s Manual BOSCH - 32/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm CCM Cycle_Count_Max (Number of last Basic Cycle in the Matrix Cycle)0x00 1 Basic Cycle in the Matrix Cycle. 0x01 2 Basic Cycles in the Matrix Cycle. 0x03 4 Basic Cycles in the Matrix Cycle. 0x07 8 Basic Cycles in the Matrix Cy...
Page 33 - Note : The initialisation is restarted by resetting IWT.
User’s Manual BOSCH - 33/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Any number of bits may be written to ‘0’ (cleared) at the same time. Bits that are written to ‘1’remain unchanged. CfE Config ErrorSet when an error is found in the Trigger List. ApW Application WatchdogSet when the applicatio...
Page 34 - RTO
User’s Manual BOSCH - 34/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.5.9 TT Global Time Register (addresses 0x35 & 0x34) Global_Time Global Time of the TTCAN network 0x0000-0xFFFF Actual Global Time value. 3.5.10 TT Cycle Time Register (addresses 0x37 & 0x36) Cycle_Time Cycle Time of ...
Page 35 - x1FFFF]. The value configured in NumCfg is the initial value for
User’s Manual BOSCH - 35/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.5.13 TT Cycle Count Register (addresses 0x3D & 0x3C) C_Cnt5-0 Cycle_Count 0x00-0x3F The number of the actual Basic Cycle in the System Matrix. 3.5.14 TT Error Level Register (addresses 0x3F & 0x3E) MSCmax Maximum Mes...
Page 36 - ] TUR Denominator Configuration; the Trigger Memory must differ by at least 2 NTU.; TUR Numerator Actual Value; NumAct
User’s Manual BOSCH - 36/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.5.16 TUR Denominator Configuration Register (addresses 0x59 & 0x58) DenomCfg[13 … 0] TUR Denominator Configuration 0x0000 Illegal value. 0x0001-0x3FFF DenomCfg[13 … 0]. The length of the NTU is given by (NumCfg • System ...
Page 39 - Gap GpH NiG
User’s Manual BOSCH - 39/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 3.5.22 TT Time Mark Register (addresses 0x6D & 0x6C) TMark Time Mark0x0000-0xFFFF An interrupt is generated when the time base indicated by TMC (Cycle Time, Local Time, or Global Time) has the same value asTime Mark. Note ...
Page 41 - Internal CAN Message Handling
User’s Manual BOSCH - 41/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4. CAN Application The TTCAN module can emulate a C_CAN module in ordinary event driven ISO 11898-1 CANcommunication. C_CAN software can also be used for the TTCAN, provided that the TTCAN’sapplication watchdog is disabled in ...
Page 42 - Transmission of Messages in Event Driven CAN Communication
User’s Manual BOSCH - 42/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm When the CPU initiates a data transfer between the IFx Registers and Message RAM, theMessage Handler sets the Busy bit in the respective Command Request Register to ‘1’. Afterthe transfer has completed, the Busy bit is set bac...
Page 43 - Acceptance Filtering of Received Messages
User’s Manual BOSCH - 43/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4.1.3 Acceptance Filtering of Received Messages When the arbitration and control field (Identifier + IDE + RTR + DLC) of an incoming messageis completely shifted into the shift register of the CAN_Core, the Message Handler FSM...
Page 44 - Configuration of the Module
User’s Manual BOSCH - 44/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Received messages with identifiers matching to a FIFO Buffer are stored into a MessageObject of this FIFO Buffer, starting with the Message Object with the lowest message number. When a message is stored into a Message Object ...
Page 45 - Time Quantum; Nominal CAN Bit Time
User’s Manual BOSCH - 45/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4.2.1 Configuration of the Bit Timing Even if minor errors in the configuration of the CAN bit timing do not result in immediatefailure, the performance of a CAN network can be reduced significantly. In many cases, the CAN bit...
Page 50 - around the nominal frequency f; with; Bit; Bit Stream Processor
User’s Manual BOSCH - 50/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4.2.1.4 Oscillator Tolerance Range The oscillator tolerance range was increased when the CAN protocol was developed fromversion 1.1 to version 1.2 (version 1.0 was never implemented in silicon). The option tosynchronise on edg...
Page 52 - m i n P B 1 P B 2
User’s Manual BOSCH - 52/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm If more than one configuration is possible, that configuration allowing the highest oscillatortolerance range should be chosen. CAN nodes with different system clocks require different configurations to come to the samebit rat...
Page 53 - Configuration of the Message Memory
User’s Manual BOSCH - 53/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4.2.1.8 Example for Bit Timing at low Baudrate In this example, the frequency of CAN_CLK is 2 MHz, BRP is 1, the bit rate is 100 KBit/s. t q 1 µ s = 2 • t CAN_CLK delay of bus driver 200 ns delay of receiver circuit 80 ns dela...
Page 54 - Configuration of a Single Receive Object for Data Frames; Figure 14 shows how a Receive Object should be initialised.
User’s Manual BOSCH - 54/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The CPU may poll all Message Object’s NewDat and TxRqst bits in parallel, in the New Data xRegisters and in the Transmission Request x Registers. Polling is made easier if all TransmitObjects are grouped at the low numbers, al...
Page 55 - Configuration of a Single Receive Object for Remote Frames
User’s Manual BOSCH - 55/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The Arbitration Registers (ID28-0 and Xtd bit) are given by the application. They define theidentifier and type of accepted received messages. If an 11-bit Identifier (“Standard Frame”) isused (Xtd = ‘0’), it is programmed to ...
Page 56 - CAN Communication
User’s Manual BOSCH - 56/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm ‘0’), it is programmed to ID28 - ID18, ID17 - ID0 can then be disregarded. When a RemoteFrame with an 11-bit Identifier is received, ID17 - ID0 will be set to ‘0’. The Data Length Code (DLC3-0) may be given by the application....
Page 57 - zero (the cause of the interrupt is reset) or until IE is reset.
User’s Manual BOSCH - 57/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The interrupt identifier IntId in the Interrupt Register indicates the cause of the interrupt. Whenno interrupt is pending, the register will hold the value zero. If the value of the Interrupt Register is different from zero, ...
Page 58 - Requesting New Data for a Receive Object
User’s Manual BOSCH - 58/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 4.3.3 Changing a Transmit Object In an application for that the number of Message Objects in the TTCAN module is notsufficient, the Transmit Objects may be managed dynamically. The CPU writes the wholemessage (Arbitration, Con...
Page 60 - TTCAN Configuration
User’s Manual BOSCH - 60/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 5. TTCAN Application 5.1 TTCAN Configuration The TTCAN’s default operating mode after hardware reset is Standard CAN Communicationwithout time triggers. The TTMode has to be switched into Configuration Mode before thetiming an...
Page 61 - TUR
User’s Manual BOSCH - 61/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Figure 18: TUR configuration examples The TTCAN module provides a watchdog to verity the function of the application program. Thehost has to serve this watchdog regularly, else all CAN bus activity is stopped. The ApplicationW...
Page 63 - active and will be treated as a Configuration Error.; The following restrictions exist for the node’s Trigger List :
User’s Manual BOSCH - 63/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm for Arbitrating Time Windows, Tx_Trigger_Merged may be used only for Merged ArbitratingTime Windows. The last Tx_Trigger of a Merged Arbitrating Time Window must be of the typeTx_Trigger_Single. A Configuration Error (Error le...
Page 65 - TTCAN Schedule Initialisation
User’s Manual BOSCH - 65/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm TxRqst and RmtEn may never be set for a periodic transmit message. To enable thetransmission of a periodic message inside an Exclusive Time Window, TxRqst has to be set to‘0’ and NewDat has to be set to ‘1’. The message will b...
Page 66 - TTCAN Message Handling
User’s Manual BOSCH - 66/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm reset or configuration, giving no acknowledge). When it reaches Initial_Watch_Trigger (notpart of the Trigger List, defined as maximum of Cycle Time), the attempted transmission isaborted, IWT in the Interrupt Vector register ...
Page 67 - TTCAN Gap Control
User’s Manual BOSCH - 67/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Window, the retransmission may happen inside the same Window. The retransmission will notbe started if NewDat is reset by the application program. When a Message Object for event driven messages is managed dynamically, the con...
Page 68 - Cycle Time; Global Time
User’s Manual BOSCH - 68/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm (the “Micro Tick”) is incremented eight times each NTU, or, when TUR becomes < 8 by driftcompensation or by configuration for TTCAN Level 1, it is incremented four times each NTU. Figure 19 describes the synchronisation of ...
Page 69 - TTCAN Interrupt and Error Handling; previous; Reference Message; actual; Time Unit Ratio
User’s Manual BOSCH - 69/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm Figure 20: TTCAN Level 2 Drift Compensation Figure 20 describes how in TTCAN Level 2 each time receiving node compensates the driftbetween its own local clock and the Time Master’s clock by comparing the length of a BasicCycle...
Page 70 - Configuration Example; time masters, the third node S0 is operating as a time slave.
User’s Manual BOSCH - 70/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The TT Interrupt Vector consists of four segments, each four bits long. Each of the bits of theTT Interrupt Vector can be separately enabled by a corresponding bit in the TT InterruptEnable register. Once a bit of the TT Inter...
Page 71 - Line; Ad
User’s Manual BOSCH - 71/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm The general configuration of the three nodes is identical, there are differences in the OperationMode, the TT Matrix Limits, the Message RAM, and the Trigger Memory. Note that the CPUhas to wait after each write access to the ...
Page 75 - Data Bus
User’s Manual BOSCH - 75/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 6. CPU Interface The interface of the TTCAN module consist of two parts (see figure 21). The Generic Interfacewhich is a fixed part of the TTCAN module and the Customer Interface which can be adaptedto the customers requiremen...
Page 76 - Timing of the WAIT output signal; Requested Data loaded
User’s Manual BOSCH - 76/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 6.2 Timing of the WAIT output signal If the Customer Interfaces is implemented with a wait-function, the CPU is halted while amessage transfer is in progress between the IFx Registers and the Message RAM, when themodule’s opti...
Page 77 - EOF
User’s Manual BOSCH - 77/77 - Revision 1.6 TTCAN 11.11.02 manual_about.fm 7. Appendix 7.1 List of Figures Figure 1: Block Diagram of the TTCAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 2: CAN_Core in Silent Mode . . . . . . . . . . . . . . . . . . . . ....