0% found this document useful (0 votes)
2K views532 pages

Micro Auto Box Features

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views532 pages

Micro Auto Box Features

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 532

MicroAutoBox

Features
For all variants of MicroAutoBox

Release 2018-A – May 2018


How to Contact dSPACE
Mail: dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
Tel.: +49 5251 1638-0
Fax: +49 5251 16198-0
E-mail: [email protected]
Web: http://www.dspace.com

How to Contact dSPACE Support


If you encounter a problem when using dSPACE products, contact your local dSPACE
representative:
§ Local dSPACE companies and distributors: http://www.dspace.com/go/locations
§ For countries not listed, contact dSPACE GmbH in Paderborn, Germany.
Tel.: +49 5251 1638-941 or mailto: [email protected].

You can also use the support request form:


http://www.dspace.com/go/supportrequest. If you are logged on to mydSPACE, you
are automatically identified and do not need to add your contact details manually.

If possible, always provide the relevant dSPACE License ID or the serial number of the
CmContainer in your support request.

Software Updates and Patches


dSPACE strongly recommends that you download and install the most recent patches
for your current dSPACE installation. Visit http://www.dspace.com/go/support for
software updates and patches.

Important Notice
This document contains proprietary information that is protected by copyright. All
rights are reserved. The document may be printed for personal or internal use provided
all the proprietary markings are retained on all printed copies. In all other cases, the
document must not be copied, photocopied, reproduced, translated, or reduced to any
electronic medium or machine-readable form, in whole or in part, without the prior
written consent of dSPACE GmbH.

© 2000 - 2018 by:


dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany

This publication and the contents hereof are subject to change without notice.

ConfigurationDesk, ControlDesk, MicroAutoBox, MicroLabBox, SCALEXIO, SYNECT,


SystemDesk, TargetLink and VEOS are registered trademarks of dSPACE GmbH in the
United States or other countries, or both. Other brand names or product names are
trademarks or registered trademarks of their respective companies or organizations.
Contents

Contents

About This Reference 13


Conventions Used in dSPACE User Documentation................................ ............ 14
Accessing dSPACE Help and PDF Files................................................................. 15
Related Documents............................................................................................ 16

Introduction to the Features of MicroAutoBox 19


System Overview......................................................................................................... 20
Hardware Concept............................................................................................. 20
Overview of Board Revisions.................................................................. ............ 23
MicroAutoBox II 1401/1501............................................................................... 27
MicroAutoBox II 1401/1504............................................................................... 28
MicroAutoBox II 1401/1505/1507...................................................................... 29
MicroAutoBox II 1401/1507............................................................................... 30
MicroAutoBox II 1401/1511............................................................................... 31
MicroAutoBox II 1401/1511/1512...................................................................... 32
MicroAutoBox II 1401/1511/1514...................................................................... 33
MicroAutoBox II 1401/1512/1513...................................................................... 34
MicroAutoBox II 1401/1513............................................................................... 35
MicroAutoBox II 1401/1513/1514...................................................................... 36
MicroAutoBox with DS1552 Multi-I/O Module................................................... 37
MicroAutoBox with DS1554 Engine Control I/O Module..................................... 38
MicroAutoBox Embedded PC............................................................................. 39
Feature Support................................................................................................. 40

Base Board's Basics..................................................................................................... 42


MicroAutoBox II Base Board............................................................................... 42

Data Transfer Mechanism............................................................................................ 44


Using Communication Buffers............................................................................ 44
Fast Data Transfer.............................................................................................. 44

MicroAutoBox Application Start.................................................................................. 46


Boot Firmware................................................................................................... 46
Running an Application from the Global Memory.................................. ............ 48
Running an Application from the Flash Memory................................................. 49

3
May 2018 MicroAutoBox Features
Contents

MicroAutoBox Basic Features 51


Interrupt Handling.......................................................................................... ............ 53
Basics on Interrupt Handling.................................................................. ............ 53

Word-Based Subinterrupt Handling............................................................................. 58


Basics on Word-Based Subinterrupt Handling..................................................... 58
Basics on the Alive Mechanism........................................................................... 59
Basics on Subinterrupt Handling......................................................................... 62

Timer Services............................................................................................................. 65
Timer................................................................................................................. 65
Decrementer...................................................................................................... 66
Time Base Counter................................................................................ ............ 66

Safety Functions.......................................................................................................... 68
Basics on Implementing Safety Functions............................................... ............ 68
Basics on Watchdog Handling............................................................................ 69
Basics on Challenge-Response Monitoring............................................. ............ 71
Basics on Memory Integrity and Extras................................................... ............ 76

Nonvolatile Data Handling.............................................................................. ............ 80


Basics on RTC RAM Access................................................................................. 80
Basics on Nonvolatile RAM Access...................................................................... 81
Basics on Flash Memory Access.......................................................................... 82

Flight Recorder............................................................................................................ 84

Flight Recorder (Flash Memory)............................................................................... 84


Basics on Flight Recorder.................................................................................... 85
Using the Flight Recorder................................................................................... 86
MAT File Format for the Flight Recorder............................................................. 87

USB Flight Recorder................................................................................................ 88


Basics on USB Flight Recorder................................................................ ............ 89
Handling the Data of the USB Flight Recorder.................................................... 93

Power Hold Control.................................................................................................... 95


Basics of Power Hold Control............................................................................. 95

Onboard Sensors............................................................................................ ............ 98


Sensor for Acceleration Measurement................................................................ 98
Sensor for Pressure Measurement.......................................................... .......... 101

4
MicroAutoBox Features May 2018
Contents

MicroAutoBox I/O Features 103


I/O Features and Boot Modes.................................................................................... 105
Basics on the Boot Modes................................................................................ 105
Chassis Control Boot Mode Features................................................................ 106
Drive Control Boot Mode Features................................................................... 107
Extended Engine Control Boot Mode Features.................................................. 108

Information on the I/O Module Availability................................................................ 110


Overview of the Number of Available I/O Modules........................................... 110

A/D Conversion......................................................................................................... 112


Overview of the A/D Conversion Units................................................... .......... 112
ADC Unit Type 1.............................................................................................. 114
ADC Unit Type 3.............................................................................................. 115
ADC Unit Type 4.............................................................................................. 117
AIO Unit Type 1 (ADC)..................................................................................... 128
DIO Type 1 ADC Unit....................................................................................... 130
ADC 1552 Type 1 Unit..................................................................................... 133
ADC 1552 Type 2 Unit..................................................................................... 140

Bit I/O....................................................................................................................... 143


Overview of the Bit I/O Units............................................................................ 143
Bit I/O Unit (DIO Type 1)................................................................................... 144
Bit I/O Unit (DIO Type 3)................................................................................... 147
Bit I/O Unit (DIO Type 4)................................................................................... 152
Bit I/O Unit (DIO 1552 Type 1).......................................................................... 156

D/A Conversion......................................................................................................... 160


Overview of the D/A Conversion Units................................................... .......... 160
AIO Unit Type 1 (DAC)..................................................................................... 161
DAC Unit Type 1.............................................................................................. 162
DAC Unit Type 3.............................................................................................. 163
DAC 1552 Type 1 Unit..................................................................................... 165

Ethernet I/O Interface................................................................................................ 167


Basics on the Ethernet I/O Interface.................................................................. 167

ECU Interface............................................................................................................ 169


General Description............................................................................... .......... 169
Hardware......................................................................................................... 170
Working Modes............................................................................................... 172
DPMEM Addresses Seen from the ECU............................................................. 173
Data Type Formats................................................................................. .......... 175
ECU Interrupts................................................................................................. 176

5
May 2018 MicroAutoBox Features
Contents

ECU Software Porting Kit.......................................................................................... 178


Working with the ECU Software Porting Kit..................................................... 178

PWM Signal Generation with a Variable Period............................................... .......... 180


Overview of the Signal Generation Functionalities............................................ 180
PWM Generation with a Variable Period (PWM_VP) on the CTM...................... 184
PWM Generation with a Variable Period (PWM_TPU_VP) on the TPU for
CC................................................................................................................... 186
PWM Generation (PWM) on the DIO Type 3 Unit.............................................. 188
PWM Generation (PWM) on the DIO Type 4 Unit.............................................. 193
PWM Generation (PWM) on the DIO 1552 Type 1 Unit..................................... 198
Square-Wave Signal Generation (FREQ) on the DIO Type 3 Unit........................ 201
Square-Wave Signal Generation (FREQ) on the DIO Type 4 Unit........................ 204
Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit............... 207

PWM Signal Generation with a Fixed Period.............................................................. 210


PWM Generation with a Fixed Period (PWM_FP) for EEC.................................. 210
PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC.......................... 213

Multi-Channel PWM Signal Generation (MC_PWM).................................................. 216


Basics on Multi-Channel PWM Signal Generation (DCEA)................................. 216
Basics on Multi-Channel PWM Signal Generation (DCCA)................................ 219
Basics on Multi-Channel PWM Signal Generation on the DIO Type 3................ 225
Basics on Multi-Channel PWM Signal Generation on the DIO Type 4................ 237

PWM Signal Measurement (PWM2D)........................................................................ 250


Overview of the Signal Measurement Functionalities........................................ 250
PWM Measurement (PWM2D) on the TPU for CC............................................ 253
PWM Measurement (PWM2D) on the DIO Type 3 Unit..................................... 255
PWM Measurement (PWM2D) on the DIO Type 4 Unit..................................... 259
PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit............................ 263

Pulse Pattern Measurement....................................................................................... 266


Pulse Pattern Measurement (PPM, FPW2D) on the CTM................................... 266
Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC............... .......... 269
Frequency Measurement (F2D) on the DIO Type 3 Unit..................................... 271
Frequency Measurement (F2D) on the DIO Type 4 Unit..................................... 275
Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit............................ 278

Pulse Width Measurement (PW2D)............................................................................ 282


Pulse Width Measurement (PW2D) on the DIO Type 3 Unit............................... 282
Pulse Width Measurement (PW2D) on the DIO Type 4 Unit............................... 286

Incremental Encoder Interface................................................................................... 290


Overview of the Incremental Encoder Interfaces............................................... 290
Basics on the Incremental Encoder Interface..................................................... 291

6
MicroAutoBox Features May 2018
Contents

Incremental Encoder Interface for DCCA.......................................................... 293


Incremental Encoder Interface for DCEA................................................ .......... 294
Incremental Encoder Interface on the DIO Type 3 Unit...................................... 296
Incremental Encoder Interface on the DIO Type 4 Unit...................................... 301

Stepper Motor Control for EEC................................................................................. 306


Stepper Motor Control for EEC........................................................................ 306

Extended Engine Control (EEC) 309


Basics on Extended Engine Control................................................................. .......... 311
Extended Engine Control Modes...................................................................... 311
Basic Functions of Extended Engine Control..................................................... 312
Extended Period Measurement (PMMX) for EEC............................................... 313
Position-Synchronized Pulse Generation (PSP) for EEC...................................... 314
Relationship between PMMX and PSP.............................................................. 317

How Extended Period Measurement for Engine Control Works....................... .......... 320
Specifying the Crankshaft Wheel........................................................... .......... 320
Detecting Crankshaft Wheel Gaps......................................................... .......... 322
Detecting Camshaft Signals................................................................... .......... 324
Crankshaft and Camshaft Synchronization....................................................... 324
Example for a 60 - 2 Wheel with One Camshaft Pulse...................................... 326
Example for a 60 - 2 Wheel with Two Camshaft Pulses..................................... 328
Example for a 60 - 2 x 2 Wheel with Four Camshaft Pulses.................... .......... 329
Performing Engine Speed Measurement........................................................... 332
Angle-Based Interrupts..................................................................................... 335
Error Handling for Extended Period Measurement............................................ 337

How Position-Synchronized Pulse Generation for Engine Control Works.................... 338


Time-Angle Operation With PSP....................................................................... 339
Angle-Time Mode With PSP............................................................................. 341

CAN Support 343


Setting Up a CAN Controller..................................................................................... 345
Initializing the CAN Controller.......................................................................... 346
CAN Transceiver Types........................................................................... .......... 347
MicroAutoBox: Selecting the CAN Controller Frequency................................... 351
Defining CAN Messages................................................................................... 352
Implementing a CAN Interrupt......................................................................... 353
Using RX Service Support................................................................................. 354
Removing a CAN Controller (Go Bus Off)......................................................... 356

7
May 2018 MicroAutoBox Features
Contents

Getting CAN Status Information............................................................ .......... 356


CAN Partial Networking................................................................................... 358

Using the RTI CAN MultiMessage Blockset................................................................ 360


Basics on the RTI CAN MultiMessage Blockset.................................................. 360
Basics on Working with CAN FD............................................................ .......... 365
Basics on Working with a J1939-Compliant DBC File........................................ 370
Transmitting and Receiving CAN Messages....................................................... 376
Manipulating Signals to be Transmitted............................................................ 379

CAN Signal Mapping...................................................................................... .......... 382


CAN Signal Mapping....................................................................................... 382

LIN Support 387


LIN Basics.................................................................................................................. 390
LIN Basics......................................................................................................... 390
Master/Slave Concept...................................................................................... 391
Example of a LIN Bus........................................................................................ 392

Fields of Application.................................................................................................. 393


Remaining Bus Simulation................................................................................ 393
Testing Communication Timing Constraints........................................... .......... 394
Testing Against Specification Limits.................................................................. 394
Detecting the Baud Rate of a LIN Bus............................................................... 395
Testing Diagnostic and Failure Conditions......................................................... 396
Testing Energy-Saving Modes........................................................................... 397

LIN Bus Handling....................................................................................................... 399

Setting Up a LIN Bus............................................................................................. 399


Basics on LIN Bus Handling............................................................................... 400
Specifying the LIN Bus Parameters.................................................................... 401
Database Files.................................................................................................. 401
Defining LIN Nodes.......................................................................................... 402

Handling Frames........................................................................................ .......... 403


Transmitting and Receiving Frames................................................................... 403
Manipulating Frames............................................................................. .......... 404

Controlling a LIN Bus............................................................................................ 404


Switching LIN Nodes........................................................................................ 405
Setting a LIN Bus to Sleep Mode............................................................ .......... 405
Waking Up a LIN Bus....................................................................................... 405
Changing LIN Bus Parameters................................................................ .......... 406
Reading Status Information.............................................................................. 406

8
MicroAutoBox Features May 2018
Contents

Handling Schedules.............................................................................................. 407


Setting Up a LIN Schedule................................................................................ 407
Setting the Priority of LIN Schedules................................................................. 408

Using Interrupts.................................................................................................... 408


Defining Interrupts........................................................................................... 408

Using the RTI LIN MultiMessage Blockset................................................................... 410


Basics on the RTI LIN MultiMessage Blockset.................................................... 410
Transmitting and Receiving LIN Frames............................................................. 412
How to Define a Checksum Algorithm............................................................. 415
Manipulating Signals to be Transmitted............................................................ 416

FlexRay Support 417


Basics on FlexRay Support................................................................................ 418

IP Module Support 421


Basics on IP Module Support............................................................................ 421

FPGA Support 425


General Information on the FPGA Support....................................................... 426
Accessing the FPGA Type 1 Unit....................................................................... 427

Serial Interface 431


Basics on Serial Interface.................................................................................. 431
Specifying the Baud Rate of the Serial Interface................................................ 434

Single Edge Nibble Transmission (SENT) Support 435


Basics of the SENT Protocol.............................................................................. 436
Basics on SENT Diagnostic Information............................................................. 439
Using the SENT Protocol on MicroAutoBox....................................................... 440
Implementing SENT Receivers in Simulink......................................................... 444
Implementing SENT Receivers Using RTLib Functions........................................ 447

Serial Peripheral Interface 453


Serial Peripheral Interface on the DIO Type 1 Unit............................................. 453
Serial Peripheral Interface on the DIO Type 3 Unit............................................. 456
Serial Peripheral Interface on the DIO Type 4 Unit............................................. 464

9
May 2018 MicroAutoBox Features
Contents

RapidPro Diagnostic 473


RapidPro Diagnostic with the MicroAutoBox.................................................... 474

Limitations 477
Limited Number of CAN Messages................................................................... 477
Limitations with RTICANMM............................................................................ 479
Limitations with CAN FD.................................................................................. 481
Limitations with J1939-Support........................................................................ 482
Limitations of RTI LIN MultiMessage Blockset......................................... .......... 482

I/O Mappings 489


I/O Mapping of Boot Mode-Independent Features..................................................... 490
I/O Mapping for MicroAutoBox II 1401/1505/1507................................ .......... 490
I/O Mapping for MicroAutoBox II 1401/1507......................................... .......... 492
I/O Mapping for MicroAutoBox II 1401/1511......................................... .......... 493
I/O Mapping for MicroAutoBox II 1401/1513......................................... .......... 497
I/O Mapping for MicroAutoBox with DS1552 Multi-I/O Module........................ 500
I/O Mapping for MicroAutoBox with DS1554 Engine Control
I/O Module...................................................................................................... 503

I/O Mapping of Boot Mode-Dependent Features....................................................... 505

I/O Mapping for Extended Engine Control (EEC)......................................... .......... 505


I/O Mapping for EEC in Passive Sensor Mode......................................... .......... 506
I/O Mapping for EEC in Active Sensor Mode..................................................... 508
I/O Mapping of the Bit I/O Unit for EEC............................................................ 510

I/O Mapping for Chassis Control (CC)................................................................... 511


I/O Mapping of the Bit I/O Unit for Chassis Control.......................................... 512
I/O Mapping of Timing I/O and A/D Conversion for Chassis Control....... .......... 513

I/O Mapping for Drives Control Edge Aligned............................................. .......... 515


I/O Mapping of the Bit I/O Unit for DCEA......................................................... 515
I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D
Conversion for Drives Control Edge Aligned..................................................... 517

I/O Mapping for Drives Control Center Aligned..................................................... 518


I/O Mapping of the Bit I/O Unit for DCCA.............................................. .......... 519
I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D
Conversion for Drives Control Center Aligned.................................................. 520

10
MicroAutoBox Features May 2018
Contents

Appendix 523
Troubleshooting............................................................................................... 523
Glossary........................................................................................................... 524

Index 527

11
May 2018 MicroAutoBox Features
Contents

12
MicroAutoBox Features May 2018
About This Reference

About This Reference

Contents This document provides feature-oriented access to the reference information you
need to implement your control models on one of the MicroAutoBox variants:

MicroAutoBox II
§ 1401/1501
§ 1401/1504
§ 1401/1505/1507
§ 1401/1507
§ 1401/1511
§ 1401/1511/1512, optionally with DS1552 Multi-I/O Module
§ 1401/1511/1514, optionally with DS1552 Multi‑I/O Module or DS1554 Engine
Control I/O Module
§ 1401/1512/1513, optionally with DS1552 Multi‑I/O Module
§ 1401/1513
§ 1401/1513/1514, optionally with DS1552 Multi‑I/O Module or DS1554 Engine
Control I/O Module
§ MicroAutoBox II with MicroAutoBox Embedded PC

Where to go from here Information in this section

Conventions Used in dSPACE User Documentation ................................ 14

Accessing dSPACE Help and PDF Files .................................................... 15

Related Documents ............................................................................... 16

13
May 2018 MicroAutoBox Features
About This Reference

Conventions Used in dSPACE User Documentation

Symbols dSPACE user documentation uses the following symbols:

Symbol Description
Indicates a hazardous situation that, if not avoided,
V DANGER will result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V WARNING could result in death or serious injury.
Indicates a hazardous situation that, if not avoided,
V CAUTION could result in minor or moderate injury.
Indicates a hazard that, if not avoided, could result in
NOTICE
property damage.
Indicates important information that you should take
Note
into account to avoid malfunctions.
Indicates tips that can make your work easier.
Tip
Indicates a link that refers to a definition in the
glossary, which you can find at the end of the
document unless stated otherwise.
Precedes the document title in a link that refers to
another document.

Naming conventions dSPACE user documentation uses the following naming conventions:

%name% Names enclosed in percent signs refer to environment variables for


file and path names.

<> Angle brackets contain wildcard characters or placeholders for variable


file and path names, etc.

Special folders Some software products use the following special folders:

Common Program Data folder A standard folder for application-specific


configuration data that is used by all users.
%PROGRAMDATA%\dSPACE\<InstallationGUID>\<ProductName>
or
%PROGRAMDATA%\dSPACE\<ProductName>\<VersionNumber>

Documents folder A standard folder for user-specific documents.


%USERPROFILE%\My Documents\dSPACE\<ProductName>\
<VersionNumber>

Local Program Data folder A standard folder for application-specific


configuration data that is used by the current, non-roaming user.

14
MicroAutoBox Features May 2018
Accessing dSPACE Help and PDF Files

%USERPROFILE%\AppData\Local\dSPACE\<InstallationGUID>\
<ProductName>

Accessing dSPACE Help and PDF Files

Introduction After you install and decrypt your dSPACE software, the documentation for the
installed products is available as online help in dSPACE Help and as Adobe® PDF
files.

Online help There are various ways to open dSPACE Help.

Note

Not all the ways to open dSPACE Help are available for all dSPACE software
products.

Opening from Windows You can open dSPACE Help on its home page:
§ Via Windows Start Menu

Opening from dSPACE software with menu bar You can open dSPACE
Help on a product's start page:
§ Via the menu bar in a dSPACE product

Opening from dSPACE software with ribbons If you use dSPACE software
with ribbons, you can open dSPACE Help:
§ Via the Start page in dSPACE software
§ Via the Backstage view in dSPACE software (leftmost ribbon tab)
§ Via the button

Opening context-sensitive help dSPACE Help provides context-sensitive


help. You can open help on the currently active context in dSPACE software:
§ Via F1
§ Via the Help button

15
May 2018 MicroAutoBox Features
About This Reference

PDF files You can open the PDF files as follows:

Opening from a topic in dSPACE Help You can access the PDF file with the
current topic via the button at the topic's top right. The following illustration
shows an example:

The PDF document opens on its first page.

Opening from dSPACE software with ribbons If your dSPACE software


has a user interface with ribbons, you can open a folder that contains the user
documentation in PDF format via the button in the Backstage view (leftmost
ribbon tab).

Related Documents

Related documents Below is a list of documents that you are also recommended to read when
working with MicroAutoBox.

Information in other documents

Getting started with MicroAutoBox


First Work Steps with a dSPACE System
Provides information on configuring dSPACE systems after you installed
the dSPACE hardware. It shows you how to get started with your
dSPACE system after installation. This document is aimed at users who
have no experience with dSPACE systems.

Modeling with RTI and RTI-MP


MicroAutoBox RTI Reference
Provides concise information on the board’s RTI library.

RTI and RTI-MP Implementation Guide


Gives detailed information and instructions on using Real-Time Interface
(RTI and RTI‑MP) to implement your real-time models.

16
MicroAutoBox Features May 2018
Related Documents

RTI and RTI-MP Implementation Reference


Provides reference information on the various dialogs, files, options, etc.
of Real‑Time Interface (RTI and RTI-MP) for dSPACE systems. It also
describes the blocks introduced by RTI-MP.

Handcoding with RTLib


MicroAutoBox RTLib Reference
Provides detailed descriptions of the C functions needed to program RTI-
specific Simulink S‑functions or implement your real-time models
manually via C programs (handcoding).

Information on installing and configuring MicroAutoBox


MicroAutoBox II Hardware Installation and Configuration

Information on installing dSPACE software and managing it via


the Installation Manager
Managing dSPACE Software Installations
Shows you how to manage all the dSPACE installations on your host PC
with dSPACE Installation Manager. Managing means, for example,
activating or deactivating installations, decrypting the encrypted archives
of the installed software and connecting dSPACE software installations to
MATLAB software.

Updating the firmware


Firmware Manager Manual
Introduces you to the features provided by the Firmware Manager. It
provides detailed information on the user interface, its command line
options and instructions using the firmware management.

Using MicroAutoBox with RapidPro


RapidPro System – I/O Subsystem MPC565 Implementation
Features
Provides the feature information you need to implement your real-time
models on your dSPACE hardware.

Experimenting with ControlDesk


ControlDesk Introduction and Overview
Introduces ControlDesk.

17
May 2018 MicroAutoBox Features
About This Reference

18
MicroAutoBox Features May 2018
Introduction to the Features of MicroAutoBox

Introduction to the Features of MicroAutoBox

MicroAutoBox's field of MicroAutoBox combines the advantages of a rapid control prototyping (RCP)
application system with those of an automotive electronic control unit (ECU). Therefore, it is
ideally suited as hardware for prototyping in a vehicle.

MicroAutoBox operates without user intervention, just like an ECU, and can be
installed virtually anywhere in the vehicle. At the same time MicroAutoBox
provides all the benefits of a dSPACE real-time system. A PC or notebook can be
attached temporarily for program download, data analysis and calibration.

Where to go from here Information in this section

System Overview ................................................................................... 20

Base Board's Basics ................................................................................ 42

Data Transfer Mechanism ...................................................................... 44

MicroAutoBox Application Start ............................................................. 46


A real‑time application can be run from the program memory and from
the flash memory.

19
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

System Overview
Introduction dSPACE provides the MicroAutoBox in different variants. This section gives you
an overview on the MicroAutoBox's hardware concept and the differences of the
MicroAutoBox variants.

Where to go from here Information in this section

Hardware Concept ................................................................................ 20

Overview of Board Revisions .................................................................. 23

MicroAutoBox II 1401/1501 ................................................................... 27

MicroAutoBox II 1401/1504 ................................................................... 28

MicroAutoBox II 1401/1505/1507 .......................................................... 29

MicroAutoBox II 1401/1507 ................................................................... 30

MicroAutoBox II 1401/1511 ................................................................... 31

MicroAutoBox II 1401/1511/1512 .......................................................... 32

MicroAutoBox II 1401/1511/1514 .......................................................... 33

MicroAutoBox II 1401/1512/1513 .......................................................... 34

MicroAutoBox II 1401/1513 ................................................................... 35

MicroAutoBox II 1401/1513/1514 .......................................................... 36

MicroAutoBox with DS1552 Multi-I/O Module ....................................... 37

MicroAutoBox with DS1554 Engine Control I/O Module ........................ 38

MicroAutoBox Embedded PC ................................................................. 39

Feature Support ..................................................................................... 40

Hardware Concept

Hardware components A MicroAutoBox system consists of two or three boards in a milled aluminum
box:
§ One DS1401 base board
§ One or two I/O boards (DS15xx)

20
MicroAutoBox Features May 2018
System Overview

Optionally, the MicroAutoBox Embedded PC is integrated in a MicroAutoBox


system.

The DS1401 base board and the I/O boards are connected via an internal bus
(intermodule bus).

For details on MicroAutoBox's hardware package, refer to Hardware


( MicroAutoBox II Hardware Installation and Configuration).

DS1401 base board The DS1401 base board provides the basic units of MicroAutoBox, for example,
the PowerPC processor, the memory and the onboard power supply unit.
Because the PowerPC is executing the real-time application, it is called the
Master PPC.

I/O boards The I/O boards that can be combined with the DS1401 base board particularly
determine the I/O functionality of the whole MicroAutoBox system.

MicroAutoBox variant A MicroAutoBox system consists of one or two I/O


boards depending on the MicroAutoBox variant you have purchased. For
example, MicroAutoBox II 1401/1511/1512 consists of the DS1401 base board
and the DS1511 and DS1512 I/O Boards. The following variants exist:
§ MicroAutoBox II 1401/1501
§ MicroAutoBox II 1401/1504
§ MicroAutoBox II 1401/1505/1507
§ MicroAutoBox II 1401/1507
§ MicroAutoBox II 1401/1511
§ MicroAutoBox II 1401/1511/1512
§ MicroAutoBox II 1401/1511/1514
§ MicroAutoBox II 1401/1512/1513
§ MicroAutoBox II 1401/1513
§ MicroAutoBox II 1401/1513/1514
§ MicroAutoBox with DS1552 Multi-I/O Module
§ MicroAutoBox with DS1554 Engine Control I/O Module
§ MicroAutoBox II with MicroAutoBox Embedded PC
For an overview of the variant-specific features, refer to Feature Support
on page 40.

For information on the I/O boards revisions and the required boot firmware
versions, refer to Overview of Board Revisions on page 23.

I/O board subcomponents Depending on the I/O board type, the I/O board has specific functional
subcomponents:

Digital I/O subsystem (Slave DIO MC) The MicroAutoBox variants


1401/1501, 1401/1504, and 1401/1505/1507 also include a digital I/O
subsystem based on the Motorola 68336 microcontroller. It is briefly named as
Slave DIO MC. Among other I/O capabilities, the microcontroller provides timing

21
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

management functions, which makes especially this subsystem useful for engine
and chassis control. The Slave DIO MC has been supplemented with a 64‑kWord
external memory and a 4‑kWord dual-port memory (DPMEM) for communication
with the Master PPC (a Word is 16-bit wide). The PowerPC of the DS1401 is the
master, whereas the Slave DIO MC is the slave.

CAN subsystem (Slave CAN MC) A further subsystem of the I/O board
providing CAN microcontrollers with two different clock rates, is used for
connection to up to two CAN buses. It is briefly named as Slave CAN MC. The
PPC of the DS1401 is the master, whereas the CAN microcontrollers are slaves.

FlexRay IP modules FlexRay IP modules are used for connection to a FlexRay


bus. No microcontroller is used.

Available I/O modules On the DS1512 and the DS1514 I/O boards you can mount an I/O module, that
is a piggyback board, to enlarge the I/O capability of your MicroAutoBox. An I/O
module provides signal conditioning for the mapped I/O pins.

DS1552 Multi-I/O Module With the DS1552 Multi‑I/O Module you can
extend your MicroAutoBox with the following features by using the RTI DS1552
I/O Extension Blockset or the FPGA1401Tp1 with DS1552 Multi-I/O Module
framework from the RTI FPGA Programming Blockset.
The following features are provided by the RTI DS1552 I/O Extension Blockset:
§ Analog input channels
§ ADC 1552 Type 1 Unit on page 133
§ ADC 1552 Type 2 Unit on page 140
§ Analog output channels
§ DAC 1552 Type 1 Unit on page 165
§ Digital input channels for signal measurement
§ Bit I/O Unit (DIO 1552 Type 1) on page 156
§ PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit on page 263
§ Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit on page 278
§ Digital output channels for signal generation
§ Bit I/O Unit (DIO 1552 Type 1) on page 156
§ PWM Generation (PWM) on the DIO 1552 Type 1 Unit on page 198
§ Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit
on page 207
§ When using the RTI FPGA Programming Blockset, you can additionally use:
§ Bidirectional digital channels
§ Sensor supply channel
§ Serial interface (RS232 and RS422/485)
For further information, refer to Hardware Supported by the RTI FPGA
Programming Blockset ( RTI FPGA Programming Blockset Guide).

22
MicroAutoBox Features May 2018
System Overview

DS1554 Engine Control I/O Module With the DS1554 Engine Control I/O
Module you can extend your MicroAutoBox with the following features only by
using the FPGA1401Tp1 with DS1554 Engine Control Module framework from
the RTI FPGA Programming Blockset:
§ Analog input channels
§ Digital output channels
§ Digital bidirectional channels
§ Additional channels for specific engine control features, such as:
§ Crankshaft measurement
§ Camshaft measurement
§ Support of knock sensors
For further information, refer to Hardware Supported by the RTI FPGA
Programming Blockset ( RTI FPGA Programming Blockset Guide).

MicroAutoBox Embedded PC MicroAutoBox can be enhanced with the MicroAutoBox Embedded PC. The
MicroAutoBox Embedded PC is powered via the MicroAutoBox power input
connector. With the common power input, you can control the power-on and
power-off behavior of the entire system. With a connected keyboard and
monitor, you can use the MicroAutoBox Embedded PC as host PC.

The MicroAutoBox Embedded PC provides standard connectors for several use


cases, for example:
§ DVI-I connector for graphical devices
§ Ethernet interface 100/1000 Mbit/s (two RJ45 connectors, one LEMO
connector)
§ USB connectors

For further information, refer to Using MicroAutoBox Embedded PC


( MicroAutoBox II Hardware Installation and Configuration) and Data Sheet
MicroAutoBox Embedded PC with 3rd Gen. Intel® CoreTM i7-3517UE Processor
( MicroAutoBox II Hardware Installation and Configuration)

Related topics Basics

Feature Support ...................................................................................................................... 40

Overview of Board Revisions

Introduction MicroAutoBox was first released in October 1999. The major updates of the
DS1401 Base Board and the I/O boards are listed below.

23
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

DS1401 base board revisions Tip

The board revision is printed on a type plate on the bottom of your


MicroAutoBox. You can also read the board revision on the DS1401
Properties page in your experimentation software.

These are the most important DS1401 Base Board revisions of MicroAutoBox II:

Date Revision Modifications Boot Firmware Version dSPACE Release1)


Q2/2010 22 First released version of § 2.7 Using the new
MicroAutoBox II: For MicroAutoBox II variants components
§ Processor: PPC750GL 1401/1501, 1401/1504, requires at least
§ CPU clock: 900 MHz 1401/1507, 1401/1505/1507 Release 6.6.
§ Memory: 16 MB § 3.0
§ Ethernet host interface For MicroAutoBox II variants
§ Ethernet I/O interface 1401/1511, 1401/1511/1512
§ Watchdog handling § 3.3 7.4
(System PLD version 1.4)
§ Challenge‑response monitoring § 3.3 2016‑B
(System PLD version 1.5)
§ Memory Integrity and Extras § 3.3 2017‑A
(System PLD version 1.6)
Q4/2011 23 § Ethernet host interface and § 3.2 7.2
Ethernet I/O interface with GBit
support
§ Onboard pressure sensor § 3.2 7.3
(System PLD version 1.3)
§ Onboard acceleration sensor § 3.3 7.4
(System PLD version 1.4)
Q2/2012 25 Internal Ethernet switch 3.3 7.4
(System PLD version 1.4)
1) The hardware is delivered independently of a dSPACE Release. This column shows the first dSPACE Release that provides the
required boot firmware version.

Note

The table lists the minimum boot firmware version required by the
respective board revision to support the new feature. Higher boot firmware
versions can be used without problems. With lower boot firmware versions,
MicroAutoBox does not work.

A real-time application for MicroAutoBox can be executed on newer revisions, if


the specified I/O is available and the boot firmware version is at least the
firmware version listed above. You can possibly not use the entire memory, see
the table above.

24
MicroAutoBox Features May 2018
System Overview

I/O board revisions The following I/O board revisions are of interest:

Date Revision Features Boot Firmware dSPACE Release


Version
DS1501
Q2/2002 07 Multichannel PWM added not relevant 3.4
Q3/2003 09 LIN support added not relevant Using the LIN
support requires at
least Release 4.0.
DS1504
Q2/2003 03 LIN support added not relevant Using the LIN
support requires at
least Release 4.0.
DS1505
Q3/2003 01 Internal redesign to support MicroAutoBox with not relevant not relevant
two I/O boards.
DS1507
Q4/2005 01 § LIN support not relevant Using DS1507
§ FlexRay support requires at least
§ 2 ECU interfaces Release 4.0.
DS1511
Q4/2010 03 New I/O board providing: 3.0.1 7.0
§ ADC Type 4
§ DAC Type 3
§ DIO Type 3
§ Updated CAN Type 1
Q4/2011 03 New I/O features for DIO Type 3: not relevant 7.2
§ Multichannel PWM signal generation (DIO Type 3 PLD
§ SENT receiver version 1.3)
Q2/2012 03 New I/O feature for DIO Type 3: not relevant 7.3
§ SPI master (DIO Type 3 PLD
version 1.4)
Q4/2015 03 New I/O feature for DIO Type 3: not relevant 2015‑B
§ Pulse width measurement (PW2D) (DIO Type 3 PLD
version 1.5)
DS1512
Q4/2010 03 New I/O board providing: 3.0.1 7.0
§ Xilinx® Spartan 6 FPGA XC6SLX150
§ Updated FlexRay support
Q2/2011 03 § FPGA support 3.1.2 7.1
§ Support of DS1552 Multi-I/O Module
Q2/2012 03 Support of serial interface via FPGA module 3.1.2 7.3

25
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

Date Revision Features Boot Firmware dSPACE Release


Version
DS1513
Q3/2013 01 New I/O board providing: 3.3 2013‑B
§ ADC Type 4
§ AIO Type 1
§ DIO Type 4
§ Updated CAN Type 1
Q4/2015 01 New I/O feature for DIO Type 4: not relevant 2015‑B
§ Pulse width measurement (PW2D) (DIO Type 4 PLD
version 1.5)
DS1514
Q2/2015 01 New I/O board providing: 3.9 2015-A
§ Xilinx® Kintex®-7 FPGA XC7K325T
§ Support of DS1552 Multi-I/O Module
Q2/2016 01 Support of DS1554 Engine Control I/O Module 3.9 2016-A

26
MicroAutoBox Features May 2018
System Overview

MicroAutoBox II 1401/1501

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1501:

MicroAutoBox II 1401/1501
Ethernet interface

Master PPC I/O features

ECU interface
Decrementer, unit 1
time base
DAC unit

Timer ADC unit


Type 1

Interrupt
control EEC, F2D,
PW2D, PWM
Local
memory CC, PWM,
PPM/FPW2D
Flash
memory DCCA, PWM,
PPM
DPMEM

Slave DIO
Global
MC 68336
memory DCEA,PWM,

I/O connector
PPM

Bit I/O unit

ADC unit

ECU interface
I/O connector SPI unit
unit A
Digital I/O subsystem

ECU interface
I/O connector
unit B CAN
controller
Ethernet
I/O connector CAN
I/O interface
controller
DPMEM

Slave
I/O connector USB interface CAN MC
Serial
interface

LIN controller
LIN / K-Line
CAN subsystem

27
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox II 1401/1504

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1504:

MicroAutoBox II 1401/1504
Ethernet interface

Master PPC I/O features


ADC unit
Type 1
Decrementer,
time base
ADC unit
Type 3

Timer
EEC, F2D,
PW2D, PWM
Interrupt
control CC, PWM,
PPM/FPW2D
Local
memory DCCA, PWM,
PPM

DPMEM
Slave DIO
Flash
MC 68336
memory DCEA,PWM,
PPM
Global
memory
Bit I/O unit

I/O connector
ADC unit

SPI unit
Digital I/O subsystem

ECU interface
I/O connector CAN
unit A
controller
ECU interface
I/O connector CAN
unit B
controller
DPMEM

Slave
Ethernet CAN MC
I/O connector Serial
I/O interface
interface

I/O connector USB interface LIN controller


LIN / K-Line
CAN subsystem 1

CAN
controller
DPMEM

Slave
CAN MC
CAN
controller
CAN subsystem 2

28
MicroAutoBox Features May 2018
System Overview

MicroAutoBox II 1401/1505/1507

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1505/1507:

MicroAutoBox II 1401/1505/1507
Ethernet interface

Master PPC I/O features

ECU interface
Decrementer, unit 1
time base
DAC unit

Timer
ADC unit
Type 1
Interrupt
control
EEC, F2D,
Local

I/O connector
PW2D, PWM
memory
CC, PWM,
Flash PPM/FPW2D
memory
DCCA, PWM,
Global
PPM
memory

DPMEM
Slave DIO
DCEA,PWM,
MC 68336
ECU interface PPM
I/O connector
unit A
Bit I/O unit
ECU interface
I/O connector
unit B
ADC unit
Ethernet
I/O connector
I/O interface
SPI unit
Digital I/O subsystem
I/O connector USB interface

ECU interface
unit 2

I/O connector
CAN subsystem 1

CAN subsystem 2

DPMEM DPMEM
FlexRay IP module 1

FlexRay IP module 2

Slave CAN MC Slave CAN MC


CAN controller

CAN controller

CAN controller

CAN controller
Serial interface

Serial interface
LIN controller

LIN controller
LIN / K-Line

LIN / K-Line

D-Sub I/O connector

29
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox II 1401/1507

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1507:

MicroAutoBox II 1401/1507
Ethernet interface

Master PPC I/O features

Decrementer,
time base
ECU interface
I/O connector
unit 1
Timer

Interrupt
control

Local
memory

Flash
memory

Global
memory

ECU interface
I/O connector
unit A

ECU interface
I/O connector
unit B

Ethernet
I/O connector
I/O interface

I/O connector USB interface


CAN subsystem 1

CAN subsystem 2

DPMEM DPMEM
FlexRay IP module 1

FlexRay IP module 2

Slave CAN MC Slave CAN MC


CAN controller

CAN controller

CAN controller

CAN controller
Serial interface

Serial interface
LIN controller

LIN controller
LIN / K-Line

LIN / K-Line

D-Sub I/O connector

30
MicroAutoBox Features May 2018
System Overview

MicroAutoBox II 1401/1511

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1511.

MicroAutoBox II 1401/1511
Ethernet interface

Master PPC I/O features

DAC unit
Decrementer, Type 3
time base
ADC unit
Type 4

Timer Digital I/O unit Type 3


PWM
Interrupt
FREQ
control
PWM2D
Local
memory PW2D

F2D
Flash
memory Bit I/O In

I/O connector
Bit I/O Out
Global
memory

CAN subsystem 1
ECU interface LIN controller
I/O connector
unit A Slave CAN MC
LIN / K-Line
DPMEM

ECU interface Serial interface


I/O connector
unit B
CAN controller
Ethernet I/O
I/O connector
interface CAN controller

I/O connector USB interface CAN subsystem 2

LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface

CAN controller

CAN controller

31
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox II 1401/1511/1512

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1511/1512.

MicroAutoBox II 1401/1511/1512
Ethernet interface

Master PPC I/O features

DAC unit
Decrementer, Type 3
time base
ADC unit
Type 4

Timer
Digital I/O unit Type 3
PWM
Interrupt
control
FREQ

Local
memory PWM2D

Flash PW2D
memory
F2D
Global

DS1511 I/O connector


memory
Bit I/O In

ECU interface Bit I/O Out


I/O connector
unit A

ECU interface CAN subsystem 1


I/O connector
unit B
LIN controller
Slave CAN MC LIN / K-Line
Ethernet I/O
I/O connector
DPMEM

interface
Serial interface

I/O connector USB interface CAN controller

CAN controller

FPGA Type 1 CAN subsystem 2


FlexRay IP module 1

FlexRay IP module 2

(Xilinx Spartan 6)
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface
Piggyback
(e.g. DS1552) CAN controller

CAN controller

DS1512 I/O connector

32
MicroAutoBox Features May 2018
System Overview

MicroAutoBox II 1401/1511/1514

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1511/1514.

MicroAutoBox II 1401/1511/1514
Ethernet interface

Master PPC I/O features

DAC unit
Decrementer, Type 3
time base
ADC unit
Type 4

Timer
Digital I/O unit Type 3
PWM
Interrupt
control
FREQ

Local
PWM2D
memory

Flash PW2D
memory
F2D
Global

DS1511 I/O connector


memory Bit I/O In

Bit I/O Out


ECU interface
I/O connector
unit A

ECU interface CAN subsystem 1


I/O connector
unit B
LIN controller
Slave CAN MC LIN / K-Line
Ethernet I/O
I/O connector
DPMEM

interface
Serial interface

I/O connector USB interface CAN controller

CAN controller

FPGA Type 1 CAN subsystem 2


FlexRay IP module 1

FlexRay IP module 2

(Xilinx Kintex 7)
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface
Piggyback
(e.g. DS1552) CAN controller

CAN controller

DS1514 I/O connector

33
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox II 1401/1512/1513

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1512/1513.
MicroAutoBox II 1401/1512/1513

Ethernet interface

I/O features
AIO unit Type 1
ADC
Master PPC

DAC
Decrementer,
time base
ADC unit
Type 4

Timer
I/O unit Type 4
PWM
Interrupt
control FREQ

PWM2D
Local
memory PW2D
F2D
Flash
memory Bit I/O In

Bit I/O Out


Global
memory

DS1513 I/O connector


CAN subsystem 1
ECU interface
I/O connector LIN controller
unit A
LIN / K-Line

Slave CAN MC
ECU interface DPMEM
I/O connector Serial interface
unit B
CAN controller
Ethernet I/O
I/O connector
interface CAN controller

I/O connector USB interface


CAN subsystem 2

LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface

CAN controller

CAN controller

FPGA Type 1 CAN subsystem 3


FlexRay IP module 1

FlexRay IP module 2

(Xilinx Spartan 6)
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface
Piggyback
(e.g. DS1552) CAN controller

CAN controller

DS1512 I/O connector

34
MicroAutoBox Features May 2018
System Overview

MicroAutoBox II 1401/1513

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1513.
MicroAutoBox II 1401/1513

Ethernet interface

I/O features
AIO unit Type 1
ADC
Master PPC

DAC
Decrementer,
time base
ADC unit
Type 4

Timer Digital I/O unit


Type 4 PWM
Interrupt
FREQ
control
PWM2D
Local
memory PW2D

F2D
Flash
memory Bit I/O In

Global Bit I/O Out


memory

CAN subsystem 1

I/O connector
ECU interface
I/O connector LIN controller
unit A
LIN / K-Line

Slave CAN MC
ECU interface DPMEM
I/O connector Serial interface
unit B

CAN controller
Ethernet I/O
I/O connector
interface
CAN controller

I/O connector USB interface


CAN subsystem 2

LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface

CAN controller

CAN controller

CAN subsystem 3

LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface

CAN controller

CAN controller

35
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox II 1401/1513/1514

Functional units The following illustration shows the functional units of MicroAutoBox II
1401/1513/1514.
MicroAutoBox II 1401/1513/1514

Ethernet interface

I/O features
AIO unit Type 1
ADC
Master PPC

DAC
Decrementer,
time base
ADC unit
Type 4

Timer
I/O unit Type 4
PWM
Interrupt
control FREQ

PWM2D
Local
memory PW2D
F2D
Flash
memory Bit I/O In

Bit I/O Out


Global
memory

DS1513 I/O connector


CAN subsystem 1
ECU interface
I/O connector LIN controller
unit A
LIN / K-Line

Slave CAN MC
ECU interface DPMEM
I/O connector Serial interface
unit B
CAN controller
Ethernet I/O
I/O connector
interface CAN controller

I/O connector USB interface


CAN subsystem 2

LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface

CAN controller

CAN controller

FPGA Type 1 CAN subsystem 3


FlexRay IP module 1

FlexRay IP module 2

(Xilinx Kintex 7)
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM

Serial interface
Piggyback
(e.g. DS1552) CAN controller

CAN controller

DS1514 I/O connector

36
MicroAutoBox Features May 2018
System Overview

MicroAutoBox with DS1552 Multi-I/O Module

Functional units of a DS1552 The DS1512 and the DS1514 I/O boards of MicroAutoBox provide connectors to
Multi-I/O Module mount a DS1552 Multi-I/O Module on it. The piggyback board provides signal
conditioning for the mapped I/O pins of the DS1512's or DS1514's FPGA
module. The following illustration shows the functional units of a DS1552 Multi-
I/O Module.

MicroAutoBox II with DS1552


Ethernet interface

Master PPC DS1512/DS1514

Decrementer,
time base FlexRay IP module 1

FlexRay IP module 2
Timer
FPGA Type 1
Interrupt
control DS1552 Multi I/O Module ADC 1552
Type 1
Serial
Local
interface
memory ADC 1552
Type 2

DS1512/DS1514 I/O connector


Sensor
Flash
supply
memory DAC 1552
Type 1
Global
memory
DIO 1552 Type 1
PWM

ECU interface
I/O connector
unit A FREQ

ECU interface
I/O connector PWM2D
unit B

Ethernet F2D
I/O connector
I/O interface

Bit I/O In
I/O connector USB interface

Bit I/O Out

DS1511/DS1513
(For details, refer to MicroAutoBox II 1401/1511
or MicroAutoBox II 1401/1513)

DS1511/DS1513 I/O connector

The following MicroAutoBox variants can be used with the DS1552 Multi‑I/O
Module:
§ MicroAutoBox II 1401/1511/1512
§ MicroAutoBox II 1401/1512/1513
§ MicroAutoBox II 1401/1511/1514
§ MicroAutoBox II 1401/1513/1514

The DS1552B1 variant of the DS1552 Multi-I/O Module has the same features
except for the input voltage range of its ADC 1552 Type 1 channels. For details,

37
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

refer to Data Sheet DS1552 Multi-I/O Module ( MicroAutoBox II Hardware


Installation and Configuration).

MicroAutoBox with DS1554 Engine Control I/O Module

Functional units of a DS1554 The DS1514 I/O board of MicroAutoBox provides connectors to mount a DS1554
Engine Control I/O Module Engine Control I/O Module on it. The piggyback board provides signal
conditioning for the mapped I/O pins of the DS1514's FPGA module. The
following illustration shows the functional units of a DS1554 Engine Control I/O
Module.

MicroAutoBox II with DS1554


Ethernet interface

Master PPC DS1514

Decrementer,
time base FlexRay IP module 1

FlexRay IP module 2

DS1514 I/O connector


Timer
FPGA Type 1
Interrupt
control DS1554 Engine Control
I/O Module
DigOut
Local
memory
DigInOut
Flash
memory
AnalogIn
Global
memory

Knock
ECU interface
I/O connector

DS1554 I/O connector


unit A
Crank

ECU interface
I/O connector
unit B Cam

Ethernet I/O
I/O connector
interface

I/O connector USB interface

DS1511/DS1513
(For details, refer to MicroAutoBox II 1401/1511
or MicroAutoBox II 1401/1513)

DS1511/DS1513 I/O connector

The following MicroAutoBox variants can be used with the DS1554 Engine
Control I/O Module:
§ MicroAutoBox II 1401/1511/1514
§ MicroAutoBox II 1401/1513/1514

For details, refer to Data Sheet DS1554 Engine Control I/O Module
( MicroAutoBox II Hardware Installation and Configuration).

38
MicroAutoBox Features May 2018
System Overview

MicroAutoBox Embedded PC

Functional units Any MicroAutoBox variant can contain a MicroAutoBox Embedded PC.
MicroAutoBox Embedded PC does not enlarge the I/O features of MicroAutoBox,
but it allows a direct integration of many host applications, for example, for
video processing or electronic horizon.

The following illustration shows the functional units of a MicroAutoBox


Embedded PC.
MicroAutoBox II with Embedded PC

I/O connector
ECU A

ECU B Control I/O

USB
(Flight recorder)

Ethernet Ethernet host


Power supply
I/O interface interface

Power input

Ethernet
Gigabit Ethernet switch
Host PC

MicroAutoBox II with I/O board(s)

WLAN
Power supply
(optional)
Gigabit Ethernet switch
1 x LEMO PCI e

2 x RJ45

4 x USB CPU-Modul Storage drive


DVI-I COM Express (SSD)

MicroAutoBox Embedded PC

For technical details, refer to Data Sheet MicroAutoBox Embedded PC with 3rd
Gen. Intel® CoreTM i7-3517UE Processor ( MicroAutoBox II Hardware
Installation and Configuration).

Related topics Basics

Glossary ................................................................................................................................ 524


Introduction to the Features of MicroAutoBox ......................................................................... 19

39
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

Feature Support

Required MicroAutoBox The following table shows the hardware (base board and I/O boards) required for
hardware using each feature. You can also see which features are supported by each
MicroAutoBox variant. You can combine only the base boards and I/O boards
that are available as MicroAutoBox variants.

Feature MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
MicroAutoBox Basic Features
Interrupts ✓ - - - - - - - -
Watchdog1) ✓ - - - - - - - -
Challenge‑response monitoring1) ✓ - - - - - - - -
Memory Integrity and Extras1) ✓ - - - - - - - -
Onboard pressure sensor ✓ - - - - - - - -
Onboard acceleration sensor ✓ - - - - - - - -
Power Hold Control ✓ ✓ ✓ ✓ - - - - -
Nonvolatile Data Handling ✓ - - - - - - - -
Flash Memory-Based Flight Recorder ✓ - - - - - - - -
USB Flight Recorder2) ✓ - - - - - - - -
MicroAutoBox I/O Features
ECU Interface Unit ✓ ✓ - ✓ ✓ - - - -
Ethernet I/O Interface Unit ✓ - - - - - - - -
A/D Conversion - ✓ ✓ ✓ - ✓ ✓3) ✓ ✓3)
Bit I/O - ✓ ✓ ✓ - ✓ ✓3) ✓ ✓3)
D/A Conversion - ✓ - ✓ - ✓ ✓3) ✓ ✓3)
PWM Signal Generation With a Variable Period (PWM/PWM_VP) - ✓ ✓ ✓ - ✓ ✓3) ✓ ✓3)
PWM Signal Generation With a Fixed Period (PWM_FP) - ✓ ✓ ✓ - - - - -
Square-Wave Signal Generation With a Fixed Duty Cycle (FREQ) - - - - - ✓ ✓3) ✓ ✓3)
Multi-Channel PWM Signal Generation (MC_PWM) - ✓ ✓ ✓ - ✓ - ✓ -
PWM Signal Measurement (PWM2D) - ✓ ✓ ✓ - ✓ ✓3) ✓ ✓3)
Pulse Pattern Measurement (PPM/FPW2D) - ✓ ✓ ✓ - - - - -
Frequency Measurement (F2D) - ✓ ✓ ✓ - ✓ ✓3) ✓ ✓3)
Pulse Width Measurement (PW2D) - - - - - ✓ - ✓ -
Incremental Encoder Interface - ✓ ✓ ✓ - ✓ - ✓ -
Stepper Motor Control - ✓ ✓ ✓ - - - - -
Extended Engine Control (EEC) - ✓ ✓ ✓ - - - - -
Serial Peripheral Interface (SPI) - ✓ ✓ ✓ - ✓ - ✓ -

40
MicroAutoBox Features May 2018
System Overview

Feature MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
Single Edge Nibble Transmission (SENT) - - - - - ✓ - ✓ -
CAN Subsystem 1
Serial Interface - ✓ ✓ - ✓ ✓ - ✓ -
CAN Support - ✓ ✓ - ✓ ✓ - ✓ -
LIN Support - ✓ ✓ - ✓ ✓ - ✓ -
CAN Subsystem 2
Serial Interface - - - - ✓ ✓ - ✓ -
CAN Support - - ✓ - ✓ ✓ - ✓ -
LIN Support - - - - ✓ ✓ - ✓ -
CAN Subsystem 3
Serial Interface - - - - - - - ✓ -
CAN Support - - - - - - - ✓ -
LIN Support - - - - - - - ✓ -
IP Subsystem
IP Module Support - - - - ✓ - ✓ - ✓
FlexRay Support - - - - ✓ - ✓ - ✓
FPGA Programming
FPGA Support - - - - - - ✓ - ✓
RapidPro Use Case
RapidPro Diagnostics - ✓ ✓ ✓ - - - - -
1) RTI support via RTI Watchdog Blockset.
2) RTI support via RTI USB Flight Recorder Blockset.
3) Requires DS1552 Multi-I/O Module

Note

Some features of the MicroAutoBox I/O boards depend on the specified


boot mode, refer to I/O Features and Boot Modes on page 105.

41
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

Base Board's Basics

MicroAutoBox II Base Board

Naming convention Since board revision DS1401-20 the DS1401 base board is denoted
MicroAutoBox II Base board.

Processing unit The PowerPC 750 GL microprocessor (PPC) is the main processing unit of
MicroAutoBox. Your control models will be implemented on the PPC. The PPC
directly controls the ECU, the ADC and DAC units and accesses the features
provided by the digital I/O and CAN subsystems. It also control the interfaces
provided by the base board.

The MicroAutoBox II Base board comes with a PowerPC 750 GL, which has the
following features:
§ Clocked with 900 MHz
§ 1 MB Level2 cache
§ 16 MB Local RAM
§ 16 MB FLASH memory
§ 8 MB Global memory (6 MB available for host communication)
§ Real-time clock

Note

MicroAutoBox II is supported since Release 6.6. Real-time applications built


with earlier releases (but later than Release 4.2) can generally be loaded.

Note the following restrictions:


§ Up to Release 6.4, only 8 MB memory can be used.
§ Real-time applications using ECU interfaces
A real-time application built with Release 6.5 and earlier that uses the
interrupts for ECU 1 and ECU 2 displays an error message if you execute it
on MicroAutoBox II with DS1511, DS1512, DS1513, or DS1514 I/O
boards. These interrupts are not automatically forwarded to the ECU A
and ECU B interrupts provided by the MicroAutoBox II base board.
You can solve the problem by:
§ Using MicroAutoBox II with a DS1501, DS1505 or DS1507 I/O board
or
§ Recompiling your real-time application

42
MicroAutoBox Features May 2018
Base Board's Basics

Interfaces The MicroAutoBox II Base board has the following interfaces:


§ Ethernet host interface
§ Ethernet I/O interface for connecting external devices controlled by a real-time
application
§ Two LVDS2 interfaces (ECU interface unit A and ECU interface unit B)
§ USB 2.0 interface

Since board revision DS1401‑25, the MicroAutoBox II Base board provides an


internal Gigabit Ethernet switch. For example, it is required to connect an ECU
with DCI‑GSI2 to MicroAutoBox and to the host PC in parallel.

Onboard sensors Since board revision DS1401‑23, the MicroAutoBox II Base board provides
onboard sensors for:
§ Pressure measurement
§ Acceleration measurement

Related topics Basics

MicroAutoBox Basic Features .................................................................................................. 51

References

Base Board II Blockset ( MicroAutoBox RTI Reference)


Basic Functionality ( MicroAutoBox RTLib Reference)

43
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

Data Transfer Mechanism


Introduction For some functions, two data transfer mechanisms are available.

This applies to the following features:


§ Extended period measurement (PMMX)
§ Bit I/O unit
§ Slave DIO MC ADC unit
§ Pulse pattern measurement (PPM, FPW2D)

Where to go from here Information in this section

Using Communication Buffers ............................................................... 44

Fast Data Transfer .................................................................................. 44

Using Communication Buffers

Using communication buffers With the help of the Slave DIO MC access functions, the Master PPC controls the
actions of the slave and exchanges data with the slave via communication
buffers. This method ensures that data read from the slave is consistent even if
several DPMEM memory locations are needed for all data. In addition, status
information is available if data has changed since the most recent Read.

You have to perform three steps:


§ Register to make the slave function known to the Slave DIO MC (once for each
slave function).
§ Request to require that the previously registered slave function is carried out by
the slave (once for each execution of the function).
§ Read to fetch data from the dual-port memory and convert or scale the data, if
necessary.

Fast Data Transfer

Fast data transfer The firmware of the Slave DIO MC supports fast data transfer from the slave to
the Master PPC by passing the data directly through the DPMEM. This kind of
data transfer is faster than the mechanism with register, request and read
functions, but provides no status information on the data. Furthermore, data

44
MicroAutoBox Features May 2018
Data Transfer Mechanism

consistency cannot be ensured if several data words will be passed through


several memory locations using this method.

45
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

MicroAutoBox Application Start


Introduction After power‑up, MicroAutoBox boots automatically and executes the boot
firmware located in the on‑board flash memory. Afterwards, the real‑time
application can be used.

Where to go from here Information in this section

Boot Firmware ....................................................................................... 46

Running an Application from the Global Memory .................................. 48


In general, you download the application from the host PC to the
MicroAutoBox’s global memory. After the download, the application is
started.

Running an Application from the Flash Memory ..................................... 49


If you want an application to be started automatically after power‑up,
you have to load it to the MicroAutoBox’s flash memory.

Boot Firmware

Introduction After power‑up MicroAutoBox boots from the flash memory, which holds the
pre‑installed boot firmware.

Characteristics of the boot The boot firmware carries out the following steps:
firmware § It determines the I/O modules connected to the available I/O boards of the
MicroAutoBox.
§ It determines whether a user‑specific application exists in the global memory
or the flash memory. If this is the case, the application is started. An
application in the global memory takes precedence over an application in the
flash memory.
§ If neither the global nor the flash memory contains an application, the boot
firmware only collects information about the connected MicroAutoBox. This
information is passed to the Platform/Device Manager of ControlDesk,
which displays the system topology.

46
MicroAutoBox Features May 2018
MicroAutoBox Application Start

Note

Use the latest boot firmware

The boot firmware is available on the dSPACE Release DVD. You should
regularly check the availability of new boot firmware at
http://www.dspace.com/go/firmware. To update the firmware, use the
dSPACE Firmware Manager, refer to Firmware Manager Manual.

Problems Related to the boot If MicroAutoBox is not able to boot correctly, you have to restore the boot
firmware firmware by using the Firmware Manager.

For further information, refer to Using the Command Line Interface for Firmware
Management ( Firmware Manager Manual).

Further firmware components A MicroAutoBox consists of various hardware components. Some of them use
separate firmware to provide a specific functionality.

Firmware Component Meaning


Firmware for the main hardware components
Boot firmware Provides essential functions to access the hardware system
connected to the host PC.
It also contains functions to provide a hardware inventory and to
load and start a real‑time application.
Host IF firmware Provides functions that allow the communication between the
host PC and dSPACE real‑time hardware that has an
Ethernet‑based host interface.
Host IF PLD firmware Provides functions for the programmable logic device that
controls the host interface communication.
System PLD firmware Provides functions for the programmable logic device that offers
system functions, for example, watchdog handling or accessing
on‑board sensors.
Firmware for additional hardware components
AIO TYPE 1 PLD firmware Provides functions for accessing analog input and output signals
via the programmable logic device of the AIO Type 1 module.
Relevant for the DS1513 I/O board of MicroAutoBox.
ADC TYPE 4 PLD firmware Provides functions for accessing analog input signals via the
programmable logic device of the ADC Type 4 module.
Relevant for the DS1511 and DS1513 I/O boards of
MicroAutoBox.
CAN TYPE 1 firmware Provides functions for CAN communication via the CAN Type 1
module.
DIO TYPE 3 PLD firmware Provides functions for accessing digital input and output signals
via the programmable logic device of the DIO Type 3 module.
Relevant for the DS1511 I/O board of MicroAutoBox.

47
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

Firmware Component Meaning


DIO TYPE 4 PLD firmware Provides functions for accessing digital input and output signals
via the programmable logic device of the DIO Type 4 module.
Relevant for the DS1513 I/O board of MicroAutoBox.
FPGA TYPE 1 PLD firmware Provides basic functions for initializing and accessing the FPGA
Type 1 module.
Relevant for the DS1512 and DS1514 I/O boards of
MicroAutoBox.
DS1552ExtendedIO Provides the functionality of the DS1552 Multi-I/O Module for
signal conditioning of analog and digital inputs and outputs.
The firmware is loaded to the FPGA Type 1 module by using the
DS1401UpdateExtIO command in a Command Prompt window.
This firmware is not supported by the Firmware Manager or the
Update Firmware Wizard in ControlDesk.

After updating the firmware of MicroAutoBox, you have to turn off


MicroAutoBox. After a restart the firmware changes take effect.

Related topics Basics

Introduction ( Firmware Manager Manual)

Running an Application from the Global Memory

Introduction In general, you download the application from the host PC to the
MicroAutoBox’s global memory. After the download, the application is started.
This is the default behavior for both the dSPACE experiment software and RTI.

To stop and restart the application you have to reload it again, for example, via
ControlDesk's Real-Time Application - Reload command.

Note

If you switch off the MicroAutoBox, the contents of the global memory will
be lost. If you download/reload an application, the previous contents of the
global memory will be overwritten.

For information on handling real-time applications, refer to Handling Real-Time


Applications with ControlDesk ( First Work Steps with a dSPACE System).

48
MicroAutoBox Features May 2018
MicroAutoBox Application Start

Related topics Basics

Troubleshooting .................................................................................................................... 523

References

Real-Time Application - Reload ( ControlDesk Platform Management)

Running an Application from the Flash Memory

Introduction If you want an application to be started automatically after power‑up, you have
to load it to the MicroAutoBox’s flash memory. This is possible via RTI, RTI‑MP
and the dSPACE experiment software. Autobooting allows you to use
MicroAutoBox as a stand-alone system without a connection to the host PC.

Basics You can use up to 15 MByte of the flash memory for your application. After the
download has finished, the application will be copied to the global memory,
overwriting any existing application, and started automatically.

Whenever you switch on the MicroAutoBox, the boot firmware will copy the
application from the flash memory to the global memory and start it afterwards,
regardless of whether the board is connected to the host PC or not.

You can stop and restart the application by resetting the MicroAutoBox, for
example, by switching off the power and turning it on again. If you use the
dSPACE experiment software to stop and reload the application, it will first be
reloaded from the host PC to the flash memory, and then from the flash memory
to the global memory. Then the application will be started.

You can clear an application from the flash memory via the dSPACE experiment
software. Flash operations can be very time consuming: clearing or
reprogramming usually takes longer than 45 seconds.

Note

If you switch off the MicroAutoBox, the contents of the global memory will
be lost. If you switch on the power again, the contents of the flash memory
will be copied to the global memory and started.

For information on the flash memory’s characteristics, refer to Base Board's Basics
on page 42.

49
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox

For information on handling real-time application using ControlDesk, refer to


Handling Real-Time Applications with ControlDesk ( First Work Steps with a
dSPACE System).

Related topics Basics

Troubleshooting .................................................................................................................... 523

50
MicroAutoBox Features May 2018
MicroAutoBox Basic Features

MicroAutoBox Basic Features

Introduction The base board from MicroAutoBox provides some basic features that are
required for general implementation of real-time applications such as timer
services or interrupt handling.

Where to go from here Information in this section

Interrupt Handling ................................................................................. 53


General information on the interrupt handling provided by the
MicroAutoBox Base board.

Word-Based Subinterrupt Handling ........................................................ 58


Information on how to handle the subinterrupts generated by an ECU.

Timer Services ........................................................................................ 65


MicroAutoBox provides incremental and decremental timer services.

Safety Functions .................................................................................... 68


MicroAutoBox provides functions for monitoring the execution of tasks
and other functional entities in your real‑time application according to
safety measurements.

Nonvolatile Data Handling ..................................................................... 80


The MicroAutoBox Base board provides memory units that can be used
for nonvolatile data handling.

Flight Recorder ...................................................................................... 84


MicroAutoBox offers two different flight recorders for long-term data
acquisition.

Power Hold Control ............................................................................... 95


You can control MicroAutoBox’s power hold feature via Simulink model
or real-time application. This way the MicroAutoBox is shut down after
all termination processes have finished.

Onboard Sensors ................................................................................... 98


MicroAutoBox provides onboard sensors to measure the board's
acceleration on three axes and the air pressure.

51
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Information in other sections

Hardware Concept ................................................................................ 20

52
MicroAutoBox Features May 2018
Interrupt Handling

Interrupt Handling
Introduction General information on the interrupt handling provided by the MicroAutoBox
Base board.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
DS1401 Base Board MicroAutoBox with I/O Boards

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Basics on Interrupt Handling

Basic characteristics The MicroAutoBox Base board provides five basic interrupts from which three
interrupts are used for the host access, the timer and the decrementer. The other
two interrupts are reserved.

There are 27 hardware interrupts available for the I/O boards.

Depending on the MicroAutoBox variant used, up to eight external interrupts are


available (see I/O mapping on page 56).

There are different methods on interrupt assignment for the various


MicroAutoBox units. For example, the Slave DIO MC interrupt, the ECU interrupt
and the CAN interrupt are split into subinterrupts. These interrupts can be
masked.

Interrupts can be globally enabled and disabled. Only enabled interrupt sources
generate an interrupt on the base board.

External interrupts The MicroAutoBox variants provide different numbers of external interrupts:

MicroAutoBox Variant Number of External


Interrupts
MicroAutoBox II 1401/1501 8
MicroAutoBox II 1401/1504 8
MicroAutoBox II 1401/1505/1507 4

53
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

MicroAutoBox Variant Number of External


Interrupts
MicroAutoBox II 1401/1507 None
MicroAutoBox II 1401/1511 None1)
MicroAutoBox II 1401/1511/1512 None1), 2)
MicroAutoBox II 1401/1511/1514 None1), 2)
MicroAutoBox II 1401/1512/1513 None1), 2)
MicroAutoBox II 1401/1513 None1)
MicroAutoBox II 1401/1513/1514 None1), 2)
1) See the description for the DIO Type 3 and 4 interrupts below
2) If you have a DS1552 Multi-I/O Module installed, refer to the description
for this module below.

The external interrupts are activated on the rising edge. The width of the high
pulse must be greater than 5 μs to be detected as interrupt signal. For more
information, refer to MicroAutoBox II Hardware Installation and
Configuration.

Interrupts provided by Digital The MicroAutoBox Base board provides 4 interrupt lines for the communication
I/O Unit Types 3 and 4 between the base board and the DIO Type 3 module or the DIO Type 4 module.

Interrupt generation can be triggered by a rising edge, a falling edge or both.


Each channel of each port can be used to generate an interrupt. The minimum
pulse length to detect an interrupt is 2 µs.

If you are using the SENT feature, the interrupt generation can be triggered by a
received message. Using the SPI feature, the interrupt generation can be
triggered by a completed transmission of an SPI cycle.

The 4 interrupt lines are processed in different ways:

Interrupt Line Processing Details


1, 2 The interrupt line is processed for one single input or output channel. This does
not require subinterrupt handling that would increase the latency of the interrupt
service.
3 The interrupt line is processed for each channel that is specified to be connected
to this interrupt line. Only input channels are allowed.
4 The interrupt line is processed for each channel that is specified to be connected
to this interrupt line. Only output channels are allowed.
For example, you can use the interrupt of a PWM output channel to start an A/D
conversion for the current measurement.

Note

Interrupt lines 1 and 2 are not supported by RTI yet.

Depending on the available I/O board, you have to use the related RTLib
functions or RTI blocks for accessing the interrupt lines.

54
MicroAutoBox Features May 2018
Interrupt Handling

With RTLib, you can use the dio_tp3_single_source_int_mode_set or


dio_tp4_single_source_int_mode_set function to initialize interrupt lines 1
and 2, and the dio_tp3_multi_source_int_mode_set or
dio_tp4_multi_source_int_mode_set function to initialize interrupt lines 3
and 4. Handling the subinterrupts of lines 3 and 4 requires the dssint_xxx
functions, refer to Subinterrupt Handling ( MicroAutoBox RTLib Reference).

With RTI, the DIO_TYPE3_HWINT_BLx block or the DIO_TYPE4_HWINT_BLx block


is using the interrupt lines 3 and 4.

Interrupts provided by the The MicroAutoBox Base board provides one interrupt line for the communication
DS1552 Multi-I/O Module between the base board and the FPGA Type 1 module on the DS1512 or
DS1514. The interrupts of the ADC 1552 Type 1 unit and of the DIO 1552 Type 1
unit are processed by the interrupt handling implemented on the FPGA Type 1
module and then transferred to the base board.

Subinterrupts of the ADC 1552 Type 1 unit The interrupt implementation


of the FPGA Type 1 module provides three entries for the ADC 1552 Type 1 unit.
Each entry represents one of the available interrupt types and references another
interrupt array containing the interrupt states of each ADC channel. For further
information, refer to ADC 1552 Type 1 Unit on page 133.
With RTLib, you can access the interrupt implementation for each of the
interrupt types, refer to ADC 1552 Type 1 Unit of the DS1552 Multi-I/O Module
( MicroAutoBox RTLib Reference). Handling the interrupts requires the
dssint_xxx functions, refer to Subinterrupt Handling ( MicroAutoBox RTLib
Reference).
With RTI DS1552 I/O Extension Blockset, the ADC1552_TP1_HWINT_BLx block is
using the three ADC 1552 Type 1 addresses in the interrupt implementation,
refer to ADC1552_TP1_HWINT_BLx ( MicroAutoBox RTI Reference).

Subinterrupts of the DIO 1552 Type 1 unit The interrupt implementation


of the FPGA Type 1 module provides two entries for the DIO 1552 Type 1 unit.
One entry serves the interrupts of the digital input channels, the other entry
serves the interrupts of the digital output channels.
Interrupt generation can be triggered by a rising edge, a falling edge or both.
Each channel can be used to generate an interrupt. The minimum pulse length
to detect an interrupt is 2 µs.
With RTLib, you can access the interrupt implementation for the digital input
channels and the digital output channels separately, refer to Interrupt Handling
of the DIO 1552 Type 1 Unit of the DS1552 Multi-I/O Module ( MicroAutoBox
RTLib Reference). Handling the interrupts requires the dssint_xxx functions,
refer to Subinterrupt Handling ( MicroAutoBox RTLib Reference).
With RTI, the DIO1552_TP1_HWINT_BLx block is using the DIO 1552 Type 1
addresses in the interrupt implementation, refer to DIO1552_TP1_HWINT_BLx
( MicroAutoBox RTI Reference).

If you use the DS1552 Multi‑I/O Module with the RTI FPGA Programming
Blockset, the interrupts that you configured by using the FPGA_INT_BLx block
are generated on the FPGA Type 1 module and then transferred to the base
board. For further information on implementing interrupts in your FPGA

55
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

application, refer to How to Trigger Interrupt-Driven Processor Tasks ( RTI


FPGA Programming Blockset Guide).

Interrupts provided by the You can use the DS1554 Engine Control I/O Module with the RTI FPGA
DS1554 Engine Control I/O Programming Blockset only. The interrupts that you configured by using the
Module FPGA_INT_BLx block are generated on the FPGA Type 1 module and then
transferred to the base board. MicroAutoBox provides one interrupt line for the
communication between the base board and the FPGA Type 1 module on the
DS1514. For further information on implementing interrupts in your FPGA
application, refer to How to Trigger Interrupt-Driven Processor Tasks ( RTI
FPGA Programming Blockset Guide).

ECU (sub-)interrupts The ECU‑to‑PPC interrupt can be split into 16 subinterrupts via the ECU Software
Porting Kit (refer to ECU Software Porting Kit on page 178).

Interrupt-driven subsystems You can use interrupts or subinterrupts to trigger interrupt-driven subsystems of
in RTI your Simulink model. For further information on interrupt-driven subsystems,
refer to the Simulink user documentation.

Handcoded models If you use handcoded models, you have to provide the interrupt handling
yourself.

I/O mapping The following tables show the I/O pins of the MicroAutoBox I/O connector that
are used for external interrupts.

MicroAutoBox II 1401/1501 and 1401/1504

Number of the External Interrupt PPC Interrupt Line Signal Name I/O Pin
RTI RTLib
0 EXT 0 IRQ4 TPU ch 2 in P4
1 EXT 1 IRQ5 TPU ch 3 in P5
2 EXT 2 IRQ6 TPU ch 4 in P6
3 EXT 3 IRQ7 TPU ch 5 in R1
4 EXT 4 IRQ8 TPU ch 6 in R2
5 EXT 5 IRQ9 TPU ch 7 in R3
6 EXT 6 IRQ11 TPU ch 8 in R4
7 EXT 7 IRQ15 TPU ch 9 in R5

56
MicroAutoBox Features May 2018
Interrupt Handling

MicroAutoBox II 1401/1505/1507

Number of the External Interrupt PPC Interrupt Line Signal Name I/O Pin
RTI RTLib
0 EXT 0 IRQ4 TPU ch 2 in P4
1 EXT 1 IRQ5 TPU ch 3 in P5
2 EXT 2 IRQ6 TPU ch 4 in P6
3 EXT 3 IRQ8 TPU ch 6 in R2

57
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Word-Based Subinterrupt Handling


Introduction Information on how to handle the subinterrupts generated by an ECU.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ ✓ – ✓ ✓ – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on Word-Based Subinterrupt Handling ......................................... 58


The Word-Based Subinterrupt module is designed to implement the
subinterrupt features on the real-time processor (RTP) side.

Basics on the Alive Mechanism .............................................................. 59


Correct subinterrupt handling requires that the corresponding partner
system is running ("alive").

Basics on Subinterrupt Handling ............................................................ 62


Provides information on the subinterrupt handling.

Basics on Word-Based Subinterrupt Handling

Introduction The Word-Based Subinterrupt module is designed to implement the subinterrupt


features on the real-time processor (RTP) side, that is your dSPACE real‑time
system, for example, a DS1007‑based modular system or MicroAutoBox.

Note

To implement a subinterrupt sender on the ECU without intervention to the


interrupt state of the ECU, use the ECU Software Porting Kit
( MicroAutoBox RTLib Reference).

58
MicroAutoBox Features May 2018
Word-Based Subinterrupt Handling

Features of the Word-Based The Word-Based Subinterrupt Handling module provides the following features:
Subinterrupt Handling § It lets you trigger and handle multiple subinterrupts using a single hardware
module interrupt line.
§ It lets you specify multiple subinterrupts as pending at the receiver.
§ It lets you transmit and dispatch interrupts between an ECU and a dSPACE
RCP system.
§ It lets you define interrupt senders/receivers to transmit subinterrupts.

DPMEM usage The Word-Based Subinterrupt Handling module requires 30 + x (with


x = number of subinterrupts to be used) successive DPMEM addresses. The first
30 words are used for the alive mechanism, version information and other
administrative purposes.

The following illustration shows the usage of the reserved DPMEM areas and the
location of the words used for the alive mechanism and the subinterrupt
handling:

ECU DPMEM RTP

... DPMEM area for


... subinterrupts - each
Subinterrupt 3 word represents one
... subinterrupt
...
+ 30 Subinterrupt 0

DPMEM area for


administrative
ECU “still-alive” purposes
RTP “still-alive”
ECU “alive-write” / RTP “alive-read”
ECU “alive-read” / RTP “alive-write”

DSECU_THIRTY_PLUS_X_
FREE_DPM_WORDS

Basics on the Alive Mechanism

Introduction Correct subinterrupt handling requires that the corresponding partner system is
running ("alive").

59
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Alive state The partner system is supposed to be "alive" if the contents of the own "alive-
read" word is changed. The own "alive-read" is equal to the partner's
"alive‑write" word. After the alive state is recognized, the "still‑alive" word of
the partner is evaluated.

Startup function The alive startup function


§ sets the own "still‑alive" word
§ reads the partner's "alive‑write" word to initialize its compare value which is
used to recognize changes of this word
§ increments its own "alive‑write" word for the partner

The following illustration shows the activities from the ECU side (the RTP uses its
DPMEM addresses to perform corresponding actions):

ECU DPMEM

1. The ECU writes “1” to its “still-alive” word ECU “still-alive”

3. The ECU increment its “alive-write” word ECU “alive-write”


2. The ECU reads RTP‘s “alive-write” to RTP “alive-write”
global variable (var1)

Alive function The alive function has to be called repetitively to compare the partner’s
"alive‑write" word with the internal compare value. If the value has changed,
the partner is recognized as alive. Only in this case, the own "alive‑write" word is
incremented again.

In addition to this, the internal compare value is updated to the new value. After
the partner is recognized as alive, only the "still‑alive" word is checked.

60
MicroAutoBox Features May 2018
Word-Based Subinterrupt Handling

The following illustration shows the activities from the ECU side. The RTP uses its
DPMEM addresses to perform analog actions.

ECU DPMEM

ECU “still-alive”
RTP is alive
ECU “alive-write”
1. The ECU reads RTP‘s “alive-write” to RTP “alive-write”
local variable buffer

if buffer ≠ var1:

2. The ECU sets var1 = buffer ECU “still-alive”

3. The ECU increment its “alive-write” word ECU “alive-write”


RTP “alive-write”

ECU “still-alive”
RTP is not alive
ECU “alive-write”
1. The ECU reads RTP‘s “alive-write” to RTP “alive-write”
local variable buffer.
if buffer = var1:
The RTP is not alive and the ECU
performs no other activity.

Suspend function If the ECU or the dSPACE RCP system intends to go to "not alive", it must
§ call the suspend function which clears the "still‑alive" word and
§ must not call the alive function any longer.

The alive function of the other side notices that the "still‑alive" word is cleared
and checks the partner's "alive-write" word for changes. This allows the system
to recognize when the partner goes to the alive state again.

61
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

To revive a system you have to call the startup function once before the alive
function is called repetitively again.

ECU DPMEM

The ECU writes “0” to its “still-alive” word ECU “still-alive”

ECU “alive-write”
RTP “alive-write”

For detailed information on the functions, refer to Word-Based Subinterrupt


Handling ( MicroAutoBox RTLib Reference).

Related topics Basics

ECU Software Porting Kit ...................................................................................................... 178

References

Word-Based Subinterrupt Handling ( MicroAutoBox RTLib Reference)

Basics on Subinterrupt Handling

Introduction To implement word-based subinterrupt handling, you must consider the


following working steps.

62
MicroAutoBox Features May 2018
Word-Based Subinterrupt Handling

Subinterrupt handling The following illustration shows the subinterrupt handling – for example,
overview synchronous bypassing – in relation to the DPMEM addresses used:

ECU DPMEM RTP


1. Initialization

The ECU writes “4” Subinterrupt i


(”ready invalid”)

2. Send subinterrupt 3. Acknowledge

The ECU writes “7” Subinterrupt i The RTP writes “6”


(”pending”) (”acknowledged”)

4. End of subinterrupt The RTP writes “0”


(”ready”). Note: When
The ECU polls until Subinterrupt i the reset function is
“0” or “4” and called, the RTP writes
continues its work “4” (”ready invalid”)

Initialization Subinterrupt sender and receiver initialize the subinterrupt words – for the
defined number of subinterrupts – in the DPMEM with the value "ready invalid"
(= 4).

Pending subinterrupt If the receiver system is alive, the sender's send function sets the subinterrupt
state to "pending" (= 7) and triggers the hardware interrupt.

Acknowledge The receiver's interrupt handling performs the following steps:


§ It calls the acknowledge function to acknowledge the hardware interrupt by
reading the DPMEM acknowledge address.
§ It sets all pending subinterrupts to the state "acknowledged" (= 6).

Decoding The information about the acknowledged subinterrupts is passed to the decode
function via an internal data structure. The decode function must be called
repetitively to return every time the number of the subinterrupt that was
acknowledged before.

If it returns –1 there is no more subinterrupt to handle.

63
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

End of subinterrupt After the subinterrupt task is finished, the end‑of‑subinterrupt (EOSI) function
has to be called. It sets the subinterrupt state to "ready" (= 0). This is the signal
for the sender that the data can be read. The function that polls for the end-of-
subinterrupt returns the "valid" state.

Reset If the receiver calls the reset function for a subinterrupt, its state is set to "ready
invalid" (= 4) again as if it was pending before. The sender's poll function returns
the "invalid" state and the program can react appropriately.

Related topics References

ECU Software Porting Kit ( MicroAutoBox RTLib Reference)


Word-Based Subinterrupt Handling ( MicroAutoBox RTLib Reference)

64
MicroAutoBox Features May 2018
Timer Services

Timer Services
Introduction MicroAutoBox provides incremental and decremental timer services.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Timer ..................................................................................................... 65

Decrementer .......................................................................................... 66

Time Base Counter ................................................................................ 66

Timer

Characteristics The DS1401 base board includes a timer that can be used asynchronously to the
sample base rate. It is an 32-bit upcounter with a prescaler. When the value of
the counter matches the value of the timer compare register, an interrupt will be
generated.

RTI/RTLib support You can access the timer via RTI blockset and RTLib. For details, see:
§ Timer Interrupt Block ( RTI and RTI-MP Implementation Reference)
§ Timer ( MicroAutoBox RTLib Reference)

65
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Related topics References

Decrementer ( MicroAutoBox RTLib Reference)


Timer ( MicroAutoBox RTLib Reference)

Decrementer

Characteristics The PowerPC built-in Decrementer is used for periodic timer events such as the
sample base rate. The decrementer is a 32-bit downcounter generating an
interrupt when the timer is down to –1. At –1 the counter is reloaded with the
counter value set by ds1401_decrementer_period_set.

RTI/RTLib support You can access the decrementer via RTI blockset and RTLib. For details, see:
§ Timer Interrupt Block ( RTI and RTI-MP Implementation Reference)
§ Decrementer ( MicroAutoBox RTLib Reference)

Related topics References

Decrementer ( MicroAutoBox RTLib Reference)


ds1401_decrementer_period_set ( MicroAutoBox RTLib Reference)
ds1401_decrementer_read ( MicroAutoBox RTLib Reference)
ds1401_decrementer_set ( MicroAutoBox RTLib Reference)

Time Base Counter

Characteristics The PowerPC built-in 64-bit time base counter is divided into two 32‑bit
registers – the Upper Time Base Register (TBRU) and the Lower Time Base
Register (TBRL). You can use the time base registers for time measurements.

RTI/RTLib support You can access the time base counter via RTLib only. For details, see:
§ Time Base Counter ( MicroAutoBox RTLib Reference)

66
MicroAutoBox Features May 2018
Timer Services

Related topics References

Time Base Counter ( MicroAutoBox RTLib Reference)

67
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Safety Functions
Introduction MicroAutoBox provides functions for monitoring the execution of tasks and
other functional entities in your real‑time application according to safety
measurements.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements

MicroAutoBox with I/O Boards

DS1401 Base Board1)


Safety Functions

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
Watchdog Handling ✓2) – – – – – – – –
Challenge‑Response Monitoring ✓3) – – – – – – – –
Memory Integrity and Extras ✓4) – – – – – – – –
1) Supported as of board revision DS1401‑22.
2) System PLD firmware version 1.4.0 and later required.
3) System PLD firmware version 1.5 and later required.
4) System PLD firmware version 1.6 and later required.

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on Implementing Safety Functions ............................................... 68

Basics on Watchdog Handling ............................................................... 69

Basics on Challenge-Response Monitoring ............................................. 71

Basics on Memory Integrity and Extras ................................................... 76

Basics on Implementing Safety Functions

Introduction MicroAutoBox provides several features to implement real‑time applications with


safety aspects.

68
MicroAutoBox Features May 2018
Safety Functions

Safety measures Your software might run into an error or your hardware, e.g., external devices
connected to your real‑time application, might become defective during
execution. To make your application's behavior safe in such a case, you can apply
various safety mechanisms.

The first safety measure is the implementation of functional reactions to errors


that are known or intended. However, the real‑time application might show an
uncontrollable behavior if an unexpected error occurs.

The second safety measure is achieved through the watchdog handling. If the
monitored task or subsystem is no longer able to retrigger its watchdog within
the specified time, the real‑time application can be set to a safe state and the
hardware can be reset. Refer to Basics on Watchdog Handling on page 69.

The third safety measure is the challenge‑response monitoring. The monitored


entity, which can be a task, a subsystem, or any other functional unit, does not
only have to react within the specified time but also with a specific response
value. By generating the response value dynamically within the monitored entity,
you can implement various use scenarios for monitoring, such as checking the
execution order of functions in the monitored entity.The challenge‑response
monitoring is executed on a different hardware component as the real‑time
application to achieve a high safety level. Refer to Basics on Challenge-Response
Monitoring on page 71.

The fourth safety measure is the monitoring of the supply voltage of the
real‑time hardware and the integrity of the memory sections used by the
real‑time application. Additionally, you can use custom code to trigger a failure
action. Refer to Basics on Memory Integrity and Extras on page 76.

Basics on Watchdog Handling

Introduction With a watchdog, you can monitor a task in your real‑time application. You can
detect whether a task has stopped or is running in an endless loop.

Specifying watchdogs Initializing the watchdog feature enables and initializes the hardware watchdog
on which all the software watchdogs are based. The hardware watchdog
monitors the reactivity of your real‑time application as a whole. If any task in
your real‑time application hangs, the background service will not service the
hardware watchdog. This leads to a reaction of the hardware watchdog, for
example, it will reset the hardware system.

The hardware watchdog is initialized by using the WATCHDOG_SETUP block or


the ds1401_wd_init function.

69
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

To monitor a specific task in your real‑time application, you have to specify a


task‑specific software watchdog by adding further tasks to the
WATCHDOG_SETUP block or using the ds1401_wd_task_monitoring_init
function.

It is guaranteed that you can initialize up to 20 software watchdogs. Memory for


further software watchdogs is dynamically allocated as long as enough memory
is available.

The watchdogs for the background service and the tasks can be managed
individually. A watchdog's most important parameter is the time it has to wait
for the monitored task to react. This is the timeout limit used to configure the
watchdog timer of each watchdog separately.

It makes sense to set the timeout limit of the hardware watchdog to the lowest
timeout limit of all the tasks registered with the watchdog feature. This
guarantees that the requirements of the task with the shortest timeout interval
are met. However, any running task might then prevent the background service
from executing. If a task has an execution time greater than the timeout limit of
the background task, the hardware watchdog resets the system or generates an
interrupt.

Note

MicroAutoBox and its watchdog feature are not designed to be used for
safety‑critical applications.

Retriggering watchdog timers The timer of the hardware watchdog is automatically retriggered by the
background service of your real-time application. The timers of the software
watchdogs have to be retriggered explicitly within the tasks by using the
WATCHDOG_RETRIGGER_BLx block or the
ds1401_wd_task_retrigger_perform function.

To avoid retriggering a watchdog timer accidentally when you use RTLib, you
have to perform it in two steps and use a special authentication code. You have
to call the ds1401_wd_task_retrigger_arm function beforehand.

If retriggering was not executed within the specified timeout limit, the watchdog
reacts by generating a machine check (MCP) interrupt to start a previously
specified hook function or subsystem and/or by generating a hardware reset
(HRESET) pulse to restart the entire system.

Stopping task monitoring If you stop the real‑time application, you have to stop all the running watchdogs,
as otherwise they will react to the unresponding tasks and the hardware might
be reset. To do so, you can disable the task monitoring using the
ds1401_wd_task_monitor_stop_perform function.

To avoid stopping monitoring accidentally when you use RTLib, you have to
perform it in two steps and use a special authentication code. You have to call
the ds1401_wd_task_monitor_stop_arm function beforehand.

70
MicroAutoBox Features May 2018
Safety Functions

Monitoring that was stopped can be restarted by reenabling it using the


ds1401_wd_task_monitor_restart function.

When working with RTI, the WATCHDOG_SETUP block internally uses these
RTLib functions to start and stop task monitoring if the simState changes.

Handling interrupts You can specify to generate an interrupt if a watchdog timer expired. With RTLib,
you can then register a hook function that will be triggered by the interrupt and
executed before the real‑time application exits or the system resets. With RTI,
you can trigger a subsystem with a generated watchdog interrupt.

For example, you can use the hook function or subsystem to store data or to set
the outputs to their termination states.

After the execution of the triggered routine, the real‑time application exits and
the intermodule bus is reset, which also resets the outputs.

V CAUTION

Risk of personal injury

It is not guaranteed that the hook function or subsystem is executed. There


might be a fatal system crash that triggers the generation of an interrupt
but prevents the hook function or subsystem from being executed.

RTI/RTLib support You can access the watchdog feature via RTI and RTLib. Refer to:
§ RTI Watchdog Blockset Reference
The blockset also provides a demo model.

Note

The RTI blocks for the watchdog handling are available in the Watchdog
sublibrary of the RTI Watchdog Blockset. To use the RTI Watchdog
Blockset, a separate license is required.

§ Watchdog Handling ( MicroAutoBox RTLib Reference)

Basics on Challenge-Response Monitoring

Introduction With the challenge‑response monitoring feature, you can monitor an entity, such
as a periodic task or a subsystem in your real‑time application. The monitored
entity has to react with a valid response value within a specified time.

Characteristics The challenge‑response monitoring feature provides:


§ Monitoring hardware that provides up to 14 monitoring units.

71
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

§ Each monitoring unit can be individually configured with the following


settings:
§ Number of challenge‑response pairs in the range 1 … 16.
You can specify the values of the challenges and responses in the range
1 … 232‑1. The challenge values and the response values must be unique.
§ Challenge cycle time in the range 2.0e-3 … 16.384 s. The accuracy is 1 ms.
This is the time interval that is used to periodically provide a new challenge.
After the challenge value of the last challenge‑response pair has been
provided, it restarts with the first challenge value.
§ Response timeout in the range 1.0e-3 … (ChallengeCycleTime‑1) s. The
accuracy is 1 ms.
This is the time interval in which the monitored entity has to send back a
valid response.
§ Failure counters for the current number of failures and the total number of
failures. If there is no response within the specified timeout or a response
with an invalid value, the counters are incremented. The current failure
counter is reset each time a valid response is returned in time. It is also reset
if you reload the real‑time application. The total counter is only reset when
you reload the real‑time application or reset the hardware.
§ Failure count limit of 0 … 255.
This is the number of successive failures which are to be ignored before an
action is triggered.
§ As an action, you can specify to generate a machine check (MCP) interrupt,
a hardware reset (HRESET) pulse, a combination of both, or only to report
the failure.
§ MCP interrupt
The real‑time application is terminating with the exit function that
applies the specified termination functions.
§ HRESET pulse
MicroAutoBox is reset without waiting on the termination of the real‑time
application.
§ Combination of MCP interrupt and HRESET pulse
The real‑time application is terminating. When the monitoring unit gets a
further failure, the real‑time hardware is reset. The interval between
generating an interrupt and generating the reset pulse is controlled by the
specified challenge cycle time. It takes between one cycle time and less
than two cycle times.
§ Report
The user can flexibly react to an activated failure.
§ Setting to specify a hook function for the termination phase that puts the
real‑time application into a safe state before it stops. Refer to Failure actions
on page 74.
§ Self‑test of the monitoring hardware.

Timing constraints The configuration of the challenge‑response monitoring offers some timing
parameters that depend on each other.

72
MicroAutoBox Features May 2018
Safety Functions

For implementing stable monitoring, note the following rules:


§ The challenge cycle time must be:
§ At least two times longer than the sample rate of the entity to be
monitored.
§ Longer than the entity requires to send a response within the response
timeout.
Note, that the response timeout starts when the monitoring unit has sent
the challenge value and not when the entity has received the challenge
value.
§ At least as long as the hook function requires to execute the termination
function if you specified generating an MCP interrupt and an HRESET pulse.
The time between the interrupt and the hardware reset takes at least one
challenge cycle.
§ The response timeout must be:
§ Less than than the challenge period.
§ Longer than the cycle time of the entity that sends the response.
At least one response is to be sent within the response timeout. If multiple
responses were sent, only the first one is evaluated.
§ Reading challenges and writing responses can be controlled via flags, which
indicate that new challenge values are available and new response values must
be returned.

The following figures shows examples of these timing constraints.

Timing constraints are fulfilled The expected behavior of sending


challenge values and receiving response values is shown in the following figure.
In the second challenge period, you can see that only the first response value R1
is received and evaluated.
C0 R0 ü C1 R1 û R5 C2 R2 ü

Monitoring unit
Ignored

Monitored entity
in the real-time Get Set Get Set Set Get Set
application C0 R0 C1 R1 R5 C2 R2

Challenge period

Response timeout

Task period

t
C = challenge R = response

Timeout failures The following figure shows two scenarios. In the second
challenge period, the response value R1 is sent within the same challenge period
but the response timeout is exceeded. This leads to a failure and the failure
counters are incremented. The next response value R2 exceeds not only the
response timeout but also the challenge period. This leads to two failures
because the response is missing within the related challenge period and the sent
response value is invalid for the current challenge period. It is presupposed, that

73
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

you specified a failure count limit of at least three, otherwise the specified failure
action was activated.
C0 R0 ü C1 R1û C2 C3 R2 û

Monitoring unit

Monitored entity
in the real-time Get Set Get Set Get Set
application C0 R0 C1 R1 C2 R2

Failure: Timeout Failure: Missing response Failure: invalid value


Current failure counter 0 1 2 3
Total failure counter n +1 +1 +1

Challenge period

Response timeout

Task period

t
C = challenge R = response

Invalid values The following figure shows that a failure is detected if the
response value does not suit to the currently active challenge value. In the third
challenge period, you can see that only the first response value R3 is received
and evaluated. The failure status will not be reset by the following valid response
value R2.
C0 R0 ü C1 R2 û C2 R3 û R2

Monitoring unit
Ignored

Monitored entity
in the real-time Get Set Get Set Get Set Set
application C0 R0 C1 R2 C2 R3 R2

Failure: Invalid value Failure: Invalid value


Current failure counter 0 1 2
Total failure counter n +1 +1

Challenge period

Response timeout

Task period

t
C = challenge R = response

Failure actions For failure handling four failure actions are available.

Generating an HRESET pulse An HRESET pulse resets the hardware. This is


the most simple method to react to a failure. The real‑time application
immediately stops without executing any termination code. Any instantiated
monitoring unit is affected by this.
A hardware reset does not reboot your hardware. Only the PowerPC processor
and the intermodule bus are reset. This means, that the real‑time application is
stopped and the connection to the I/O boards is refreshed. The components for

74
MicroAutoBox Features May 2018
Safety Functions

the host communication are not affected. If the real‑time application is stored in
the Flash memory, the real‑time application is automatically restarted.

Generating an interrupt If you specify to generate an interrupt, you can


trigger a routine that executes individual termination code, for example, to store
data or set the outputs to their termination states. With RTI, you do this by
triggering a subsystem. With RTLib, you register a hook function that is to be
executed when an interrupt is generated. Any instantiated monitoring unit use
the same subsystem or hook function when it has to react on an interrupt.
Within the triggered subsystem or the hook function, you can get information
on the monitoring unit that generated the interrupt.
After the execution of the triggered routine, the real‑time application exits and
the intermodule bus is reset, which also resets the outputs.

V CAUTION

Risk of personal injury


It is not guaranteed that the hook function or subsystem is executed. There
might be a fatal system crash that triggers the generation of an interrupt
but prevents the hook function or subsystem from being executed.

Generating a combination of interrupt and HRESET pulse If you specify


to generate a combination of interrupt and hardware reset, at first the real‑time
application executes its termination process and exits. Then the
challenge‑response monitoring hardware detects missing responses because of
the terminated real‑time application and generates an HRESET pulse. The time
between the generation of the interrupt and the generation of the HRESET pulse
takes the time of at least one challenge cycle and at most two challenge cycles.

Reporting With the reporting option, the challenge‑response monitoring


only reports the exceeded failure limit. The code to be executed can be
individually implemented for each instantiated monitoring unit. With RTI, the
exceeding of the failure limit is reported at the Failure Limit Exceeded output
port, which you can connect to other blocks or subsystems. With RTLib, the
activation of the failure is reported to the pIsLimitExceeded parameter of the
ds1401_crm_unit_fail_cntrs_get function.
When reporting is the set failure action, the flag of the exceeded limit is not reset
even if the current failure counter is reset by a valid response value later on. Once
activated, you can reset the flag only by reloading the real‑time application.

Note

If you have specified that only reports are triggered if the failure count limit
is exceeded, you have to note the following points:
§ You should use reporting as the failure action for testing or debugging
purposes only.
§ If you use this failure action for other purposes, it is your responsibility to
implement operations that put your real‑time application into a safe state.

75
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Self‑test If the challenge‑response monitoring is started, a self‑test is periodically executed


in the background service of your real‑time application. It is checked whether the
monitoring hardware is correctly working. The result of the self‑test is passed or
failed. The result is stored in the supervision status information. If the status is
once set to failed, you can reset it only by reloading the real‑time application.

With RTI, you can use the CRM_SUPERVISION_STATUS block to read the
supervision status information.

With RTLib, you can use the ds1401_crm_supervision_stat_get function to


read the supervision status information.

Note

The turnaround time of your application must be less than 400 ms.
Otherwise the self‑test returns the failed status.

Stopping the real‑time The challenge‑response monitoring does not react to the simState variable. If
application you stop or pause your real‑time application, the challenge‑response monitoring
will execute the specified failure handling. Your hardware might be reset.

It is recommended not to pause or stop the real‑time application when using the
challenge‑response monitoring.

RTI/RTLib support You can access the challenge‑response monitoring feature via RTI and RTLib.
Refer to:
§ Challenge‑Response Monitoring ( RTI Watchdog Blockset Reference)
The blockset also provides a demo model.

Note

The RTI blocks for the challenge‑response monitoring are available in the
Challenge‑Response Monitoring sublibrary of the RTI Watchdog
Blockset. To use the RTI Watchdog Blockset, a separate license is
required.

§ Challenge‑Response Monitoring ( MicroAutoBox RTLib Reference)

Basics on Memory Integrity and Extras

Introduction With the memory integrity and extras feature, you can monitor the supply
voltage of the real‑time hardware and specific memory sections used by the
real‑time application. With the custom monitoring you can freely configure a
condition that will trigger one of the failure actions.

76
MicroAutoBox Features May 2018
Safety Functions

Characteristics The characteristics of the memory integrity and extras feature are:
§ Periodically monitoring the following facilities:
§ Supply voltage (VBAT monitoring)
§ ROM memory integrity (ROM monitoring)
§ Heap memory integrity (heap monitoring)
§ Stack memory integrity (stack monitoring)
Each monitoring facility can be enabled separately.
§ Using RTI, you can additionally specify to check the checksum of the ROM
contents not only periodically during runtime (ROM monitoring), but also once
directly after the download of the real‑time application (ROM check). This
allows you to detect failures during download, e.g., a failure in processing the
PPC file.
Using RTLib, the execution of the ROM check is only controlled by the related
flag that is written to the PPC file. You cannot deactivate it via RTLib, because
the ROM check is processed before the start of the real‑time application. For
more information, refer to Prerequisites on page 77.
§ Setting to specify the minimum threshold level of the supply voltage that
triggers a reaction in the range 4.0 … 40.0 V. The accuracy is 0.0244 V.
§ Triggering the failure action via a user‑defined condition.
§ As a failure action, you can specify to generate a machine check (MCP)
interrupt, a hardware reset (HRESET) pulse, a combination of both, or only to
report the failure.
If you specified the combination of interrupt and HRESET pulse generation,
you can specify the time delay for generating the HRESET pulse in the range
0.001 … 16.383 s.
For more information, refer to Failure actions on page 78.

Prerequisites The ROM check, the monitoring of the ROM, and the heap memory sections
requires additional data in the PPC file of your real‑time application. The
preparation is done via the EPK1401.exe utility that, e.g., calculates the
checksum value and writes the additional data to the PPC file.
§ When you use RTI, the preparation via the EPK1401.exe utility is
automatically included in the build process if you have enabled the relevant
monitoring facilities in the MEMORY_VBAT_MONITORING block.
§ When you use RTLib, and you want to use the ROM check, or monitor the
ROM or heap memory, you must manually execute the EPK1401.exe utility to
write the required data to the PPC file. For each rebuild of your PPC file, you
must repeat this step. For information on the EPK1401.exe utility, refer to
EPK1401 ( MicroAutoBox RTLib Reference).

The reference data for heap monitoring is dynamically added to the allocated
heap blocks. Heap monitoring therefore increases the required heap memory by
64 bytes per heap block.

77
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Failure actions For failure handling four failure actions are available.

Generating an HRESET pulse An HRESET pulse resets the PowerPC


processor and the intermodule bus. This is the most simple method to react to a
failure. The real‑time application immediately stops without executing any
termination code.

Note

A hardware reset does not reboot MicroAutoBox completely. Only the


PowerPC processor and the intermodule bus are reset. This means that the
real‑time application is stopped and the connection to the I/O boards is
refreshed. The components for the host communication are not affected. If
the real‑time application is stored in the flash memory, the real‑time
application is automatically restarted.

Generating an interrupt If you specify to generate an interrupt, you can


trigger a routine that executes individual termination code, for example, to store
data or set the outputs to their termination states. With RTI, you do this by
triggering a subsystem. With RTLib, you register a hook function that is to be
executed when an interrupt is generated. You can specify one subsystem or hook
function for the memory and VBAT monitoring and one for the implemented
custom failure actions.
After the execution of the triggered routine, the real‑time application exits and
the intermodule bus is reset, which also resets the outputs.

V CAUTION

Risk of personal injury


It is not guaranteed that the hook function or subsystem is executed. There
might be a fatal system crash that triggers the generation of an interrupt
but prevents the hook function or subsystem from being executed.

Generating a combination of interrupt and HRESET pulse If you specify


to generate a combination of interrupt and hardware reset, at first the real‑time
application executes the specified hook function or subsystem and exits. Then,
after the specified delay, an HRESET pulse is generated to reset the PowerPC and
the intermodule bus. This guarantees a reaction on a failure even if the triggered
subsystem or service routine for terminating the real‑time application is
corrupted.
If the real‑time application is stored in the flash memory, the real‑time
application is automatically restarted.
The hardware component that generates the HRESET pulse uses a free‑running
timer with a fixed period of 1 ms. The delay of the pulse generation starts with
the period that follows the point of time when the interrupt was triggered. The
effective delay is therefore up to 1 ms greater than the specified delay.

Reporting With the reporting option, the monitoring facilities only report a
detected failure. The code to be executed can be individually implemented for
each provided failure flag. With RTI, the failure detection is reported at the
related Failure Detected output ports, which you can connect to other blocks

78
MicroAutoBox Features May 2018
Safety Functions

or subsystems. With RTLib, a detected failure is reported to the


pIsFailureDetected parameter of the related
ds1401_fse_xxx_mon_stat_get function.
In contrast to the generation of an interrupt or an HRESET pulse, which is
immediately executed when triggered, the report flag is set in the next sample
step.
When reporting is the set failure action, the flag of the detected failure is not
reset even if the monitored facility fulfills the conditions again. Once activated,
you can reset the flag only by reloading the real‑time application.

Note

If you have specified that only reports are triggered if a failure is detected,
you have to note the following points:
§ Use reporting as the failure action only for testing or debugging purposes.
§ If you use this failure action for other purposes, it is your responsibility to
implement operations that put your real‑time application into a safe state.

Run‑time behavior Because the memory integrity and extras facilities are executed in the
background loop of your real‑time application, they do not react to the
simState variable. Stopping or pausing the real‑time application has no effect
on the monitoring.

Note

The enabled monitoring facilities are executed in the current sample step
only, if there is sufficient idle time in the background service.

RTI/RTLib support You can access the memory integrity and extras feature via RTI and RTLib. Refer
to:
§ Memory Integrity And Extras ( RTI Watchdog Blockset Reference)
The blockset also provides a demo model.

Note

The RTI blocks for the memory integrity and extras feature are available in
the Memory Integrity and Extras sublibrary of the RTI Watchdog
Blockset. To use the RTI Watchdog Blockset, a separate license is
required.

§ Memory Integrity and Extras ( MicroAutoBox RTLib Reference)

79
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Nonvolatile Data Handling


Introduction The MicroAutoBox Base board provides memory units that can be used for
nonvolatile data handling.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements

MicroAutoBox with I/O Boards

DS1401 Base Board


Nonvolatile Data Handling

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
RTC RAM Access ✓ – – – – – – – –
Nonvolatile RAM Access ✓ – – – – – – – –
Flash Memory Access ✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on RTC RAM Access .................................................................... 80

Basics on Nonvolatile RAM Access ......................................................... 81

Basics on Flash Memory Access .............................................................. 82

Basics on RTC RAM Access

Introduction MicroAutoBox’s real-time clock (RTC) provides a user RAM that you can use to
store intermediate results, for example, the mileage. The real-time clock is
battery-buffered. Stored data is not deleted if you switch off the system. You can
store up to 16 byte.

80
MicroAutoBox Features May 2018
Nonvolatile Data Handling

Characteristics You can set the start address of the RTC-RAM within the range of 0 … 15. The
following constants are predefined:

Predefined constant Meaning


SYS1401_DATA_TYPE_INT8 8-bit signed integer
SYS1401_DATA_TYPE_UINT8 8-bit unsigned integer
SYS1401_DATA_TYPE_INT16 16-bit signed integer
SYS1401_DATA_TYPE_UINT16 16-bit unsigned integer
SYS1401_DATA_TYPE_INT32 32-bit signed integer
SYS1401_DATA_TYPE_UINT32 32-bit unsigned integer
SYS1401_DATA_TYPE_FLOAT32 32-bit float
SYS1401_DATA_TYPE_FLOAT64 64-bit float

Related topics References

DS1401_RAM_READ ( MicroAutoBox RTI Reference)


DS1401_RAM_WRITE ( MicroAutoBox RTI Reference)
ds1401_rtc_ram_read ( MicroAutoBox RTLib Reference)
ds1401_rtc_ram_write ( MicroAutoBox RTLib Reference)

Basics on Nonvolatile RAM Access

Introduction MicroAutoBox provides a non-volatile RAM that you can use to store
intermediate results, for example, the mileage.

Characteristics Stored data in the non-volatile RAM is not deleted if you switch off the system.
You can store up to 4096 bytes in the address range 0 … 4095.

To check the size of the non-volatile RAM, you can use the predefined constant
DS1401_NVRAM_SIZE.

Related topics References

DS1401_NV_RAM_READ_BLx ( MicroAutoBox RTI Reference)


DS1401_NV_RAM_WRITE_BLx ( MicroAutoBox RTI Reference)
ds1401_nvram_init ( MicroAutoBox RTLib Reference)
ds1401_nvram_read ( MicroAutoBox RTLib Reference)
ds1401_nvram_write ( MicroAutoBox RTLib Reference)

81
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Basics on Flash Memory Access

Basics You can use the nonvolatile data feature to store data you may want to use
again when restarting the application, for example, if you want to resume a
simulation with the last mileage or the settings for an air conditioner.

Characteristics The flash memory (16 MB) of MicroAutoBox consists of 64 blocks, each 256 KB
in size. This nonvolatile flash memory can be used to store one application for
stand-alone booting and flight recorder data. Additionally, it can be used for the
Nonvolatile Data Handling. Each data set requires a complete 256-KB flash
memory block, which has to be allocated and registered in the flash module. You
can configure how much memory space you want to use for the application, the
nonvolatile data, and for flight recording. For further information, refer to Flash
partitioning in Basics on Flight Recorder on page 85.

Tip

You can store calibrated parameter values to the flash memory of the
DS1005 and MicroAutoBox. Using the Store Calibration Parameter to Flash
solution, you can let a flash application store calibrated parameter values
during the regular shutdown process or when you switch the SimState from
RUN to STOP in ControlDesk.

When the application restarts from the DS1005/MicroAutoBox’s flash


memory, the application starts with the parameter values recently
calibrated. Without the solution, the application would start with the
original parameter values as defined in the Simulink® model.

For detailed information on the solution, install it from the dSPACE


Solutions DVD and read the user guide. For information on installing it, refer
to the ReadMe.txt file.

Termination The nonvolatile data to be stored is collected in a temporary buffer until the
application is terminated. If MicroAutoBox is switched off and you have
implemented the Power Hold feature in your application, buffered data is
transferred to the flash memory before MicroAutoBox is shut down, so that no
data is lost. For further information, refer to Basics of Power Hold Control
on page 95.

Buffered data might be lost, if:


§ Power supply is switched off without using the Power Hold feature.
§ The execution of the real‑time application is stopped because of a Stop RTP or
Real-Time Application - Reload command in ControlDesk (the simState
variable is then not switched to 0).

82
MicroAutoBox Features May 2018
Nonvolatile Data Handling

Note

If you clear the flash memory, load a real‑time application that accesses the
flash memory and then stop the RTP (without changing simState to 0), the
nonvolatile data handling feature remains in its initialization state and can
not store any data. In this state, the Status signal of a
RESTORE_FROM_FLASH_BL block permanently outputs 1.

To finish the initialization state of the nonvolatile data handling, you have to
do the following steps:
1. Clear the flash memory
2. Reload the application
3. Set simState to Stop (0)

The same termination behavior is used when the internal voltage monitoring
detects a voltage below the minimum voltage level (only if the flight recorder is
used and not for the nonvolatile data).

When the application is started again, the nonvolatile data is copied from the
flash memory to the temporary buffer. If no data is stored in the flash or the data
is corrupt, the initial parameter values of the application are used.

Demo model For a demo model using the Power Hold On/Off feature, refer to
<RCP_HIL_InstallationPath>\Demos\DS1401\RTI\Demo1401FlashAcces
s.mdl. You find this demo in the MicroAutoBox’s RTI demo library.

Related topics References

Flash Memory Access ( MicroAutoBox RTLib Reference)

83
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Flight Recorder
Introduction MicroAutoBox offers two different flight recorders for long-term data acquisition.

Where to go from here Information in this section

Flight Recorder (Flash Memory) .............................................................. 84

USB Flight Recorder ............................................................................... 88

Flight Recorder (Flash Memory)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on Flight Recorder ....................................................................... 85


The flight recorder is used to store time histories of real-time variables in
nonvolatile memory.

Using the Flight Recorder ....................................................................... 86


You can use the flight recorder to write data to the flash memory.

MAT File Format for the Flight Recorder ................................................. 87


Flight Recorder uses the MAT file format.

84
MicroAutoBox Features May 2018
Flight Recorder

Basics on Flight Recorder

Characteristics The flight recorder is used to store time histories of real-time variables in
nonvolatile memory. During the real-time simulation, the values of real-time
variables are written to the 16 MB flash memory of MicroAutoBox Board. Up to
13 MB (with the nonvolatile feature) or 13.25 MB (without the nonvolatile
feature) of the flash memory can be used for flight recording. The great capacity
of the flight recorder permits long-term data acquisition.

The flight recorder section of the flash memory is organized as FIFO storage. A
maximum of 250 different real-time variables can be recorded.

After the simulation has finished, the acquired data can be read out by the host
PC. On the host PC, the flight recorder data is stored in binary or reference data
(MAT file) format. Because MicroAutoBox has a power-down feature that
terminates all currently executed applications, flight recording is stopped and the
captured data is transferred to the flash memory. This avoids data loss during
termination.

For detailed information on using the flight recorder, refer to Using the Flight
Recorder on page 86.

Flash partitioning The flash memory stores various information:


§ Internal data, for example, the boot firmware
§ Data section for the nonvolatile data handling
§ Application data (one application for stand-alone booting)
§ Flight recorder data

According to your settings in the FLASH_SETUP block or the dsflrec_initialize


function, this data is used as a memory configuration to partition the flash
memory. If an application image exceeds the 2 MB section reserved by default or
the specified size of the application data section, the complete flash memory
must be cleared to permit repartitioning. The stored data gets lost. For
instructions how to clear the flash, refer to How to Clear an Application from the
Flash Memory of dSPACE Real-Time Hardware ( ControlDesk Platform
Management).

The default memory configuration is shown in the following illustration.

0.75
0.25 2
0 16 MB

Reserved Application Flight recorder


≤ 13 MB
NV data feature

85
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Time stamps In the flight recorder, data captures are stored together with time stamps. Time
stamps are measured in seconds with a resolution of 10.24 µs relative to the
time base 1970‑01‑01. Time stamps are interpreted appropriately by MATLAB or
dSPACE experiment software. You can change the time base using M-program
code. For an example, refer to MAT File Format for the Flight Recorder
on page 87.

Related topics References

Flash Memory Access ( MicroAutoBox RTI Reference)


Flight Recorder (Flash Memory) ( MicroAutoBox RTLib Reference)

Using the Flight Recorder

Introduction You can use RTI’s library rtiflashlib or RTLib functions to write flight recorder
data to the flash memory.

Memory overwrite mode You can choose via RTI or RTLib functions how data will be handled when the
memory block for flight recording is full:

Discard new data (blocked mode) When the memory block for flight
recording is full, no further data will be recorded.

Replace old data (overwrite mode) When the memory block for flight
recording is full, the oldest entries will be replaced.

Note

To avoid the loss of data you should save the data to the PC and delete the
data from the flash memory in regular intervals. The application must be
stopped before.

Demo model For a demo model using the Flash Memory Access feature and the flash memory-
based flight recorder, refer to
<RCP_HIL_InstallationPath>\Demos\DS1401\RTI\
Demo1401FlashAccess.slx. You find the Flash Access demo also in the
MicroAutoBox’ RTI demo library.

86
MicroAutoBox Features May 2018
Flight Recorder

Note

This demo does not run correctly, if you use the preconfigured cabling by
dSPACE for the power input connector, because the REMOTE pin is
shortened to VBAT. For further information on the power input connector
and the required cabling, refer to Basics on Connecting to Power Supply
( MicroAutoBox II Hardware Installation and Configuration).

Loading data to the host PC After the simulation has finished, the acquired data can be read out by the host
PC. Reading out the data does not delete the data from the flash memory.

Tip

Reading the data in MAT format requires more resources on the host PC
(processor and memory). In the vehicle, you can upload a binary file to the
host PC and convert the data to a MAT file later on. In the laboratory, you
can upload the data directly to a MAT file (refer to MAT File Format for the
Flight Recorder on page 87).

To handle flight recorder data with ControlDesk, refer to Uploading Flight


Recorder Data ( ControlDesk Measurement and Recording).

Related topics Basics

Basics on Flight Recorder ........................................................................................................ 85

MAT File Format for the Flight Recorder

Introduction Flight Recorder uses the MAT file format.

MAT file format MAT files generated by the flight recorder contain a separate x-axis (timestamp
vector) for each y-axis. To find the correct x‑axis, the XIndex element of the y-axis
data struct must be evaluated. For an example, see the code below.

For instructions on how to access the data of a MAT file, see Postprocessing
Recorded Data With MATLAB ( ControlDesk Measurement and Recording). For
details on the MAT file structure, see Structure of MAT Files Generated by
Exporting Recorded Data ( ControlDesk Measurement and Recording).

87
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Changing the time base The following program code shows you how to convert flight recorder data
based on the 1970-01-01 to data relative to an entered time base in MATLAB.
You have to change <MATFILENAME> with your own names.

load <MATFILENAME>.mat
varValues = <MATFILENAME>;
base_date = '01-Jan-1970';
plot_date = varValues.FlightRec.StartDateTime;
n = 1;
figure;
plot_start = (datenum(plot_date) - datenum(base_date))*24*3600;
use_XIndex = varValues.Y(n).XIndex;
plot(varValues.X(use_XIndex).Data - plot_start, varValues.Y(n).Data);
xlabel(strcat('sec since [', datestr(plot_start/24/3600 + datenum(base_date)), ']'));
ylabel(varValues.Y(n).Name);

Let the index n increase to display all the recorded data.

Related topics Basics

Basics on Flight Recorder ........................................................................................................ 85


Using the Flight Recorder ........................................................................................................ 86

USB Flight Recorder

Purpose With the USB Flight Recorder, you can perform long-term data acquisition. The
values of selectable variables are written to the connected USB mass storage
device during simulation.

In contrast to the flash memory-based Flight Recorder (see Flight Recorder (Flash
Memory) on page 84), the storage size is only restricted by the USB mass storage
device.

You can use both the flash memory-based Flight Recorder and the USB Flight
Recorder in your application.

88
MicroAutoBox Features May 2018
Flight Recorder

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on USB Flight Recorder ................................................................ 89

Handling the Data of the USB Flight Recorder ........................................ 93

Basics on USB Flight Recorder

General information The USB Flight Recorder is used to store time histories of real-time variables. The
values of real-time variables are written to an externally connected USB mass
storage device during real-time simulation.

A maximum of 250 different real-time variables can be recorded.

The recorded data is written to a file in the root directory of the USB mass
storage device. The file name is automatically generated and contains the name
of the real-time application, the creation date and the creation time.

The default maximum size of a single file is 32 MB. With RTLib, you can specify a
maximum file size of up to 256 MB. If more than the specified maximum file size
is recorded during one simulation, the data is split into several files. Consecutive
files are created until the storage capacity of the USB device has been reached.
Then the captured data is discarded or older files are overwritten, according to
your setting (refer to Memory overwrite mode on page 90).

After the simulation has finished, the recorded data can be read out by the host
PC, refer to Handling the Data of the USB Flight Recorder on page 93.

With MicroAutoBox's power-down feature, all currently executed applications


are terminated before the hardware is shut down. The flight recording is also
stopped in a definite state to avoid data loss.

89
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Memory overwrite mode You can use RTI or RTLib functions to define how to handle data when the USB
mass storage device for flight recording is full:

Discard new data (blocked mode) When the USB mass storage device for
flight recording is full, no further data is recorded.
The flight recording session is stopped, but the real-time application continues to
run.

Replace old data (overwrite mode) When the USB mass storage device for
flight recording is full, the oldest files are replaced.

Requirements on the USB Any standard USB 2.0 mass storage device can be used, such as a USB memory
mass storage device stick or an external USB hard drive with or without separate power supply. The
USB device must be formatted with the Microsoft FAT32 file system and must be
directly connected to your hardware.

Note

A connection via a USB hub is not supported.

USB mass storage devices differ according to their rates for writing data. It is
recommended to use a fast device for good performance.

The maximum supported file system size is 32 GB. Using a file system with a size
greater than 32 GB might work but is neither recommended nor supported.

If you use an external USB hard drive with more than one partition, the flight
recorder data is stored only in the first partition.

Avoiding data loss The Windows FAT32 file system is not designed to operate in a fail-safe manner.
For example, removing a USB memory stick while data is written to it can result
in corrupted data.

Note

Risk of data loss

While a USB Flight Recorder session is active:


§ Do not unplug the USB device from your hardware.
§ Do not switch off your hardware.

You can recognize an active USB Flight Recorder session by the green
flashing USB status LED.

To safely remove the USB device while an application is running, follow the
instructions in this section.

To avoid partial data loss or corruption of the recorded data, you have to take
the following precautions.

90
MicroAutoBox Features May 2018
Flight Recorder

Removing the USB device while an application is running To safely


remove the USB device while an application is running, apply one of the
following methods:
§ Stop the real‑time application.
The USB device can be safely removed as soon as the real‑time application is
stopped, for example, by using ControlDesk.
§ Eject by predefined signal.
The power input connector of MicroAutoBox provides the REMOTE pin that
you can use for unmounting the USB device. If you connect an external Eject
button, that is to be implemented by you, to this pin, the unmount procedure
is started when you press the button. You can remove the USB device when
the USB status LED is off. A host message is also generated.
For further information on the power input connector and the required
cabling, refer to Basics on Connecting to Power Supply ( MicroAutoBox II
Hardware Installation and Configuration).
§ Eject by user‑defined signal.
You can use the USB_FLIGHT_REC_EJECT block in your Simulink model or the
dsflrec_usb_eject command in your handcoded application to unmount
the USB device as a reaction to a signal, for example, a specific model variable.
To restart the USB Flight Recorder, you have to remove the USB device and
reconnect it to your hardware.

Removing the USB device when the box is switched off To safely
unmount the USB device from your MicroAutoBox before it is switched off, you
have to use the power hold control feature. Switching the MicroAutoBox on and
off is then controlled by the REMOTE input pin provided by the power input
connector. The signal for switching off is followed by a termination procedure,
including unmounting the USB device, before the power is actually switched off.
For further information, refer to Basics of Power Hold Control on page 95 and
Basics on Connecting to Power Supply ( MicroAutoBox II Hardware Installation
and Configuration).

Tip

Alternatively, you can use MicroAutoBox's flash‑memory based flight


recorder to guarantee the data is saved, refer to Basics on Flash Memory
Access on page 82.

Accessing USB Flight Recorder You can use any standard FTP client to retrieve USB Flight Recorder files without
files via FTP disconnecting the USB device from your hardware. The USB Flight Recorder files
are stored in <FTP_Root>\usb. When the real‑time application is not running,
reading USB Flight Recorder files via FTP is safe, otherwise the following
limitations apply:
§ An FTP connection generates a CPU load that might result in partial data loss if
the USB flight recording load is high.
§ If a file is read via FTP while a flight recording session is running, incomplete
data will be retrieved if the flight recorder data is written in overwrite mode.

91
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

§ Any data capture session running via Ethernet might be disturbed by an FTP
connection because the network bandwidth is shared.

Note

Do not download flight recorder data while the real‑time application is


running.

USB status LED The status LED of the USB connector displays the current status of the USB
device and the flight recorder.

LED Status Meaning


Off No USB device is connected.
Green USB device is connected and flight recorder is not running.
Green blinking USB device is connected and flight recorder is running.
Orange USB device is full and the active flight recorder is specified not
to overwrite old files.
Red Write error when accessing the USB device, for example, if the
device was removed while the flight recorder was running.

Time base In the flight recorder, data captures are stored together with time stamps. Time
stamps are measured in seconds relative to the time base 01/01/1970. Time
stamps are interpreted appropriately by MATLAB or dSPACE experiment
software. You can change the time base using M-program code. For an example,
refer to MAT File Format for the Flight Recorder on page 87 or MAT File Format
for the USB Flight Recorder ( RTI USB Flight Recorder Blockset Reference).

Each entry is stored together with a time stamp indicating an absolute date and
time value with a resolution of 10.24 µs.

Startup behavior and The maximum data rate per application depends on the real-time platform, the
maximum data rate USB mass storage device and the number of running applications.

Using MicroAutoBox If the real‑time application is loaded to RAM, a data


rate of maximum 1 MB/s is possible without data loss. If the real‑time application
is loaded to flash memory, firstly a data rate of maximum 600 kB/s is possible
without data loss in the startup phase of MicroAutoBox which takes about 6
seconds. After the startup, a data rate of 1 MB/s is guaranteed, too.

Limitations using the USB Stopping the simulation Do not stop the simulation during recording, for
Flight Recorder example, by switching the simulation state from Run to Stop, and then to Run
again. If the data is not continuously recorded, time‑stamping might be
corrupted.

92
MicroAutoBox Features May 2018
Flight Recorder

Using a USB mass storage device There are some limitations when working
with a USB mass storage device:
§ It is recommended to use a separate USB mass storage device for flight
recording. Other files in the root folder of the device will be deleted by the
USB Flight Recorder.
§ Do not use a USB hub. The device must be directly connected to your
hardware.
§ Do not manually create or delete files while the USB device is used by an active
flight recorder.
§ Do not create subfolders on the USB device.

RTI/RTLib support Using RTI You can use the RTI blocks from the RTI USB Flight Recorder
blockset to write flight recorder data to the USB mass storage device, refer to
Components of the RTI USB Flight Recorder Blockset ( RTI USB Flight Recorder
Blockset Reference).

Using RTLib You can use the dsflrec_usb RTLib functions to write flight
recorder data to the USB mass storage device, refer to USB Flight Recorder
( USB Flight Recorder RTLib Reference).

Handling the Data of the USB Flight Recorder

Introduction The data recorded by the USB Flight Recorder can be handled via ControlDesk.

Loading data to the host PC After the simulation has finished, the recorded data can be downloaded to the
host PC.

If the USB device is connected to your hardware, you can use ControlDesk and
its specific functions for USB Flight Recorder handling to access the recorded
data. You can select several binary files to download and convert them to CSV or
MAT file format and to delete the binary files.

For further information, refer to How to Upload Flight Recorder Data Written to
a USB Mass Storage Device ( ControlDesk Measurement and Recording).

Alternatively, you can use an FTP client or the Windows Explorer to download
data from the USB mass storage device. Use ftp://<IP_Address> to connect
to your real-time hardware.

Note

Do not delete any files on the USB mass storage device while a flight
recorder session is still running.

For further information, refer to Accessing USB Flight Recorder files via FTP
in Basics on USB Flight Recorder on page 89.

93
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

If the USB device is directly connected to your PC, you can use ControlDesk's
functions to load and convert a single binary file. You can also use a standard file
manager, for example, the Windows Explorer, to copy the recorded binary files to
a local drive or to delete them from the USB device.

Note

See the section Avoiding data loss in Basics on USB Flight Recorder
on page 89 for information on how to safely remove the USB device from
your hardware.

For the handling of a great amount of binary files on the USB mass storage
device, or if there is no ControlDesk installed on the PC used for postprocessing
the flight recorder data, you can use a command line tool for merging, extracting
and converting several binary files, refer to Merging, Extracting and Converting
BIN Files of a Flight Recorder ( ControlDesk Measurement and Recording).

Related topics Basics

Basics on USB Flight Recorder ................................................................................................. 89

94
MicroAutoBox Features May 2018
Power Hold Control

Power Hold Control


Introduction You can control MicroAutoBox’s power hold feature via Simulink model or real-
time application. This way the MicroAutoBox is shut down after all termination
processes have finished.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Basics of Power Hold Control

Introduction You can control MicroAutoBox’s power hold feature by using RTLib functions or
Simulink blocks in your model. This way the MicroAutoBox is shut down after all
termination processes have finished.

Required connections § The Remote In signal must be connected to the ignition/driving switch (KL15).
§ The Vbat input must be permanently connected to the battery power (KL30).

Power hold control via RTLib To control MicroAutoBox’s power hold feature via RTLib functions, you have to
use the ds1401_power_hold_on and ds1401_power_hold_off functions. If the
Remote In signal is set to active low and the simulation state (simState) is set to
STOP, the program executes its termination. Finally, the MicroAutoBox is shut
down. For further information on simState, refer to Simulation Control
(RUN/STOP Mechanism) ( RTI and RTI-MP Implementation Guide).

95
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Power control via Simulink When a DS1401_POWER_DOWN block is triggered, it sets the simulation state
blocks (simState) to STOP and the termination code is executed. The
DS1401_POWER_DOWN block is typically triggered by the Remote In signal. If
the Remote In signal is set to low, MicroAutoBox is shutdown.

The Remote In signal can be accessed by:


§ DS1401_REMOTE_IN_BLx
§ DIO_TYPE1_REMOTE_IN_Mx

For details and preconditions, refer to DS1401_POWER_DOWN


( MicroAutoBox RTI Reference).

Note

To monitor the REMOTE In signal you can use the DS1401_REMOTE_IN_BLx


block. You must use another signal in your model to trigger the
DS1401_POWER_DOWN block. The remote signal can be handled via the
ZIF I/O connector or the power input connector. For further information,
refer to Basics on Connecting to Power Supply ( MicroAutoBox II
Hardware Installation and Configuration).

If you have one of the following MicroAutoBox variants, you can also use
the DIO_TYPE1_REMOTE_IN_Mx block:
§ MicroAutoBox II 1401/1501
§ MicroAutoBox II 1401/1504
§ MicroAutoBox II 1401/1505

The remote signal can then be monitored via the bit I/O signal group 3
channel 6 (pin M3).

Tip

You can check, whether the Remote In signal is available and connected
with the RTLib functions ds1401_remote_in_init and
ds1401_remote_in_read.

Switching off MicroAutoBox If you want to ensure that a combination of MicroAutoBox and RapidPro I/O
and RapidPro I/O subsystem subsystem powers down after the termination tasks of all the blocks in the
master application are finished, you can use the DS1401_POWER_DOWN block
in the same way as it is possible for a MicroAutoBox alone. For details, refer to
DS1401_POWER_DOWN ( MicroAutoBox RTI Reference).

Note

The Remote In hardware input pins (KL15) of the MicroAutoBox and the
RapidPro I/O subsystem must be connected.

96
MicroAutoBox Features May 2018
Power Hold Control

Related topics References

DIO_TYPE1_REMOTE_IN_Mx ( MicroAutoBox RTI Reference)


DS1401_POWER_DOWN ( MicroAutoBox RTI Reference)
DS1401_REMOTE_IN_BLx ( MicroAutoBox RTI Reference)
ds1401_remote_in_init ( MicroAutoBox RTLib Reference)
ds1401_remote_in_read ( MicroAutoBox RTLib Reference)

97
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

Onboard Sensors
Where to go from here Information in this section

Sensor for Acceleration Measurement .................................................... 98


To measure the acceleration of the board.

Sensor for Pressure Measurement ........................................................ 101


To measure the air pressure.

Sensor for Acceleration Measurement

Introduction The acceleration sensor of MicroAutoBox allows you to use the position and
movements of the system in your real-time application, for example, for vehicle
dynamics.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

✓1) – – – – – – – –
1) Board revision DS1401‑23 and later required.

Supported I/O board boot modes: not relevant

System PLD firmware version 1.4 and later required.

Measuring acceleration The acceleration sensor continuously measures the gravity on its three axes with
an adjustable output data rate of maximal 800 Hz.

If your MicroAutoBox is exactly horizontal, the acceleration sensor returns 1 for


the z‑axis and 0 for the x‑axis and the y‑axis. This means that a force of 1 g
impacts on the MicroAutoBox.

98
MicroAutoBox Features May 2018
Onboard Sensors

Thus, any static position or movement of the system can be detected and
calculated.
Earth gravity
Z

The following settings of the acceleration measurement can be configured


during initialization:
§ Measurement range
To specify the range for the expected gravity values.
§ Read mode
To specify whether to read only the most recent value or the entire buffer of
up to 512 values.
§ Output data rate
To specify the sample rate of the sensor.

Measurement range You have to specify the measurement range to fit the
expected measurement values. The lowest measurement range provides the
highest resolution. The resolution and the maximum acceleration values depend
on the configured data width of the sensor. The default configuration after
initialization uses a data width of 10 bits. This leads to the following values:

Measurement Range Max. Acceleration Max. Acceleration Resolution


Negative Direction Positive Direction
±2g ‑2.0000 g 1.9961 g 3.9 mg
±4g ‑4.0000 g 3.9922 g 7.8 mg
±8g ‑8.0000 g 7.9844 g 15.6 mg

Read mode You can specify whether to read only the most recent value or
the entire buffer of up to 512 values. Because each value provides information
on all the three axes, it is also called a value set. The measured value sets are
stored in a FIFO buffer from which they can be read and transferred to the
specified variables in your real‑time application. If you want to read the entire
FIFO buffer, each specified variable has to provide a size of at least 512 float
values.
Read access is controlled by the Count outport of the
DS1401_ACCEL_READ_BLx block or the ValueSetsReadCount parameter of
the ds1401_accel_sensor_xyz_axis_read function. The parameter returns
the number of currently available value sets in the FIFO buffer. If there is no new
value available since the last read operation, it returns zero and the values in your
variables are not overwritten.

Output data rate You can specify how often the acceleration sensor
measures a new value according to your requirements. For example, to detect

99
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

movements, the output data rate should be higher than the output data rate for
detecting only new positions. The maximum time interval for reading the values
before a buffer overflow happens directly depends on the specified output rate.

Rate Number Output Data Rate Max. Time Interval


Period Frequency
1 1.25 ms 800 Hz 0.64 s
2 2.5 ms 400 Hz 1.28 s
3 5 ms 200 Hz 2.56 s
4 10 ms 100 Hz 5.12 s
5 20 ms 50 Hz 10.24 s
6 80 ms 12.5 Hz 40.96 s
7 160 ms 6.25 Hz 81.92 s
8 640 ms 1.56 Hz 327.68 s

User configuration of the Using RTLib, you can directly access the registers from the acceleration sensor.
acceleration sensor This allows you to configure the sensor for specific purposes and to read the
measured data from the related data register. If you have configured the
acceleration sensor to use one of the two available interrupt lines, you can
receive the interrupt signal via the DS1401_INT_ACCEL_SENS interrupt provided
by the MicroAutoBox II base board (see also ds1401_set_interrupt_vector).

Note

§ Use the register access functions only if you are experienced in using the
features of the acceleration sensor.
For a detailed description of the available device registers, refer to the
data sheet of the acceleration sensor device MMA8453Q by Freescale
Semiconductor.
§ Do not reconfigure the acceleration sensor when using the
DS1401_ACCEL_READ_BLx block in a Simulink model.
§ If you reconfigure the acceleration sensor the
ds1401_accel_sensor_xyz_axis_read function might not return
correct values. You also have to use the register access functions to get
the measured values.

RTI/RTLib support You can access the acceleration sensor via RTI and RTLib. For details, see:
§ DS1401_ACCEL_READ_BLx ( MicroAutoBox RTI Reference)
§ Acceleration Measurement ( MicroAutoBox RTLib Reference)

100
MicroAutoBox Features May 2018
Onboard Sensors

Sensor for Pressure Measurement

Introduction The pressure sensor of MicroAutoBox allows you to consider the air pressure to
your real-time application, for example, for engine control.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓1) – – – – – – – –
1) Board revision DS1401‑23 and later required.

Supported I/O board boot modes: not relevant

System PLD firmware version 1.3 and later required.

Measuring air pressure The air pressure is continuously measured with a rate of approximately 200 Hz.
The measurement range is 50 … 115 kPa with a resolution of 1 kPa. The value is
returned as a float value.

RTI/RTLib support You can access the pressure sensor via RTI and RTLib. For details, see:
§ DS1401_PRESSURE_BLx ( MicroAutoBox RTI Reference)
§ Pressure Measurement ( MicroAutoBox RTLib Reference)

Related topics References

DS1401_PRESSURE_BLx ( MicroAutoBox RTI Reference)


ds1401_pressure_read ( MicroAutoBox RTLib Reference)

101
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features

102
MicroAutoBox Features May 2018
MicroAutoBox I/O Features

MicroAutoBox I/O Features

Introduction The following I/O features are supported by MicroAutoBox. For information on
which combination of MicroAutoBox Base board and MicroAutoBox I/O board is
supporting a specific feature, refer to the relevant feature description.

Where to go from here Information in this section

I/O Features and Boot Modes ............................................................... 105

Information on the I/O Module Availability ........................................... 110

A/D Conversion ................................................................................... 112

Bit I/O .................................................................................................. 143

D/A Conversion ................................................................................... 160

Ethernet I/O Interface .......................................................................... 167

ECU Interface ...................................................................................... 169

ECU Software Porting Kit ..................................................................... 178

PWM Signal Generation with a Variable Period .................................... 180

PWM Signal Generation with a Fixed Period ........................................ 210

Multi-Channel PWM Signal Generation (MC_PWM) ............................. 216

PWM Signal Measurement (PWM2D) ................................................... 250

Pulse Pattern Measurement ................................................................. 266

Pulse Width Measurement (PW2D) ...................................................... 282

Incremental Encoder Interface .............................................................. 290

Stepper Motor Control for EEC ............................................................ 306

103
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Information in other sections

Hardware Concept ................................................................................ 20

104
MicroAutoBox Features May 2018
I/O Features and Boot Modes

I/O Features and Boot Modes


Introduction Some features of the MicroAutoBox I/O boards depend on the specified boot
mode.

Where to go from here Information in this section

Basics on the Boot Modes .................................................................... 105

Chassis Control Boot Mode Features .................................................... 106

Drive Control Boot Mode Features ....................................................... 107

Extended Engine Control Boot Mode Features ..................................... 108

Basics on the Boot Modes

Introduction The boot mode is relevant to the DIO Type 1 module only. It is especially
responsible for the TPU functionalities. MicroAutoBox variants providing a DIO
Type 1 module are shown in the following table.

MicroAutoBox with I/O Boards


DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

✓ ✓ ✓ – – – – –

Boot mode Because the memory for the firmware in the TPU RAM is limited, the TPU
firmware is divided into some application-specific firmwares. By selecting the
purpose of your application, for example, implementing functions for extended
engine control or chassis control, you specify a specific TPU firmware to be
loaded to the TPU RAM when the board is booting. Most functions are available
in each supported boot mode, some functions are only enabled in a specific boot
mode.

Some general features of the Slave DIO MC, such as bit I/O, are available
independently from the selected boot mode.

105
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

The firmware to be loaded depends on the boot mode that you specify in RTI or
RTLib. The following boot modes are available:
§ Chassis control
Boot mode: chassis ctrl
§ Drives control (for center-aligned or edge-aligned synchronization of PWM
signals)
Boot modes: drives ctrl center aligned, drives ctrl edge
aligned
§ Extended engine control (for digital or inductive crankshaft sensors)
Boot modes: extended engine ctrl active sensor, extended engine
ctrl passive sensor

Using RTI, the DIO Type 1 blockset provides specific sublibraries for the boot
modes. RTI blocks that are only available in one sublibrary of the DIO Type 1
blockset are automatically configured with the related boot mode. RTI blocks
that are available in several sublibraries of the DIO Type 1 blockset must be
explicitly configured with the required boot mode. To facilitate the configuration,
the default is set to the boot mode that is valid for the sublibrary where you got
the RTI block from.

Using RTLib, each boot mode provides its own C functions. The function names
contain the abbreviation of the boot mode the function is to be used for. For
example, the initialization function for a PWM signal on a TPU in drives control
center aligned mode is called dio_tp1_dcca_tpu_pwm_init. The boot mode in
RTLib is to be specified by using the dio_tp1_com_init function (declared in
DIO1401Init.h). Functions that can be used in each of the boot modes, have
no specific boot mode abbreviation in their names.

Note

§ It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or
chassis control) within the same model. Thus, you must apply the same
boot mode throughout the whole RTI model running on the
MicroAutoBox.
§ The I/O mapping of the functions depends on the selected boot mode.

Chassis Control Boot Mode Features

Introduction The chassis control boot mode provides specific functions required for
implementing chassis control applications.

Specification of the boot With RTI, you specify the chassis control boot mode by selecting it in the RTI
mode block dialog. This is only relevant for RTI blocks of the DIO TYPE 1 blockset.

106
MicroAutoBox Features May 2018
I/O Features and Boot Modes

With RTLib, you specify the chassis control boot mode by using
DIO_TP1_CC_MODE as the Mode parameter of the dio_tp1_com_init function
(declared in DIO1401Init.h). This is only relevant for RTLib functions of the DIO
Type 1 module.

Available features for chassis For chassis control, the Slave DIO MC provides pulse generation and pulse
control (CC) pattern measurement functions using the Configurable Timer Module (CTM) and
the Time Processing Unit (TPU).

Chassis control comprises analog and digital signals used to control a lot of
functions in a vehicle. PWM inputs and outputs control valves and other
components like speed measurements, for example. Digital inputs and outputs
can be used to control relays or switches.

In chassis control mode the following features are available:


§ For detailed information on pulse pattern measurement on the CTM and the
TPU
§ See Pulse Pattern Measurement (PPM, FPW2D) on the CTM on page 266.
§ See Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC
on page 269.
§ For detailed information on PWM (frequency and duty cycle) measurement on
the TPU
§ See PWM Measurement (PWM2D) on the TPU for CC on page 253.
§ For detailed information on PWM generation with a fixed or variable period
§ See PWM Generation with a Variable Period (PWM_TPU_VP) on the TPU for
CC on page 186.
§ See PWM Generation with a Variable Period (PWM_VP) on the CTM
on page 184.
§ For detailed information on Bit I/O and A/D conversion
§ See Bit I/O Unit (DIO Type 1) on page 144.
§ See DIO Type 1 ADC Unit on page 130.

Drive Control Boot Mode Features

Introduction The drive control boot mode provides specific functions required for
implementing drive control applications.

Specification of the boot With RTI, you specify the drive control boot mode by selecting it in the RTI block
mode dialog. This is only relevant for RTI blocks of the DIO TYPE 1 blockset.

With RTLib, you specify the drive control boot mode by using
DIO_TP1_DC_EA_MODE or DIO_TP1_DC_CA_MODE as the Mode parameter of the
dio_tp1_com_init function (declared in DIO1401Init.h). This is only relevant
for RTLib functions of the DIO Type 1 module.

107
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Available features for drives For drives control, the Slave DIO MC provides pulse generation and pulse pattern
control center-aligned and measurement functions using the Configurable Timer Module (CTM) and the
drives control edge-aligned Time Processing Unit (TPU). Drives control provides multi-channel PWM functions
(DCCA and DCEA) that can operate in edge-aligned and center-aligned mode. Multi-channel PWM
functions allow a defined timing relationship between multiple PWM signals.

In drives control mode the following features are available:

For information on drives control edge-aligned multi-channel PWM generation


§ See Basics on Multi-Channel PWM Signal Generation (DCEA) on page 216 for
basic information.

For information on drives control center-aligned multi-channel PWM generation


§ See Basics on Multi-Channel PWM Signal Generation (DCCA) on page 219 for
reference information.

For pulse pattern measurement


§ Use Pulse Pattern Measurement (PPM, FPW2D) on the CTM on page 266.

For detailed information on Bit I/O and A/D conversion


§ See Bit I/O Unit (DIO Type 1) on page 144.
§ See DIO Type 1 ADC Unit on page 130.

Extended Engine Control Boot Mode Features

Introduction The extended engine control boot mode provides specific functions required for
implementing engine control applications.

Specification of the boot For extended engine control there are two different boot modes available. If you
mode use digital crankshaft sensors, you must specify the boot mode for active
sensors, if you use inductive crankshaft sensors, you must specify the boot mode
for passive sensors.

Boot modes: extended engine ctrl active sensor, extended engine


ctrl passive sensor

With RTI, you specify the engine control boot mode by selecting it in the RTI
block dialog. This is only relevant for RTI blocks of the DIO TYPE 1 blockset.

With RTLib, you specify the engine control boot mode by using
DIO_TP1_EEC_AS_MODE or DIO_TP1_EEC_PS_MODE as the Mode parameter of
the dio_tp1_com_init function (declared in DIO1401Init.h). This is only
relevant for RTLib functions of the DIO Type 1 module.

108
MicroAutoBox Features May 2018
I/O Features and Boot Modes

Available features for Extended engine control provides the following features for pulse generation and
extended engine control measurement:
(EEC)
For information on pulse generation with a fixed period and a run-time
adjustable duty cycle
§ See PWM Generation with a Fixed Period (PWM_FP) for EEC on page 210.

For information on pulse generation with a fixed period and a run-time


adjustable duty cycle via the TPU
§ See PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC
on page 213.

For information on pulse generation with a run-time adjustable period and duty
cycle
§ See PWM Generation with a Variable Period (PWM_VP) on the CTM
on page 184.

For information on pulse pattern measurement of square-wave signals


§ See Pulse Pattern Measurement (PPM, FPW2D) on the CTM on page 266.

For detailed information on Bit I/O and A/D conversion


§ See Bit I/O Unit (DIO Type 1) on page 144.
§ See DIO Type 1 ADC Unit on page 130.

109
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Information on the I/O Module Availability


Introduction The I/O features are provided by special I/O modules. Depending on the
MicroAutoBox variant different numbers of the I/O modules are available.

Overview of the Number of Available I/O Modules

Introduction Depending on the MicroAutoBox variant different numbers of the I/O modules
are available. Usually, there is only one I/O module representing a certain type of
I/O feature, but some I/O modules are available up to four times.

Using RTI If you use the RTI Blockset of MicroAutoBox (RTI1401), the Module number
setting specifies the I/O module you want to use for the selected I/O feature. For
example, if there are two CAN Type 1 modules available, you can specify
whether to use the first or second CAN Type 1 module.

Using RTLib If you use the RTLib1401, the ModuleAddr parameter specifies the I/O module
you want to use for the selected I/O feature. For example, if there are two CAN
Type 1 modules available, you can specify whether to use the first or second CAN
Type 1 module.

I/O Modules of MicroAutoBox Below is a table with the numbers of I/O modules when using MicroAutoBox.

I/O Boards
I/O Modules
DS1505/DS1507

DS1511/DS1512

DS1511/DS1514

DS1512/DS1513

DS1513/DS1514
DS1501

DS1504

DS1507

DS1511

DS1513

ADC Type 1 1 1 1 – – – – – – –
ADC Type 3 – 1 – – – – – – – –
ADC Type 4 – – – – 1 1 1 1 1 1
AIO Type 1 – – – – – – – 1 1 1
DAC Type 1 1 – 1 – – – – – – –
DAC Type 3 – – – – 1 1 1 – – –
DIO Type 1 1 1 1 – – – – – – –
DIO Type 3 – – – – 1 1 1 – – –
DIO Type 4 – – – – – – – 1 1 1

110
MicroAutoBox Features May 2018
Information on the I/O Module Availability

I/O Boards
I/O Modules

DS1505/DS1507

DS1511/DS1512

DS1511/DS1514

DS1512/DS1513

DS1513/DS1514
DS1501

DS1504

DS1507

DS1511

DS1513
ECU Type 11) 3 – 4 3 2 2 2 2 2 2
CAN Type 1 1 2 2 2 2 2 2 3 3 3
SER Type 12) 1 1 2 2 2 2 2 3 3 3
IP Type 13) – – 2 2 – 2 2 2 – 2
FPGA Type 1 – – – – – 1 1 1 – 1
1) For further information, refer to Hardware on page 170.
2) The SER Type 1 module realizes the serial interface support based on the CAN Type 1 module.
3) Supports standard IP modules, third-party FlexRay IP modules, DS4340 FlexRay Interface Modules, or
DS4342 CAN FD Interface Modules.

111
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

A/D Conversion
Where to go from here Information in this section

Overview of the A/D Conversion Units ................................................. 112

ADC Unit Type 1 .................................................................................. 114

ADC Unit Type 3 .................................................................................. 115

ADC Unit Type 4 .................................................................................. 117

AIO Unit Type 1 (ADC) ......................................................................... 128

DIO Type 1 ADC Unit ........................................................................... 130

ADC 1552 Type 1 Unit ......................................................................... 133

ADC 1552 Type 2 Unit ......................................................................... 140

Overview of the A/D Conversion Units

Introduction The MicroAutoBox variants provide various A/D conversion units.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
ADC Unit
DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

ADC Type 1 ✓ ✓ ✓ – – – – –
ADC Type 3 – ✓ – – – – – –
ADC Type 4 – – – – ✓ – ✓ –
AIO Type 1 ADC – – – – – – ✓ –
DIO Type 1 ADC ✓ ✓ ✓ – – – – –
ADC 1552 Type 1 – – – – – ✓1) – ✓1)
ADC 1552 Type 2 – – – – – ✓1) – ✓1)
1) Requires DS1552 Multi-I/O Module

112
MicroAutoBox Features May 2018
A/D Conversion

Overview of the The main characteristics of the ADC units are listed below.
characteristics

Characteristics ADC Type 1 ADC Type 3 ADC Type 4 AIO Type 1 DIO Type 1 ADC 1552 ADC 1552
ADC ADC Type 1 Type 2
Number of 4 2 16 16 1 8 16
converters
Channels per 4 4 1 1 16 1 1
converter
Resolution 12 bit 12 bit 16 bit 16 bit 10 bit 16 bit 16 bit
Conversion time 6.6 µs 6.6 µs 1 µs 4 µs Adjustable 1 µs 4 µs
(1 … 8 µs)
Simultaneous start Converter-wise Converter- Yes No No Yes No
via software wise
Burst conversion No No Yes No No No No
Interrupt No No § Burst start No No § Data ready No
generation § Data ready § Conversion
§ Conversion trigger
trigger overflow
overflow § Data lost
§ Data lost

Related topics Basics

ADC 1552 Type 1 Unit .......................................................................................................... 133


ADC 1552 Type 2 Unit .......................................................................................................... 140
ADC Unit Type 1 ................................................................................................................... 114
ADC Unit Type 3 ................................................................................................................... 115
ADC Unit Type 4 ................................................................................................................... 117
AIO Unit Type 1 (ADC) .......................................................................................................... 128
DIO Type 1 ADC Unit ............................................................................................................ 130

113
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

ADC Unit Type 1

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes: not relevant

Characteristics The ADC Unit Type 1 consists of 4 parallel A/D converters, multiplexed to 4
channels each with 12‑bit resolution, 6.6 μs total conversion time for all
channels, and simultaneous sample/hold on all channels. The input signals of the
A/D converters can be selected by four 4:1 input multiplexers. All inputs have a 0
… +5 V voltage, low pass input filters (1st order / 3 dB at 10 kHz), 225-kΩ input
impedance (±1%), and 40 V overvoltage protection.

Using RTI1401 blockset § Within your model, you can only use RTI blocks for A/D conversion that are
specified for different A/D converters. It is not allowed to insert two RTI blocks
which are assigned to the same A/D converter.
§ The A/D channels of one A/D converter sample the values simultaneously, but
the conversion is done sequentially.
§ A simultaneous start of A/D converters is not possible via software. There is
always a time delay depending on your model.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

A/D Converter Channel Signal I/O Connector Pin


1 1 ADC Type 1 Con 1 Ch 1 c1
2 ADC Type 1 Con 1 Ch 2 a1
3 ADC Type 1 Con 1 Ch 3 Y1
4 ADC Type 1 Con 1 Ch 4 W1
2 1 ADC Type 1 Con 2 Ch 1 b1
2 ADC Type 1 Con 2 Ch 2 Z1
3 ADC Type 1 Con 2 Ch 3 X1
4 ADC Type 1 Con 2 Ch 4 V1

114
MicroAutoBox Features May 2018
A/D Conversion

A/D Converter Channel Signal I/O Connector Pin


3 1 ADC Type 1 Con 3 Ch 1 b2
2 ADC Type 1 Con 3 Ch 2 Z2
3 ADC Type 1 Con 3 Ch 3 X2
4 ADC Type 1 Con 3 Ch 4 V2
4 1 ADC Type 1 Con 4 Ch 1 a2
2 ADC Type 1 Con 4 Ch 2 Y2
3 ADC Type 1 Con 4 Ch 3 W2
4 ADC Type 1 Con 4 Ch 4 U2

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112

References

ADC Unit Type 1 ( MicroAutoBox RTLib Reference)


ADC_TYPE1_Mx_CONy ( MicroAutoBox RTI Reference)

ADC Unit Type 3

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – ✓ – – – – – –

Supported I/O board boot modes: not relevant

115
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics The ADC Unit Type 3 consists of 2 parallel A/D converters, multiplexed to 4
channels each with 12‑bit resolution, 6.6 μs total conversion time for all
channels, and simultaneous sample/hold on all channels. The input signals of the
A/D converters can be selected by two 4:1 input multiplexers. All inputs have a 0
… +5 V voltage, low pass input filters (1st order / 3 dB at 10 kHz), 225-kΩ input
impedance (±1%), and 40 V overvoltage protection.

Using RTI1401 blockset § Within your model, you can only use RTI blocks for A/D conversion that are
specified for different A/D converters. It is not allowed to insert two RTI blocks
which are assigned to the same A/D converter.
§ The A/D channels of one A/D converter sample the values simultaneously, but
the conversion is done sequentially.
§ A simultaneous start of A/D converters is not possible via software. There is
always a time delay depending on your model.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

A/D Converter Channel Signal I/O Connector Pin


1 1 ADC Type 3 Con 1 Ch 1 D1
2 ADC Type 3 Con 1 Ch 2 C1
3 ADC Type 3 Con 1 Ch 3 B1
4 ADC Type 3 Con 1 Ch 4 A1
2 1 ADC Type 3 Con 2 Ch 1 D2
2 ADC Type 3 Con 2 Ch 2 C2
3 ADC Type 3 Con 2 Ch 3 B2
4 ADC Type 3 Con 2 Ch 4 A2

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112

References

ADC Unit Type 3 ( MicroAutoBox RTLib Reference)


ADC_TYPE3_Mx_CONy ( MicroAutoBox RTI Reference)

116
MicroAutoBox Features May 2018
A/D Conversion

ADC Unit Type 4

Configurable A/D converter The ADC Unit Type 4 provides A/D converters that can be configured for various
use cases. The features are described in detail.

Where to go from here Information in this topic

Hardware and boot mode requirements ................................................................................ 117


Characteristics ...................................................................................................................... 117
Swinging Buffer .................................................................................................................... 118
Trigger signals ....................................................................................................................... 119
Burst triggered sample mode ................................................................................................ 120
Burst continuous sample mode ............................................................................................. 121
Single conversion mode ........................................................................................................ 122
Methods of reading conversion results .................................................................................. 122
Time-stamping mode ............................................................................................................ 124
Interrupts provided by the ADC Type 4 module ..................................................................... 124
I/O mapping ......................................................................................................................... 127

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – ✓ –

Supported I/O board boot modes: not relevant

Characteristics The ADC Unit Type 4 module consists of 16 parallel A/D converters. The A/D
converters of a MicroAutoBox variant with a DS1511 or DS1513 I/O board are
equipped with single-ended inputs and particularly meet the requirements for
digitizing analog input signals at high sampling rates, for example, for measuring
internal cylinder pressures.

Each of the 16 A/D conversion channels provides:


§ A single-ended input with a sample&hold unit
§ 16-bit resolution and a maximum conversion time of 500 ns
§ The applicable input voltage range depends on the I/O board used:
§ DS1511: 0 … +5 V
§ DS1511B1: ‑10 … +10 V
§ DS1513: ‑10 … +10 V

117
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

If the specified input voltage range does not suit to the connected hardware,
the real‑time application stops with an error message.
The board versions are printed on a type plate on the bottom of your
MicroAutoBox.
§ Burst mode for digitizing a data set of up to 8192 analog values per burst:
§ Triggered sample mode with selectable trigger source for starting the bursts
and A/D conversions (see Burst triggered sample mode on page 120).
§ Continuous sample mode with automatically started successive bursts and
A/D conversions (see Burst continuous sample mode on page 121).
§ Single A/D conversion mode to use the channel as a standard A/D converter
without utilizing its burst capability (see Single conversion mode on page 122).
§ Time-stamping mode to use a pair of channels for storing time stamps with a
resolution of 10 ns (see Time-stamping mode on page 124).
§ Selectable sources for triggering A/D conversions, for example, external trigger
input, channel timer or software trigger (see Trigger signals on page 119).
§ Swinging buffers for decoupling the conversion process from the read process
(see Swinging Buffer on page 118).
§ Four independent hardware interrupts associated to the A/D conversion state.
For information on ADC Type 4 interrupt handling, see Interrupts provided by
the ADC Type 4 module on page 124.

Swinging Buffer Each A/D conversion channel features a swinging buffer for decoupling the write
buffer and the read buffer.

Free buffer

Application Read buffer Write buffer A/D converter unit


running on the
processor board

Swinging buffer principle The swinging buffer, comprising a write, a free,


and a read buffer, passes all conversion results from the A/D converter unit to the
application running on MicroAutoBox. The buffers can change places, as
indicated by the arrows between them in the illustration above. This is
implemented by pointer management, so that no buffer needs to be copied from
one position to another. The events which trigger the buffer exchange are
described below. The number of temporarily stored conversion results, the burst
size, can be uniformly specified in the range 1 … 8192.

Write buffer The A/D converter unit writes the conversion results to the
write buffer until it is filled to the specified burst size. When this event occurs,
the write buffer changes places with the free buffer, which is then filled with
new conversion results.

Read buffer The application running on MicroAutoBox reads the conversion


results from the read buffer. Before the conversion results are transferred, the
read function used in the application requests a read buffer.

118
MicroAutoBox Features May 2018
A/D Conversion

Depending on the read method used by the application,


§ The current conversion results in the read buffer are transferred immediately.
or
§ The A/D conversion function waits until the buffer control unit exchanges the
read buffer with the free buffer containing new conversion results.
For more information on the read methods, refer to Methods of reading
conversion results on page 122.
If the application does not read the conversion results fast enough, it can happen
that the free buffer, containing new results, is overwritten by the write buffer
before it could become the read buffer. In this case a data lost interrupt is
generated on the channel (if the generation of the data lost interrupt was
initialized beforehand).

Trigger signals To configure an A/D converter channel of the ADC Type 4 module, up to two
kinds of triggers must be selected.

Burst trigger

Burst

Conversion
trigger
Conversion time

Burst trigger A burst trigger initiates a sequence of A/D conversions, called a


conversion burst. You select the burst trigger by assigning a burst trigger source
to a converter channel, for example, an external trigger input.

Conversion trigger The conversion trigger starts every A/D conversion with
one conversion result per trigger. You select the conversion trigger by assigning a
conversion trigger source, such as the channel timer to a converter channel.

Starting a conversion burst You need a burst trigger and a conversion


trigger for every burst. One burst trigger has to initiate the burst. Then the
conversion triggers have to start the A/D conversions. The burst ends, controlled
by the buffer control unit, when the number of A/D conversion results in the
write buffer has reached the specified burst size.

Trigger control When a burst is running, additional burst triggers are


ignored. When no burst is running, conversion triggers are ignored.
If a conversion is in progress and has not completed before another conversion
trigger occurs, this trigger is ignored, and a conversion trigger overflow interrupt
is generated (if the generation of the conversion trigger overflow interrupt was

119
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

initialized beforehand). For more information, refer to Interrupts provided by the


ADC Type 4 module on page 124.

Trigger sources An ADC Type 4 conversion channel can react to the


following trigger sources:
§ 4 external trigger inputs
§ Individual channel timer for each channel
§ Software trigger (using RTLib) and sample base rate (using RTI).

External trigger The external trigger inputs can be used with a maximum
frequency of 1 MHz according to the conversion time of 1 µs. For detailed
information on the electrical characteristics, refer to:
§ Data Sheet MicroAutoBox II 1401/1511 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1511/1512 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1512/1513 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1513 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1513/1514 ( MicroAutoBox II Hardware
Installation and Configuration)

Burst triggered sample mode Each burst is started by the trigger event according to the selected burst trigger
source. The burst is finished if the specified number of A/D conversions was
executed. Then the conversion channel waits for the next burst trigger before
starting a new burst conversion.

Burst trigger

Conversion trigger
Burst trigger interval interval

...

t
Conversion trigger Conversion trigger

Burst Burst

Data ready Data ready

The figure shows the behavior when you use an external trigger input for the
conversion trigger. The minimum delay between the burst trigger and the first

120
MicroAutoBox Features May 2018
A/D Conversion

conversion trigger in the burst must be 75 ns. Otherwise the first conversion will
not be started.

With a timer as conversion trigger, the burst trigger and the first conversion
trigger in the burst have no time delay.

The conversion results can be read after a burst has completely finished or was
stopped before the last A/D conversion was executed. There are three methods
of reading the conversion results. For details, refer to Methods of reading
conversion results on page 122.

Burst continuous sample Only the first burst must be started by a trigger event according to the selected
mode burst trigger source. Successive bursts are started automatically. After a burst is
finished, the next burst is started immediately after the last A/D conversion of the
previous burst. No further burst triggers are required.

Using the RTI Blockset, the initial burst trigger is performed internally if the
continuous sample mode is set.

The A/D conversions within the bursts are performed according to the selected
conversion trigger source.

Internal start of successive bursts


Burst trigger

Conversion trigger
interval

...

t
Conversion trigger Conversion trigger

Burst Burst
Data ready Data ready

The figure shows the behavior when you use an external trigger input for the
conversion trigger. The minimum delay between the burst trigger and the first
conversion trigger must be 75 ns. Otherwise the first conversion will not be
started.

With a timer as conversion trigger, the burst trigger and the first conversion
trigger have no time delay.

The conversion results can be read after a burst has completely finished or was
stopped before the last A/D conversion was executed. There are three methods
of reading the conversion results. For details, refer to Methods of reading
conversion results on page 122.

121
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Single conversion mode In single conversion mode, the burst capabilities of an ADC Type 4 conversion
channel are not used. The conversion channels work as standard A/D converters
for converting a single value after receiving a conversion trigger. Each trigger
event produces one conversion result which can be read immediately after its
conversion time.

Conversion ...
trigger

Data ready

Conversion time

Methods of reading The RTI Blockset and the RTLib functions offer different methods of reading the
conversion results A/D conversion results.

Using the polling method The first method to read new conversion results
is to use read functions, which causes the application to wait until new
conversion results are available. This is the polling method.
§ RTI Blockset
The RTI Blockset uses this method in the configurations shown in the table
below.
§ RTLib offers the following polling functions:
§ adc_tp4_burst_new_read
§ adc_tp4_single_new_read

Note

As this read-out method polls for a new buffer with A/D conversion
results, it is important that the required number of A/D conversions is
triggered by the selected conversion trigger source. Otherwise the
application remains in the internal polling loop and hangs up.

Using the data ready interrupt The second method of reading new
conversion results is to use the data ready interrupt indicating that the
conversion has finished.
Using the data ready interrupt is the most efficient way to read new conversion
results. This method is recommended for use in applications that require fast
response.
The data ready interrupt indicates that a single conversion or a burst of A/D
conversions has finished and the new conversion results can be read using a non-

122
MicroAutoBox Features May 2018
A/D Conversion

polling read method. The interrupt must be made available by adding an


ADC_TYPE4_HWINT_BLxADC_CLASS1_HWINT_BLx block to your Simulink
model. The
adc_tp4_data_ready_int_enableAdcCl1AnalogIn_setInterruptMode
function enables the interrupt in your handcoded C application and with the
dssint_xxx functions they can be handled.
The RTI block which reads the conversion results and other functions you want to
react to the interrupt must be embedded in a subsystem driven by the data ready
interrupt. In handcoded C applications, the reading functions and other
functions are generally placed in the interrupt service routine. For details on the
MicroAutoBox interrupts, refer to Interrupt Handling on page 53.

Using the non-polling method The third method is to read conversion


results immediately without waiting for a finished conversion. You can also read
old conversion results with this non-polling method.
This reading method uses read functions which do not poll internally for the
availability of a read buffer with new conversion results. The current read buffer
is read instead. The required information on whether a buffer was read
repeatedly or a buffer with new conversion results was read is indicated by an
RTI block output or a flag as a parameter of the RTLib function.
§ RTI Blockset
The RTI Blockset uses this method in the configurations shown in the table
below.
§ RTLib offers the following functions which read the current buffer and provide
the buffer state:
§ adc_tp4_burst_current_read
§ adc_tp4_burst_immediate_read
§ adc_tp4_single_current_read
To avoid reading the current conversion results repeatedly until a new read buffer
is available, the RTLib alternatively offers the adc_tp4_data_ready function,
which only queries if a new buffer is available but does not read the conversion
results.

Read methods used with RTLib and RTI With RTLib, you can implement a
read method by using the appropriate RTLib functions. With RTI, the specified
block settings determine the read method. Because there is no visible hint in the
block's dialog, the following table shows you which settings result in which read
method.

Conversion Mode Burst Trigger Conversion Trigger Read Method


Single conversion (Continuous) Sample base rate (ADC) Polling
Sample base rate (ADCSTART) Non-polling
External trigger Non-polling

123
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Conversion Mode Burst Trigger Conversion Trigger Read Method


Burst conversion Sample base rate (ADC) Timer Polling
External trigger Non-polling
Sample base rate Timer Non-polling
(ADCSTART) External trigger Non-polling
External trigger Sample base rate (ADC) Non-polling
Sample base rate (ADCSTART) Non-polling
Timer Non-polling
External trigger Non-polling
Continuous Sample base rate (ADC) Non-polling
Sample base rate (ADCSTART) Non-polling
Timer Non-polling
External trigger Non-polling
§ Sample base rate (ADC) means that the ADC_TYPE4_BLx block triggers the conversion start and burst start.
§ Sample base rate (ADCSTART) means that the ADC_TYPE4_START_BLx block triggers the conversion start and
burst start.

Time-stamping mode In time-stamping mode, the free-running 32-bit counter of the time-stamping
unit is used to store time stamps of specific A/D conversions. To store the 32-bit
value, you need two additional channels. The first channel stores the lower 16
bits of the time stamp, and the second channel stores the higher 16 bits of the
time stamp. These two channels are not available for A/D conversion.

The time-stamping channels must be identically configured to the A/D channel


for which you want to get the time stamps. A time stamp is captured when the
related A/D channel captures data.

The time-stamp counter increments every 10 ns. Your implementation has to


handle a counter overflow.

Note

The time-stamping mode is supported by RTLib only. Refer to


adc_tp4_timestamping_mode_set ( MicroAutoBox RTLib Reference).

Interrupts provided by the The hardware interrupts from the ADC Type 4 module are used to trigger
ADC Type 4 module interrupt-driven tasks which are executed on MicroAutoBox.

To be used, an interrupt must be enabled. The functions you want to trigger by


interrupt must be embedded in an interrupt-driven subsystem. For instructions
on doing this, refer to Tasks Driven by Interrupt Blocks ( RTI and RTI-MP
Implementation Guide).

The interrupt which is to trigger the subsystem must be made available using the
ADC_TYPE4_HWINT_BLx block. The appropriate channel number and the

124
MicroAutoBox Features May 2018
A/D Conversion

respective interrupt specification in the block's dialog have to be selected. The


model must contain an ADC_TYPE4_BLx block using the specified channel.

Note

You need a separate ADC_TYPE4_HWINT_BLx block for each interrupt that


you want to use on a conversion channel.

Burst start interrupt The burst start interrupt is provided by the A/D
converters, one per channel.
For burst conversion mode, the interrupt shows that a conversion burst has
started.
Triggered sample mode

Burst trigger

...

t
Conversion trigger Conversion trigger

Burst Burst

Data ready Data ready

Burst start interrupt Burst start interrupt

Continuous sample mode


Internal start of successive bursts
Burst trigger

...

t
Conversion trigger Conversion trigger

Burst Burst
Data ready Data ready

Burst start interrupt Burst start interrupt

The two figures above show the behavior when you use an external trigger input
for the conversion trigger. The minimum delay between the burst trigger and the

125
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

first conversion trigger must be 75 ns. Otherwise the first conversion will not be
started.
With a timer as conversion trigger, the burst trigger and the first conversion
trigger have no time delay.
The interrupt can be made available for single conversion mode, but it is of no
relevance for possible use cases.

Data ready interrupt The data ready interrupt is provided by the A/D
converters, one per channel.
For burst conversion mode, the interrupt shows that a conversion burst has
finished and the new conversion results are available. If a burst is terminated
before it has reached the number of specified conversions, the interrupt is
generated when the current conversion has finished and the incomplete
conversion results are available.
For single conversion mode, the interrupt shows that a conversion has finished
and the new conversion result is available.

Burst mode Single mode

Burst trigger

Burst

Conversion
trigger

t t

Conversion
trigger
Conversion time Conversion time

Data ready interrupt Data ready interrupt

Data lost interrupt The data lost interrupt is provided by the A/D converters,
one per channel.
The interrupt shows that a filled free buffer in the swinging buffer was
overwritten by new conversion results before the old conversion results could be
read. This condition occurs if conversion bursts are started more frequently than
the buffers are read. For more information on the swinging buffer, refer to
Swinging Buffer on page 118.

Conversion trigger overflow interrupt The conversion trigger overflow


interrupt is provided by the A/D converters, one per channel.

126
MicroAutoBox Features May 2018
A/D Conversion

The interrupt shows that a conversion trigger was received before the preceding
conversion finished. The conversion trigger is ignored.

Conversion Conversion
trigger trigger

Conversion time

Conversion trigger
overflow

Note

A conversion trigger overflow can occur if:


§ The signal of the specified external trigger source is noisy.
§ The conversion trigger signal period is lower than the conversion time.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

A/D Converter Channel Signal I/O Connector Pin


1 1 Analog ch 1 Z3
2 2 Analog ch 2 Y3
3 3 Analog ch 3 X3
4 4 Analog ch 4 W3
5 5 Analog ch 5 Z4
6 6 Analog ch 6 Y4
7 7 Analog ch 7 X4
8 8 Analog ch 8 W4
9 9 Analog ch 9 Z5
10 10 Analog ch 10 Y5
11 11 Analog ch 11 X5
12 12 Analog ch 12 W5
13 13 Analog ch 13 Z6
14 14 Analog ch 14 Y6
15 15 Analog ch 15 X6
16 16 Analog ch 16 W6

127
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

A/D Converter Channel Signal I/O Connector Pin


Additional relevant signals1)
External trigger input 1 Ana trigger 1 a3
External trigger input 2 Ana trigger 2 a4
External trigger input 3 Ana trigger 3 a5
External trigger input 4 Ana trigger 4 a6
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112


Tasks Driven by Interrupt Blocks ( RTI and RTI-MP Implementation Guide)

References

ADC Unit Type 4 ( MicroAutoBox RTLib Reference)


ADC_TYPE4_BLx ( MicroAutoBox RTI Reference)
ADC_TYPE4_HWINT_BLx ( MicroAutoBox RTI Reference)
ADC_TYPE4_START_BLx ( MicroAutoBox RTI Reference)

AIO Unit Type 1 (ADC)

Standard A/D converter The AIO Unit Type 1 provides A/D converters that can be configured for various
use cases. The features are described in detail.

128
MicroAutoBox Features May 2018
A/D Conversion

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics The AIO Unit Type 1 consists of 16 parallel A/D converters. They are equipped
with single-ended inputs and particularly meet the standard requirements for
digitizing analog input signals.

Each of the 16 A/D conversion channels provides:


§ Single-ended inputs (negative inputs are internally connected to GND)
§ 16-bit resolution and a maximum conversion time of 4 µs
§ Maximum sample rate of 200 KSPS
§ An input voltage range of -10 … +10 V

Conversion behavior After starting the A/D conversion, the incoming signals are continuously
converted in the interval of the sample rate and can be read from a register.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector
(DS1513 ZIF connector):

A/D Converter Channel Signal1) I/O Connector Pin


1 1 AnalogIn ch 1 V3
2 2 AnalogIn ch 2 U3
3 3 AnalogIn ch 3 T3
4 4 AnalogIn ch 4 S3
5 5 AnalogIn ch 5 V4
6 6 AnalogIn ch 6 U4
7 7 AnalogIn ch 7 T4
8 8 AnalogIn ch 8 S4
9 9 AnalogIn ch 9 V5
10 10 AnalogIn ch 10 U5
11 11 AnalogIn ch 11 T5
12 12 AnalogIn ch 12 S5
13 13 AnalogIn ch 13 V6

129
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

A/D Converter Channel Signal1) I/O Connector Pin


14 14 AnalogIn ch 14 U6
15 15 AnalogIn ch 15 T6
16 16 AnalogIn ch 16 S6
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112

References

ADC 1552 Type 2 Unit for DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)
AIO_TYPE1_ADC_BLx ( MicroAutoBox RTI Reference)

DIO Type 1 ADC Unit

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

130
MicroAutoBox Features May 2018
A/D Conversion

Boot mode restriction Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Characteristics The ADC unit of the Slave DIO MC consists of one A/D converter, providing 16
channels each with 10-bit resolution. The conversion time setting can be selected
for each channel separately (1, 2, 4 or 8 µs).

When n channels are converted, the complete conversion time is calculated by


the following formula:

TotalConversionTime = 8 µs + n·ConversionTimeValue + n·1 µs

The following table shows calculated examples:

Channels Conversion Time Value [µs] Total Conversion Time [µs]


1 1 10
16 8 152

All inputs have a 0 … +5 V voltage. The input signals can be converted to


unipolar signals. Using RTI blocks, the DIO processor updates the A/D values on
demand (for DIO_TYPE1_ADC_RE_Mx) or converts the values in the background,
generates an interrupt, transfers the data to the DPMEM and restarts conversion
(for DIO_TYPE1_ADC_FA_Mx).

Note

§ The MicroAutoBox provides only unipolar ADC inputs.


§ Only if the capacitor, that will activate the sample&hold unit, is energized
sufficiently, you can work with a conversion time setting of 1 μs.
Otherwise you must specify a longer conversion time.

RTI blockset The EXTENDED ENGINE CONTROL, CHASSIS CONTROL, DRIVES CONTROL
CENTER ALIGNED and DRIVES CONTROL EDGE ALIGNED libraries provide the
blocks DIO_TYPE1_ADC_FA_Mx ( MicroAutoBox RTI Reference) and
DIO_TYPE1_ADC_RE_Mx ( MicroAutoBox RTI Reference) for A/D conversion.

There are two possibilities to measure the ADC channels:


§ The fast read method performs an interrupt (depending on the conversion
time) on the slave processor to read the channels. When you measure a
smaller number of channels the conversion time would be rather short and
therefore a lot of interrupts would be generated. This would burden the slave

131
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

DIO MC. To avoid this communication overhead you should use the fast read
only when measuring a larger number of channels.
§ With the second method, the interrupts on the slave processor are generated
only when values are requested. You should use this method when measuring
a smaller number of channels.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

Unit Channel Signal I/O Connector Pin Shared I/O Connector Pin
with Bit I/O
DIO Type 1 ADC 1 Analog 1 Group 5 ch 1 a6
(FA/RE) 2 Analog 2 Group 5 ch 2 b3
3 Analog 3 Group 5 ch 3 b4
4 Analog 4 Group 5 ch 4 b6
5 Analog 5 Group 5 ch 5 c3
6 Analog 6 Group 5 ch 6 c4
7 Analog 7 Group 5 ch 7 c5
8 Analog 8 Group 5 ch 8 c6
9 Analog 9 Group 4 ch 1 Y3
10 Analog 10 Group 4 ch 2 Y4
11 Analog 11 Group 4 ch 3 Y6
12 Analog 12 Group 4 ch 4 Z3
13 Analog 13 Group 4 ch 5 Z4
14 Analog 14 Group 4 ch 6 Z6
15 Analog 15 Group 4 ch 7 a3
16 Analog 16 Group 4 ch 8 a4

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

132
MicroAutoBox Features May 2018
A/D Conversion

Related topics Basics

Data Transfer Mechanism ....................................................................................................... 44


Hardware Concept ................................................................................................................. 20
Overview of the A/D Conversion Units .................................................................................. 112

References

DIO_TYPE1_ADC_FA_Mx ( MicroAutoBox RTI Reference)


DIO_TYPE1_ADC_RE_Mx ( MicroAutoBox RTI Reference)
Slave DIO MC ADC Unit ( MicroAutoBox RTLib Reference)

ADC 1552 Type 1 Unit

Configurable A/D converter The ADC Type 1 unit of the DS1552 Multi-I/O Module (abbreviated as ADC 1552
Type 1) provides A/D converters that can be configured for various use cases. The
features are described in detail.

Where to go from here Information in this topic

Hardware and boot mode requirements ................................................................................ 133


Characteristics ...................................................................................................................... 134
Swinging Buffer .................................................................................................................... 134
Trigger signals ....................................................................................................................... 135
Single conversion mode ........................................................................................................ 136
Methods of reading conversion results .................................................................................. 136
Interrupts provided by the ADC 1552 Type 1 unit .................................................................. 137
I/O mapping ......................................................................................................................... 139

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

133
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics The ADC 1552 Type 1 unit consists of 8 parallel A/D converters. They are
equipped with single-ended inputs and particularly meet the requirements for
digitizing analog input signals at high sample rates, for example, for measuring
internal cylinder pressures.

Each of the 8 A/D conversion channels provides:


§ Single-ended inputs
(Separated GND pin as reference for each ADC channel, internally connected
to GND plane)
§ 16-bit resolution and a maximum conversion time of 1 µs
§ Maximum sample rate of 1 MSPS
§ The applicable input voltage range depends on the I/O module used:
§ DS1552: 0 … +5 V
§ DS1552B1: ‑10 … +10 V
If the specified input voltage range does not suit to the connected hardware,
the real‑time application stops with an error message.
If the DS1552 module has been installed by dSPACE, the board versions are
printed on a type plate on the bottom of your MicroAutoBox.
§ Single A/D conversion mode to use the channel as a standard A/D converter
(see Single conversion mode on page 136).
§ Selectable sources for triggering A/D conversions, for example, external trigger
input, channel timer or software trigger (see Trigger signals on page 135).
§ Swinging buffers for decoupling the conversion process from the read process
(see Swinging Buffer on page 134).
§ Three independent hardware interrupts associated to the A/D conversion state.
For information on ADC 1552 Type 1 interrupt handling, see Interrupts
provided by the ADC 1552 Type 1 unit on page 137.

Note

Basically, the ADC 1552 Type 1 unit works like the ADC Type 4 module, but
it does not support the burst sample mode.

Swinging Buffer Each A/D conversion channel features a swinging buffer for decoupling the write
buffer and the read buffer.

Free buffer

Application Read buffer Write buffer A/D converter unit


running on the
processor board

Swinging buffer principle The swinging buffer, comprising a write, a free,


and a read buffer, passes all conversion results from the A/D converter unit to the

134
MicroAutoBox Features May 2018
A/D Conversion

application running on MicroAutoBox. The buffers can change places, as


indicated by the arrows between them in the illustration above. This is
implemented by pointer management, so that no buffer needs to be copied from
one position to another. The events which trigger the buffer exchange are
described below. The number of temporarily stored conversion results in one
buffer is 1.

Write buffer The A/D converter unit writes the conversion result to the write
buffer. When this event occurs, the write buffer changes places with the free
buffer, which is then filled with the new conversion result.

Read buffer The application running on MicroAutoBox reads the conversion


result from the read buffer. Before the conversion result is transferred, the read
function used in the application requests a read buffer.
Depending on the read method used by the application,
§ The current conversion result in the read buffer is transferred immediately.
or
§ The A/D conversion function waits until the buffer control unit exchanges the
read buffer with the free buffer containing a new conversion result.
For more information on the read methods, refer to Methods of reading
conversion results on page 136.
If the application does not read the conversion result fast enough, it can happen
that the free buffer, containing a new result, is overwritten by the write buffer
before it could become the read buffer. In this case a data lost interrupt is
generated on the channel (if the generation of the data lost interrupt was
initialized beforehand).

Trigger signals Conversion trigger The conversion trigger starts every A/D conversion with
one conversion result per trigger. You select the conversion trigger by assigning a
conversion trigger source to a converter channel, for example, the channel timer.

Trigger control If a conversion is in progress and has not completed before


another conversion trigger occurs, this trigger is ignored, and a conversion
trigger overflow interrupt is generated (if the generation of the conversion
trigger overflow interrupt was initialized beforehand). For more information,
refer to Interrupts provided by the ADC 1552 Type 1 unit on page 137.

Trigger sources An ADC 1552 Type 1 conversion channel can react to the
following trigger sources:
§ 4 external trigger inputs
§ Individual channel timer for each channel
§ Software trigger (using RTLib) and sample base rate (using RTI).

External trigger The external trigger inputs can be used with a maximum
frequency of 1 MHz according to the conversion time of 1 µs. For detailed
information on the electrical characteristics, refer to Data Sheet MicroAutoBox II
1401/1511/1512 ( MicroAutoBox II Hardware Installation and Configuration)
or Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration).

135
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Single conversion mode In single conversion mode the conversion channels work as standard A/D
converters for converting a single value after receiving a conversion trigger. Each
trigger event produces one conversion result which can be read immediately
after its conversion time.

Conversion ...
trigger

Data ready

Conversion time

Methods of reading The RTI Blockset and the RTLib functions offer different methods of reading the
conversion results A/D conversion results.

Using the polling method The first method to read new conversion results
is to use the read functions, which causes the application to wait until new
conversion results are available. This is the polling method.
§ RTI Blockset
The RTI Blockset uses this method in the configurations shown in the table
below.
§ RTLib offers the following polling function:
§ adc_1552_tp1_single_new_read

Note

As this read-out method polls for a new buffer with A/D conversion
results, it is important that the required number of A/D conversions is
triggered by the selected conversion trigger source. Otherwise the
application remains in the internal polling loop and hangs up.

Using the data ready interrupt The second method of reading new
conversion results is to use the data ready interrupt indicating that the
conversion has finished.
Using the data ready interrupt is the most efficient way to read new conversion
results. This method is recommended for use in applications that require fast
response.
The data ready interrupt indicates that a new conversion result can be read using
a non-polling read method. The interrupt must be made available by adding an
ADC1552_TP1_HWINT_BLx block to your Simulink model. The
adc_1552_tp1_data_ready_int_enable function enables the interrupt in your

136
MicroAutoBox Features May 2018
A/D Conversion

handcoded C application and with the dssint_xxx functions they can be


handled.
The RTI block which reads the conversion results and other functions you want to
react to the interrupt must be embedded in a subsystem driven by the data ready
interrupt. In handcoded C applications the reading functions and other functions
are generally placed in the interrupt service routine. For details on the
MicroAutoBox interrupts, refer to Interrupt Handling on page 53.

Using the non-polling method The third method is to read conversion


results immediately without waiting for a finished conversion. You can also read
old conversion results with this non-polling method.
This reading method uses the read functions which do not poll internally for the
availability of a read buffer with new conversion results. The current read buffer
is read instead. The required information on whether a buffer was read
repeatedly or a buffer with new conversion results was read, is indicated by an
RTI block output or a flag as a parameter of the RTLib function.
§ RTI Blockset
The RTI Blockset uses this method in the configurations shown in the table
below.
§ RTLib offers the following function which reads the current buffer and provide
the buffer state:
§ adc_1552_tp1_single_current_read
To avoid reading the current conversion results repeatedly until a new read buffer
is available, the RTLib alternatively offers the adc_1552_tp1_data_ready function,
which only queries if a new buffer is available but does not read the conversion
results.

Read methods used with RTI With RTLib, you can implement a read
method by using the appropriate RTLib functions. With RTI, the specified block
settings are responsible for the read method used. Because there is no visible
hint in the block's dialog, the following table shows you which settings result in
which read method.

Conversion Mode Conversion Trigger Read Method


Single conversion Sample base rate (ADC) Polling
Sample base rate Non-polling
(ADCSTART)
External trigger Non-polling
§ Sample base rate (ADC) means that the ADC1552_TP1_BLx block triggers
the conversion start.
§ Sample base rate (ADCSTART) means that the ADC1552_TP1_START_BLx
block triggers the conversion start.

Interrupts provided by the The hardware interrupts from the ADC 1552 Type 1 unit are used to trigger
ADC 1552 Type 1 unit interrupt-driven tasks which are executed on MicroAutoBox.

To be used, an interrupt must be enabled. The functions you want to trigger by


interrupt must be embedded in an interrupt-driven subsystem. For instructions

137
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

on doing this, refer to Tasks Driven by Interrupt Blocks ( RTI and RTI-MP
Implementation Guide).

The interrupt which is to trigger the subsystem must be made available using the
ADC1552_TP1_HWINT_BLx block. The appropriate channel number and the
respective interrupt specification in the block's dialog have to be selected. The
model must contain an ADC1552_TP1_BLx block using the specified channel.

Note

You need a separate ADC1552_TP1_HWINT_BLx block for each interrupt


that you want to use on a conversion channel.

Data ready interrupt The data ready interrupt is provided by the A/D
converters, one per channel.
The interrupt shows that a single conversion has finished and the new
conversion result is available.

Data lost interrupt The data lost interrupt is provided by the A/D converters,
one per channel.
The interrupt shows that a filled free buffer in the swinging buffer was
overwritten by new conversion results before the old conversion results could be
read. This condition occurs if conversions are started more frequently than the
buffers are read. For more information on the swinging buffer, refer to Swinging
Buffer on page 134.

Conversion trigger overflow interrupt The conversion trigger overflow


interrupt is provided by the A/D converters, one per channel.

138
MicroAutoBox Features May 2018
A/D Conversion

The interrupt shows that a conversion trigger was received before the preceding
conversion finished. The conversion trigger is ignored.

Conversion Conversion
trigger trigger

Conversion time

Conversion trigger
overflow

Note

A conversion trigger overflow can occur if:


§ The signal of the specified external trigger source is noisy.
§ The conversion trigger signal period is lower than the conversion time.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector
(DS1512 or DS1514 ZIF connector):

A/D Converter Channel Signal I/O Connector Pin


1 1 AnalogIn+ ch 1 X3
AnalogIn- ch 11) X4
2 2 AnalogIn+ ch 2 W3
AnalogIn- ch 21) W4
3 3 AnalogIn+ ch 3 V3
AnalogIn- ch 31) V4
4 4 AnalogIn+ ch 4 U3
AnalogIn- ch 41) U4
5 5 AnalogIn+ ch 5 H3
AnalogIn- ch 51) H4
6 6 AnalogIn+ ch 6 G3
AnalogIn- ch 61) G4
7 7 AnalogIn+ ch 7 F3
AnalogIn- ch 71) F4
8 8 AnalogIn+ ch 8 E3
AnalogIn- ch 81) E4

139
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

A/D Converter Channel Signal I/O Connector Pin


Additional relevant signals
External trigger input 1 DigIn ch 1 V5
External trigger input 2 DigIn ch 2 U5
External trigger input 3 DigIn ch 3 U6
External trigger input 4 DigIn ch 4 T2
1) Negative input line of the ADC channel is connected to GND. To get optimum analog
performance, follow the instructions in MicroAutoBox II Hardware Installation and
Configuration for connecting the analog channels to GND.

Note

DigIn ch 1 … DigIn ch 4 of the DIO 1552 Type 1 unit are shared with the
external trigger inputs of the ADC 1552 Type 1 unit.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112


Tasks Driven by Interrupt Blocks ( RTI and RTI-MP Implementation Guide)

References

ADC 1552 Type 1 Unit of the DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)
ADC1552_TP1_BLx ( MicroAutoBox RTI Reference)
ADC1552_TP1_HWINT_BLx ( MicroAutoBox RTI Reference)
ADC1552_TP1_START_BLx ( MicroAutoBox RTI Reference)

ADC 1552 Type 2 Unit

Standard A/D converter The ADC Type 2 unit of the DS1552 Multi-I/O Module (abbreviated as ADC 1552
Type 2) provides A/D converters that can be configured for various use cases. The
features are described in detail.

140
MicroAutoBox Features May 2018
A/D Conversion

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics The ADC 1552 Type 2 unit consists of 1 A/D converter with 16 parallel A/D
converter channels. The channels are simultaneously sampled. They are equipped
with single-ended inputs and particularly meet the standard requirements for
digitizing analog input signals.

Each of the 16 A/D conversion channels provides:


§ Single-ended inputs (negative inputs are internally connected to GND)
§ 16-bit resolution and a maximum conversion time of 4 µs
§ Maximum sample rate of 200 KSPS
§ An input voltage range of -10 … +10 V

Conversion behavior After starting the A/D conversion, the incoming signals are continuously
converted in the interval of the sample rate and can be read from a register.

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector
(DS1512 or DS1514 ZIF connector):

A/D Converter Channel Signal1) I/O Connector Pin


1 1 AnalogIn ch 1 b2
2 2 AnalogIn ch 2 a2
3 3 AnalogIn ch 3 Z2
4 4 AnalogIn ch 4 Y2
5 5 AnalogIn ch 5 X2
6 6 AnalogIn ch 6 W2
7 7 AnalogIn ch 7 V2
8 8 AnalogIn ch 8 U2
9 9 AnalogIn ch 9 M2
10 10 AnalogIn ch 10 L2
11 11 AnalogIn ch 11 K2

141
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

A/D Converter Channel Signal1) I/O Connector Pin


12 12 AnalogIn ch 12 J2
13 13 AnalogIn ch 13 H2
14 14 AnalogIn ch 14 G2
15 15 AnalogIn ch 15 F2
16 16 AnalogIn ch 16 E2
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the A/D Conversion Units .................................................................................. 112

References

ADC 1552 Type 2 Unit for DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)
ADC1552_TP2_BLx ( MicroAutoBox RTI Reference)

142
MicroAutoBox Features May 2018
Bit I/O

Bit I/O
Where to go from here Information in this section

Overview of the Bit I/O Units ................................................................ 143

Bit I/O Unit (DIO Type 1) ....................................................................... 144

Bit I/O Unit (DIO Type 3) ....................................................................... 147

Bit I/O Unit (DIO Type 4) ....................................................................... 152

Bit I/O Unit (DIO 1552 Type 1) .............................................................. 156

Overview of the Bit I/O Units

Introduction The MicroAutoBox variants provide various Bit I/O units.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
Bit I/O Unit
DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
DIO Type 1 ✓ ✓ ✓ – – – – –
DIO Type 3 – – – – ✓ – – –
DIO Type 4 – – – – – – ✓ –
DIO 1552 Type 1 – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module

Overview of the The main characteristics of the Bit I/O units are listed below.
characteristics

Characteristics Bit I/O Bit I/O Bit I/O Bit I/O


(DIO Type 1) (DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Digital input channels 16 40 24 16
2 groups of 8 bits 3 ports with 16/16/8 bits 2 ports with 16/8 bits
Digital output channels 10 40 24 16
2 groups of 7/3 bits 3 ports with 16/16/8 bits 2 ports with 16/8 bits

143
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics Bit I/O Bit I/O Bit I/O Bit I/O


(DIO Type 1) (DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Bidirectional channels 16 None None 81)
2 groups of 8 bits
Access Via master-slave communication Direct access2) Direct access2) Direct access2)
1) Only available when using the RTI FPGA Programming Blockset
2) Lower latency than DIO Type 1

Related topics Basics

Bit I/O Unit (DIO 1552 Type 1) ............................................................................................... 156


Bit I/O Unit (DIO Type 1) ........................................................................................................ 144
Bit I/O Unit (DIO Type 3) ........................................................................................................ 147
Bit I/O Unit (DIO Type 4) ........................................................................................................ 152

Bit I/O Unit (DIO Type 1)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics The Bit I/O unit of the DIO Type 1 module consists of 6 separate groups:
§ 16 bits for input only: group 4 and 5, with 8 bits each
§ 10 bits for output only: group 1 and 3, one with 7 bits, one with 3 bits
§ 16 bits for input or output: group 2 and 6, with 8 bits each – you can
configure each bit for either input or output

144
MicroAutoBox Features May 2018
Bit I/O

Note

The channels of group 2 and 6 can be connected to different I/O pins. Each
channel provides one input pin and one output pin. You must therefore
note the following information.

If you have connected the input of an I/O channel with an input pin, and
you want to use this channel as output, ensure that your software initializes
the output pin to the same state you defined for the input to avoid an
unpredictable behavior at the output.
§ If your software defines a signal for output, the corresponding input has
no function. If the software defines a signal as input, the corresponding
output pin has the same level as the corresponding input pin.
§ If your software does not control the digital I/O signals (during reset or
before correct initialization) each output will be in the same state as the
corresponding input. This allows you to define the default (reset) state of
each output by driving the input with an external signal.

Other functions using digital The following function uses digital input and output channels:
I/O channels
Serial Peripheral Interface on the DIO Type 1 Unit on page 453

I/O mapping The following table shows the mapping of the logical group and bit numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Group RTLib Bit RTI I/O Connector Pin I/O Connector Pin
Number Channel Shared with
Input Output
Number
Pin Signal Pin Signal
Group 1 0 1 – – A3 Group 1 ch 1 out
1 2 – – A4 Group 1 ch 2 out
2 3 – – A5 Group 1 ch 3 out
3 4 – – A6 Group 1 ch 4 out
4 5 – – B3 Group 1 ch 5 out
5 6 – – B4 Group 1 ch 6 out
6 7 – – B5 Group 1 ch 7 out
7 8 – – – –
Group 2 0 1 T1 Group 2 ch 1 in K3 Group 2 ch 1 out
1 2 T2 Group 2 ch 2 in K4 Group 2 ch 2 out
2 3 T3 Group 2 ch 3 in K5 Group 2 ch 3 out
3 4 T4 Group 2 ch 4 in K6 Group 2 ch 4 out
4 5 T5 Group 2 ch 5 in L1 Group 2 ch 5 out
5 6 T6 Group 2 ch 6 in L2 Group 2 ch 6 out
6 7 U1 Group 2 ch 7 in L3 Group 2 ch 7 out
7 8 W6 Group 2 ch 8 in L4 Group 2 ch 8 out

145
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Group RTLib Bit RTI I/O Connector Pin I/O Connector Pin
Number Channel Shared with
Input Output
Number
Pin Signal Pin Signal
Group 3 0 1 – – L5 Group 3 ch 1 out
1 2 – – L6 Group 3 ch 2 out
2 3 – – M1 Group 3 ch 3 out
3 4 – – – –
4 5 – – – –
5 6 – – – –
6 7 – – – –
7 8 – – – –
Group 4 0 1 DIO ADC, channel 9 Y3 Group 4 ch 1 in – –
1 2 DIO ADC, channel 10 Y4 Group 4 ch 2 in – –
2 3 DIO ADC, channel 11 Y6 Group 4 ch 3 in – –
3 4 DIO ADC, channel 12 Z3 Group 4 ch 4 in – –
4 5 DIO ADC, channel 13 Z4 Group 4 ch 5 in – –
5 6 DIO ADC, channel 14 Z6 Group 4 ch 6 in – –
6 7 DIO ADC, channel 15 a3 Group 4 ch 7 in – –
7 8 DIO ADC, channel 161) a4 Group 4 ch 8 in – –
Group 5 0 1 DIO ADC, channel 1 a6 Group 5 ch 1 in – –
1 2 DIO ADC, channel 2 b3 Group 5 ch 2 in – –
2 3 DIO ADC, channel 3 b4 Group 5 ch 3 in – –
3 4 DIO ADC, channel 4 b6 Group 5 ch 4 in – –
4 5 DIO ADC, channel 5 c3 Group 5 ch 5 in – –
5 6 DIO ADC, channel 6 c4 Group 5 ch 6 in – –
6 7 DIO ADC, channel 7 c5 Group 5 ch 7 in – –
7 8 DIO ADC, channel 8 c6 Group 5 ch 8 in – –
Group 6 0 1 MISO in, SPI N1 Group 6 ch 1 in D6 Group 6 ch 1 out
1 2 MOSI out, SPI N2 Group 6 ch 2 in E3 Group 6 ch 2 out
2 3 SCK out, SPI N3 Group 6 ch 3 in E4 Group 6 ch 3 out
3 4 PCS 0 out, SPI N4 Group 6 ch 4 in E5 Group 6 ch 4 out
4 5 PCS 1 out, SPI N5 Group 6 ch 5 in E6 Group 6 ch 5 out
5 6 PCS 2 out, SPI N6 Group 6 ch 6 in F1 Group 6 ch 6 out
6 7 PCS 3 out, SPI P1 Group 6 ch 7 in F2 Group 6 ch 7 out
7 8 P2 Group 6 ch 8 in F5 Group 6 ch 8 out
1) Camshaft synchronization signal

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

146
MicroAutoBox Features May 2018
Bit I/O

§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)

Related topics Basics

Hardware Concept ................................................................................................................. 20

References

Bit I/O ( MicroAutoBox RTLib Reference)


Bit I/O ( MicroAutoBox RTI Reference)

Bit I/O Unit (DIO Type 3)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics The Bit I/O unit of the DIO Type 3 module consists of 80 I/O channels:
§ 40 digital input channels
§ 40 digital output channels

The digital input channels and the digital output channels are grouped on three
ports with different numbers of channels/bits.

Port Number of
Channels/Bits
1 16
2 16
3 8

The assignment of I/O channels can only be done within one port. This
guarantees data consistency.

147
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

After power on, while no application is running, all outputs are set to high
impedance state (tristate). For further information, refer to Signal Descriptions
( MicroAutoBox II Hardware Installation and Configuration).

Low-side and high-side switches The output state of a digital output


channel depends on its individual settings for the low-side switch L (GND) and
the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

To other channels VDRIVE

To DIO Type3 High-side switch H

Output

To DIO Type3 Low-side switch L

GND

Switch Settings 1) Input of the Output Description


Output Circuit (DigP1 ch 1 ...
H L
DigP3 ch 8)
(VDRIVE) (GND)
0 0 0 High-Z Individual output disabled
0 0 1 High-Z
0 1 0 GND Low-side switch
0 1 1 High-Z
1 0 0 High-Z High-side switch
1 0 1 VDRIVE
1 1 0 GND Push-pull output
1 1 1 VDRIVE
1) 0 = switch disabled, 1 = switch enabled

For more details, refer to Data Sheet MicroAutoBox II 1401/1511


( MicroAutoBox II Hardware Installation and Configuration).

148
MicroAutoBox Features May 2018
Bit I/O

Other functions using digital The following functions use digital I/O channels:
I/O channels § Inputs
§ PWM Measurement (PWM2D) on the DIO Type 3 Unit on page 255
§ Frequency Measurement (F2D) on the DIO Type 3 Unit on page 271
§ Incremental Encoder Interface on the DIO Type 3 Unit on page 296
§ SPI: MISO - Serial Peripheral Interface on the DIO Type 3 Unit on page 456
§ Outputs
§ PWM Generation (PWM) on the DIO Type 3 Unit on page 188
§ Square-Wave Signal Generation (FREQ) on the DIO Type 3 Unit on page 201
§ Basics on Multi-Channel PWM Signal Generation on the DIO Type 3
on page 225
§ SPI: CLK, MOSI, CS1 ... CS4 - Serial Peripheral Interface on the DIO Type 3
Unit on page 456

I/O mapping The following table shows the mapping of the port numbers and channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector.

Digital inputs

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3

149
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

150
MicroAutoBox Features May 2018
Bit I/O

Digital outputs

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3
2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5
3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

151
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Hardware Concept ................................................................................................................. 20

References

Bit I/O ( MicroAutoBox RTLib Reference)


Bit I/O ( MicroAutoBox RTI Reference)

Bit I/O Unit (DIO Type 4)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics The Bit I/O unit of the DIO Type 4 module consists of 48 I/O channels:
§ 24 digital input channels
§ 24 digital output channels

The digital input channels and the digital output channels are grouped on two
ports with different numbers of channels/bits.

Port Number of
Channels/Bits
1 16
2 8

152
MicroAutoBox Features May 2018
Bit I/O

The assignment of I/O channels can only be done within one port. This
guarantees data consistency.

After power on, while no application is running, all outputs are set to high
impedance state (tristate). For further information, refer to Signal Descriptions
( MicroAutoBox II Hardware Installation and Configuration).

Low-side and high-side switches The output state of a digital output


channel depends on its individual settings for the low-side switch L (GND) and
the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

To other channels VDRIVE

To DIO Type4 High-side switch H

Output

To DIO Type4 Low-side switch L

GND

Switch Settings 1) Input of the Output Description


Output Circuit (DigP1 ch 1 ...
H L
DigP2 ch 8)
(VDRIVE) (GND)
0 0 0 High-Z Individual output disabled
0 0 1 High-Z
0 1 0 GND Low-side switch
0 1 1 High-Z
1 0 0 High-Z High-side switch
1 0 1 VDRIVE
1 1 0 GND Push-pull output
1 1 1 VDRIVE
1) 0 = switch disabled, 1 = switch enabled

153
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

For more details, refer to Connector Pinouts ( MicroAutoBox II Hardware


Installation and Configuration).

Other functions using digital The following functions use digital I/O channels:
I/O channels § Inputs
§ PWM Measurement (PWM2D) on the DIO Type 4 Unit on page 259
§ Frequency Measurement (F2D) on the DIO Type 4 Unit on page 275
§ Incremental Encoder Interface on the DIO Type 4 Unit on page 301
§ SPI: MISO - Serial Peripheral Interface on the DIO Type 4 Unit on page 464
§ Outputs
§ PWM Generation (PWM) on the DIO Type 4 Unit on page 193
§ Square-Wave Signal Generation (FREQ) on the DIO Type 4 Unit on page 204
§ Basics on Multi-Channel PWM Signal Generation on the DIO Type 4
on page 237
§ SPI: CLK, MOSI, CS1 ... CS4 - Serial Peripheral Interface on the DIO Type 4
Unit on page 464

I/O mapping The following table shows the mapping of the port numbers and channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector.

Digital inputs

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5

154
MicroAutoBox Features May 2018
Bit I/O

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Digital outputs

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5
2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

155
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)

Related topics Basics

Hardware Concept ................................................................................................................. 20

References

Bit I/O ( MicroAutoBox RTLib Reference)


Bit I/O ( MicroAutoBox RTI Reference)

Bit I/O Unit (DIO 1552 Type 1)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics The bit I/O of the DIO Type 1 unit of the DS1552 Multi-I/O Module (abbreviated
as DIO 1552 Type 1) consists of 32 I/O channels:
§ 16 digital input channels
§ 16 digital output channels

After power on, while no application is running, all outputs remain disabled in
high impedance state (tristate) automatically. For further information, refer to
Signal Descriptions ( MicroAutoBox II Hardware Installation and
Configuration).

Low-side and high-side switches The output state of a digital output


channel depends on its individual settings for the low-side switch L (GND) and
the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.

156
MicroAutoBox Features May 2018
Bit I/O

§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

Switch Settings 1) Input of the Output Description


Output Circuit (DigOut ch 1 ...
H L
DigOut ch 16)
(VDRIVE) (GND)
0 0 0 High-Z Individual output disabled
0 0 1 High-Z
0 1 0 GND Low-side switch
0 1 1 High-Z
1 0 0 High-Z High-side switch
1 0 1 VDRIVE
1 1 0 GND Push-pull output
1 1 1 VDRIVE
1) 0 = switch disabled, 1 = switch enabled

For more details, refer to


§ Data Sheet MicroAutoBox II 1401/1511/1512 ( MicroAutoBox II Hardware
Installation and Configuration)
§ Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration)

Other functions using digital The following functions use digital I/O channels:
I/O channels § Inputs
§ PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit on page 263
§ Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit on page 278
§ Outputs
§ PWM Generation (PWM) on the DIO 1552 Type 1 Unit on page 198
§ Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit
on page 207

I/O mapping The following table shows the mapping of the channel numbers, as used in RTI
and RTLib, to the related I/O pins of the MicroAutoBox I/O connector (DS1512 or
DS1514 ZIF connector).

Digital inputs

Channel Signal I/O Connector Pin


1 DigIn ch 1 V5
2 DigIn ch 2 U5
3 DigIn ch 3 U6
4 DigIn ch 4 T2
5 DigIn ch 5 T3
6 DigIn ch 6 T4
7 DigIn ch 7 T5

157
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Channel Signal I/O Connector Pin


8 DigIn ch 8 T6
9 DigIn ch 9 S2
10 DigIn ch 10 S3
11 DigIn ch 11 S5
12 DigIn ch 12 R2
13 DigIn ch 13 R5
14 DigIn ch 14 R6
15 DigIn ch 15 P5
16 DigIn ch 16 P6

Note

DigIn ch 1 … DigIn ch 4 of the DIO 1552 Type 1 unit are shared with the
external trigger inputs of the ADC 1552 Type 1 unit.

Digital outputs

Channel Signal I/O Connector Pin


1 DigOut ch 1 F5
2 DigOut ch 2 E5
3 DigOut ch 3 E6
4 DigOut ch 4 D2
5 DigOut ch 5 D3
6 DigOut ch 6 D4
7 DigOut ch 7 D5
8 DigOut ch 8 D6
9 DigOut ch 9 C2
10 DigOut ch 10 C3
11 DigOut ch 11 C5
12 DigOut ch 12 B2
13 DigOut ch 13 B5
14 DigOut ch 14 B6
15 DigOut ch 15 A5
16 DigOut ch 16 A6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

158
MicroAutoBox Features May 2018
Bit I/O

Related topics Basics

Hardware Concept ................................................................................................................. 20

References

Bit I/O on the DIO 1552 Type 1 Unit of the DS1552 Multi-I/O Module
( MicroAutoBox RTLib Reference)
DIO1552_TP1_BIT_IN_BLx ( MicroAutoBox RTI Reference)
DIO1552_TP1_BIT_IN_CH_BLx ( MicroAutoBox RTI Reference)
DIO1552_TP1_BIT_OUT_BLx ( MicroAutoBox RTI Reference)
DIO1552_TP1_BIT_OUT_CH_BLx ( MicroAutoBox RTI Reference)

159
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

D/A Conversion
Where to go from here Information in this section

Overview of the D/A Conversion Units ................................................. 160

AIO Unit Type 1 (DAC) ......................................................................... 161

DAC Unit Type 1 .................................................................................. 162

DAC Unit Type 3 .................................................................................. 163

DAC 1552 Type 1 Unit ......................................................................... 165

Overview of the D/A Conversion Units

Introduction The MicroAutoBox variants provide various D/A conversion units.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DAC Unit
DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
AIO Type 1 DAC – – – – – – ✓ –
DAC Type 1 ✓ – ✓ – – – – –
DAC Type 3 – – – – ✓ – – –
DAC 1552 Type 1 – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module

Supported I/O board boot modes: not relevant

Overview of the The main characteristics of the DAC units are listed below.
characteristics

Characteristics AIO Type 1 DAC DAC Type 1 DAC Type 3 DAC 1552
Type 1
Number of converter channels 8 8 4 4
Output voltage range ‑10.0 … +10.0 V 0 … +4.5 V 0 … +4.5 V 0 … +5.0 V
Resolution 16 bit 12 bit 12 bit 16 bit

160
MicroAutoBox Features May 2018
D/A Conversion

Related topics Basics

AIO Unit Type 1 (DAC) .......................................................................................................... 161


DAC 1552 Type 1 Unit .......................................................................................................... 165
DAC Unit Type 1 ................................................................................................................... 162
DAC Unit Type 3 ................................................................................................................... 163

AIO Unit Type 1 (DAC)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

– – – – – – – ✓ DS1514

Supported I/O board boot modes: not relevant

Characteristics The AIO Unit Type 1 provides 8 outputs with 16‑bit resolution and 1 μs maximum
settling time. The outputs have ‑10.0 … +10.0 V voltage, low pass output filters
(1st order/3 dB at 500 kHz), 60 V overvoltage protection, overcurrent and short
circuit protection. The maximum sink/source current is 8 mA.

I/O mapping The following table shows the mapping of the converter and channel numbers,
as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O
connector (DS1513 ZIF connector):

D/A Channel Signal1) I/O Connector Pin


1 AnalogOut ch 1 Z2
2 AnalogOut ch 2 Y2
3 AnalogOut ch 3 X2
4 AnalogOut ch 4 W2
5 AnalogOut ch 5 V2
6 AnalogOut ch 6 U2

161
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

D/A Channel Signal1) I/O Connector Pin


7 AnalogOut ch 7 T2
8 AnalogOut ch 8 S2
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics References

AIO_TYPE1_DAC_BLx ( MicroAutoBox RTI Reference)


DAC 1552 Type 1 Unit of the DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)

DAC Unit Type 1

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ – ✓ – – – – –

Supported I/O board boot modes: not relevant

Characteristics The DAC Unit Type 1 provides 8 outputs with 12‑bit resolution and 150 μs
maximum settling time (to 1 LSB). The outputs have 0 … +4.5 V voltage, low
pass output filters (1st order/3 dB at 10 kHz), 40 V overvoltage protection,
overcurrent and short circuit protection. The maximum sink/source current is 5
mA.

162
MicroAutoBox Features May 2018
D/A Conversion

I/O mapping The following table shows the mapping of the logical converter and channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector:

D/A Channel Signal I/O Connector Pin


1 DAC 1 D1
2 DAC 2 D2
3 DAC 3 C1
4 DAC 4 C2
5 DAC 5 B1
6 DAC 6 B2
7 DAC 7 A1
8 DAC 8 A2

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics References

DAC Unit Type 1 ( MicroAutoBox RTLib Reference)


DAC_TYPE1_Mx_Cy ( MicroAutoBox RTI Reference)

DAC Unit Type 3

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics The DAC unit provides 4 outputs with 12‑bit resolution and 150 μs maximum
settling time (to 1 LSB). The outputs have 0 … +4.5 V voltage, low pass output

163
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

filters (1st order/3 dB at 10 kHz), 40 V overvoltage protection, overcurrent and


short circuit protection. The maximum sink/source current is 5 mA.

I/O mapping The following table shows the mapping of the logical converter and channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector (DS1511 ZIF connector):

D/A Channel Signal1) I/O Connector Pin


1 Analog ch 1 Z2
2 Analog ch 2 Y2
3 Analog ch 3 X2
4 Analog ch 4 W2
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics References

DAC Unit Type 3 ( MicroAutoBox RTLib Reference)


DAC_TYPE3_Mx_Cy ( MicroAutoBox RTI Reference)

164
MicroAutoBox Features May 2018
D/A Conversion

DAC 1552 Type 1 Unit

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics The DAC Type 1 unit of the DS1552 Multi-I/O Module (abbreviated as DAC 1552
Type 1) provides 4 outputs with 16‑bit resolution and 1 μs maximum settling
time. The outputs have 0 … +5.0 V voltage, low pass output filters (1st order/3
dB at 500 kHz), 60 V overvoltage protection, overcurrent and short circuit
protection. The maximum sink/source current is 8 mA.

I/O mapping The following table shows the mapping of the converter and channel numbers,
as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O
connector (DS1512 or DS1514 ZIF connector):

D/A Channel Signal1) I/O Connector Pin


1 AnalogOut ch 1 c2
2 AnalogOut ch 2 c3
3 AnalogOut ch 3 c4
4 AnalogOut ch 4 c5
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

165
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Related topics References

DAC 1552 Type 1 Unit of the DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)
DAC1552_TP1_BLx ( MicroAutoBox RTI Reference)

166
MicroAutoBox Features May 2018
Ethernet I/O Interface

Ethernet I/O Interface


Introduction To perform ECU bypassing with optimized data transfer latencies in comparison
to a standard Ethernet interface.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
DS1401 Base Board MicroAutoBox with I/O Boards

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ – – – – – – – –

Supported I/O board boot modes: not relevant

Basics on the Ethernet I/O Interface

Field of application You can use the Ethernet I/O Interface to perform the following I/O activities:
§ Bypassing an ECU, that means, that a subset of ECU functions is executed by
the MicroAutoBox by using the RTI Bypass Blockset and the XCP on UDP/IP
Protocol.
§ Performing communication between the real-time application and any external
device that also provides an Ethernet interface using UDP/IP protocol, such as
another dSPACE board or a calibration device. The RTI Ethernet (UDP) Blockset
lets you implement the communication in a Simulink® model. For further
information, refer to RTI Ethernet (UDP) Blockset Reference.

Data transfer The Ethernet I/O Interface allows 1 GBit connections and supports the UDP/IP
protocol. This interface is optimized to provide lowest data transfer latencies and
highest data transfer rates.

Supported UDP features and limitations If you want to implement


network-based communication, you must have a basic knowledge of IP-based
networks. Here is a list of some basic features and limitations.
§ You can use up to 4 sockets.
§ Each socket is used for bidirectional communication.
§ Each socket can be configured with a maximum datagram size of 1472 bytes.
§ Auto negotiation is supported.
§ Listening to any IP address and port is supported.

167
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

§ IP fragmentation is not supported. Each UDP message is limited to the


maximum Ethernet datagram size.
§ DHCP is not supported.
§ Routing is not supported. All participants in communication must be available
in the same subnet.

XCP on UDP/IP In combination with the RTI Bypass Blockset, the Ethernet I/O
Interface lets you access external systems via the XCP on UDP/IP protocol. This
protocol allows you to access ECUs for bypassing, controlling, sensor emulation,
etc. Additionally, it allows you to access modules providing an XCP on UDP/IP
service interface, for example, to read values from modules which incorporate
specific measurement technology.

Specifying the IP addresses As the IP protocol is used, you must specify the IP addresses of the Ethernet I/O
Interface (source) and the target device (e.g., ECU). With the RTI Bypass Blockset,
the RTIBYPASS_SETUP_BLx block provides the relevant IP address parameters,
refer to Options Page (RTIBYPASS_SETUP_BLx for XCP on UDP/IP) ( RTI Bypass
Blockset Reference). Using the RTI Ethernet (UDP) Blockset, the
ETHERNET_UDP_SETUP_BLx block provides the relevant IP address parameters,
refer to ETHERNET_UDP_SETUP_BLx ( RTI Ethernet (UDP) Blockset Reference).

Related topics Basics

Features of the RTI Bypass Blockset ( RTI Bypass Blockset Reference)

HowTos

How to Connect MicroAutoBox to the ECU via UDP/IP ( ECU Interfaces


Hardware Installation and Configuration)

References

RTI Ethernet (UDP) Blockset Reference

168
MicroAutoBox Features May 2018
ECU Interface

ECU Interface
Hardware and boot mode Supported MicroAutoBox hardware:
requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ ✓ – ✓ ✓ – – – –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

General Description ............................................................................. 169

Hardware ............................................................................................ 170

Working Modes ................................................................................... 172

DPMEM Addresses Seen from the ECU ................................................ 173

Data Type Formats ............................................................................... 175

ECU Interrupts ..................................................................................... 176

General Description

Introduction The ECU interfaces of MicroAutoBox can be used for several purposes, for
example:
§ Connecting RapidPro Control Unit to MicroAutoBox, refer to Connecting a
Control Unit and a RCP System via LVDS ( RapidPro System Hardware
Installation Guide).
§ Communicating via Ethernet using an LVDS Ethernet link cable
For further information, refer to Basics on the Ethernet I/O Interface
on page 167.
§ Bypass-based prototyping, see the following descriptions.

Bypass-based prototyping In bypass-based prototyping, existing ECUs are optimized or partially revised to
obtain a new control strategy. The following illustration shows an automotive

169
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

ECU connected to MicroAutoBox via an ECU interface. The ECU executes all the
control functions that will remain unchanged, while the new algorithms are
calculated in MicroAutoBox. The results will then be transmitted back to the
original ECU.

MicroAutoBox Host PC
ECU

Addtional
I/O

I/O

Note

In typical applications, a custom-specific plug-on device (target adapter) is


necessary. The target adapter provides the physical connection between
MicroAutoBox and the ECU and performs signal conditioning, for example.

Related topics Basics

ECU Interface ....................................................................................................................... 169


Hardware Concept ................................................................................................................. 20

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)

Hardware

Introduction The ECU interface unit provides a serial interface and a 16k · 16-bit dual-port
memory for accessing an ECU. The communication between the ECU and
MicroAutoBox can be controlled by subinterrupts.

For example, if a DCI-GSI1 is connected to the ECU interface, you can access
ECU variables using the RTI Bypass Blockset. The interface-specific parameters are
to be provided by an A2L file.

170
MicroAutoBox Features May 2018
ECU Interface

I/O mapping ECU interface channels The following table shows the available ECU
interfaces (ECUx) or ECU interface channels (IFx) according to MicroAutoBox
variant. The I/O connector type of each ECU interface is also shown (ZIF or LEMO
I/O connector).
The ECU interface channel number is used to specify the module. For example, if
you want to use IF2, you have to set the Module number to 2 in your RTI block,
or the ModuleAddr parameter to ECU_TP1_2_MODULE_ADDR in your RTLib
function.

MicroAutoBox Variant ECU 1 ECU 2 ECU A ECU B ECU C


(ZIF) (LEMO) (LEMO) (LEMO) (LEMO)
MicroAutoBox II 1401/1501 IF1 - IF2 IF3 -
MicroAutoBox II 1401/1504 - - IF1 IF2 -
MicroAutoBox II 1401/1505/1507 IF1 - IF3 IF4 IF2
MicroAutoBox II 1401/1507 - - IF2 IF3 IF1
MicroAutoBox II 1401/1511 - - IF1 IF2 -
MicroAutoBox II 1401/1511/1512 - - IF1 IF2 -
MicroAutoBox II 1401/1511/1514 - - IF1 IF2 -
MicroAutoBox II 1401/1512/1513 - - IF1 IF2 -
MicroAutoBox II 1401/1513 - - IF1 IF2 -
MicroAutoBox II 1401/1513/1514 - - IF1 IF2 -

I/O mapping of ECU 1 The following table shows the ECU interface channel
1 (IF1) I/O pins of the ZIF I/O connector:

Signal I/O Connector Pin


ECU / IF1 RX + Y5
ECU / IF1 RX – Z5
ECU / IF1 TX + b5
ECU / IF1 TX – a5

Note

This memory-based ECU bypassing interface is proprietary to dSPACE.


Connect the ZIF-RX pair to the ECU-TX pair and the ZIF-TX pair to the ECU-
RX pair. Always use a CAT5 twisted pair cable to make this connection.

I/O mapping of ECU 2, ECU A, ECU B and ECU C The pinout of the LEMO
I/O connectors is not documented. Use a suitable dSPACE connection cable.

For hardware details, refer to MicroAutoBox II Hardware Installation and


Configuration.

171
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Related topics Basics

DPMEM Addresses Seen from the ECU ................................................................................. 173


ECU Interrupts ...................................................................................................................... 176
MicroAutoBox II Base Board .................................................................................................... 42

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)

Working Modes

Introduction The ECU interface supports three working modes. In your ECU program, you
determine the mode to be used.

Asynchronous mode In this mode no synchronization between ECU and


MicroAutoBox (PPC) is performed. The ECU does not generate interrupts and
does not wait for status messages from the PPC. You will always read the current
value from the DPMEM, independently whether an expected value was written
beforehand. This can result in data inconsistencies or even data losses. This mode
is therefore used for parameter monitoring and for the tuning of parameters not
written or written with a low period by the ECU application.
ECU DPMEM PPC

write
read
read
write
write

read

t t

Synchronous mode The synchronization between ECU and PPC is


performed by an interrupt mechanism. For Simulink models, the interrupt (from
ECU to PPC) triggers an interrupt-driven subsystem. In this subsystem, the read
and write access to the DPMEM is performed: The ECU writes the value to the
DPMEM, generates an interrupt and waits for the End of interrupt message (EOI)
from the PPC. The PPC reads this value, performs the necessary calculations,
writes the calculated new value back to the DPMEM and generates the End of
interrupt message. Following, the ECU will read the calculated new value. This
mode is used for modifying ECU programs.

172
MicroAutoBox Features May 2018
ECU Interface

ECU DPMEM PPC

write
interrupt
read

wait
write
EOI
read
t

Semi-synchronous mode This – simulated bypassing – mode corresponds to


the synchronous mode except that the ECU does not wait for an End of interrupt
message from the PPC. Data inconsistencies may occur if the ECU reads data
from the DPMEM before the calculations of the PPC in the interrupt routine or
the interrupt-driven subsystem are finished. To ensure correct data the ECU
should access the DPMEM not before the End of interrupt message from the PPC
has been generated or after the PPC has finished its calculations.
ECU DPMEM PPC

write
interrupt
read

write
EOI
read
t

Related topics Basics

ECU Interface ....................................................................................................................... 169

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)

DPMEM Addresses Seen from the ECU

Introduction To use the same DPMEM addresses in the Simulink dialogs dSPACE’s RTI converts
the DPMEM addresses from the view of the ECU to the 16‑bit view of the Master
PPC. The conversion algorithm depends on the ECU offset address and other

173
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

parameters specified in the ECU configuration file. The ECU address offset
specifies the start address of the DPMEM address range seen from the ECU side.
The following illustration shows the DPMEM from the view of the ECU:

ECU DPMEM RTP

+ 0x7FFE Reserved
range
ECU address offset + 0x7FFC

Allowed
addresses

+ 0x0002

ECU address offset + 0x0000

8 bit

Note

These addresses and address ranges are valid for ECUs supporting the same
DPMEM size as MicroAutoBox. For ECUs supporting a smaller address
range, the addresses have to be adapted.

Address ranges The following DPMEM addresses and address ranges are specified on
MicroAutoBox. To access these addresses from the ECU side you have to add the
address offset.

Addresses and Address name Meaning


address ranges (ECU
side)
+ 0x7FFE ConnectionAddress Connection between ECU and PPC
+ 0x7FFC InterruptAddress Interrupt address (interrupt ECU to PPC) to
generate the physical interrupt
+ 0x0000 … 0x7FDE Usable range (specified in the ECU configuration
file)

In addition to these addresses, a range of 30 + x (with x = number of


subinterrupts to be used) successive DPMEM addresses is required for
subinterrupt handling. It is recommended to allocate this area at the start or the

174
MicroAutoBox Features May 2018
ECU Interface

end of the range "Allowed addresses" to preserve a consecutive range for the
data transfer.

Related topics Basics

ECU Interface ....................................................................................................................... 169

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)

Data Type Formats

Introduction Existing ECUs use different data formats. dSPACE’s RTI allows to select the
following data types:

Data Type
16 bit signed integer
16 bit unsigned integer
32 bit signed integer
32 bit unsigned integer
Single float 32 bit (IEEE Std. 754)

dSPACE software …
§ reads bit patterns from the DPMEM and provides the data in the given format
for processing in Simulink or
§ provides data of a Simulink variable in the given format to be written to the
DPMEM.

Note

For the data formats, two or more subsequent addresses are used. For
16‑bit data, only even addresses have to be used, for 32-bit data the
addresses have to be multiples of 4. This refers to the 8‑bit view of the
DPMEM from the ECU. Consider this, when entering the read or write
address for absolute addressing. Relative addressing takes this into account
automatically.

RTI provides a check on overlapping DPMEM addresses. If you use


handcoded models, you have to ensure correct addresses yourself.

175
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Related topics Basics

ECU Interface ....................................................................................................................... 169

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)
ECU_TYPE1_READ_Mx_BLy ( MicroAutoBox RTI Reference)
ECU_TYPE1_WRITE_Mx_BLy ( MicroAutoBox RTI Reference)

ECU Interrupts

Introduction The ECU can generate an interrupt to MicroAutoBox's Master PPC.

Subinterrupts on the ECU side On the ECU side, the ECU‑to‑PPC interrupt can be split into 16 subinterrupts via
ECU Software Porting Kit.

Note

If you do not use dSPACE’s ECU Software Porting Kit, you have to program
an equivalent subinterrupt handling yourself to ensure proper
communication between ECU and MicroAutoBox (PPC).

Subinterrupts on the PPC side Interrupt-driven subsystems in RTI You can use interrupts or subinterrupts
to trigger interrupt-driven subsystems of your Simulink model. For example, this
allows you to perform the read and write operations from or to the DPMEM. If
you use dSPACE’s RTI interrupt blocks the interrupt handling will be performed
automatically on the PPC side. When the task in this system has finished, the
interrupt handling creates automatically an End of interrupt (EOI) message to
indicate the state for other units, an ECU, for example.

Handcoded models If you use handcoded models, you can use the functions
provided by dSPACE’s Word-Based Subinterrupt Handling to program the
subinterrupt handling on the PPC side yourself.

Related topics Basics

Basics on Interrupt Handling ................................................................................................... 53


Basics on Subinterrupt Handling ............................................................................................. 62
ECU Interface ....................................................................................................................... 169

176
MicroAutoBox Features May 2018
ECU Interface

ECU Software Porting Kit ...................................................................................................... 178


Word-Based Subinterrupt Handling ......................................................................................... 58

References

ECU Interface Unit ( MicroAutoBox RTLib Reference)


ECU Interface Unit ( MicroAutoBox RTI Reference)

177
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

ECU Software Porting Kit


Hardware and boot mode Supported MicroAutoBox hardware:
requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
✓ ✓ – ✓ ✓ – – – –

Supported I/O board boot modes: not relevant

Working with the ECU Software Porting Kit

Basics The ECU Software Porting Kit allows you to use up to 16 subinterrupts (0 … 15)
from the ECU to MicroAutoBox. You can use the subinterrupts without detailed
knowledge of the subinterrupt functionality.

The settings needed for your specific ECU must be specified in the
dsECUframe.c file. This file allows you to define, among others, the type of the
ECU interface board and the DPMEM addresses used for (sub‑)interrupt
handling. All other required information are included in this file.

Tip

You have to modify existing ECU code only if you want to use subinterrupts
in your application.

For further information, refer to ECU Software Porting Kit ( MicroAutoBox


RTLib Reference).

Using the ECU Software If you want to use the ECU Software Porting Kit to set subinterrupts you have to
Porting Kit perform the following steps:
§ Create the working directory for the ECU application and copy dsECUframe.c
to this directory. For details, refer to dsECUnew.bat ( MicroAutoBox RTLib
Reference).
For existing ECU projects copy this file to the working directory.
§ Specify the settings for your specific ECU in the file dsECUframe.c. For details
refer to Defines to be Specified in the dsECUframe.c File ( MicroAutoBox
RTLib Reference).
§ Include dsECUframe.c into your application.

178
MicroAutoBox Features May 2018
ECU Software Porting Kit

§ You can now perform subinterrupt handling in your application code:


§ DSECU_SINT_INIT calls dsecu_define_sender to initialize the interrupt
sender.
§ DSSINT_SINT_SEND calls dsecu_sint_send to trigger a subinterrupt and
set the end‑of‑subinterrupt flag.
§ DSECU_EOSI_POLL polls the end‑of‑subinterrupt flag.

Example The following example demonstrates how to use the ECU Software Porting Kit:

#include <stdlib.h>
#include <dsECUframe.c>

void main(void)
{

unsigned int sint_number;

DSECU_SINT_INIT();

while(1)
{
static int first_alive_flag = 1; /* used for revive */

if (!first_alive_flag)
{
dsecu_startup(&dssint_sender); /* first alive only one time to revive ECU */
first_alive_flag = 1;
}

sint_number = rand(); /* random subinterrupt */

write_bypass_data(sint_number);
DSECU_SINT_SEND(sint_number);

if (DSECU_EOSI_POLL(sint_number) == DSECU_BYPASS_DATA_VALID)
{
read_bypass_data(sint_number);

}
}
}

Related topics References

dsecu_define_sender ( MicroAutoBox RTLib Reference)


DSECU_EOSI_POLL ( MicroAutoBox RTLib Reference)
DSECU_SINT_INIT ( MicroAutoBox RTLib Reference)
dsecu_sint_send ( MicroAutoBox RTLib Reference)
dsecu_startup ( MicroAutoBox RTLib Reference)

179
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM Signal Generation with a Variable Period


Introduction MicroAutoBox provides the timing I/O feature to generate pulse-width
modulated signals with a variable period.

Where to go from here Information in this section

Overview of the Signal Generation Functionalities ................................ 180

PWM Generation with a Variable Period (PWM_VP) on the CTM .......... 184

PWM Generation with a Variable Period (PWM_TPU_VP) on the


TPU for CC .......................................................................................... 186

PWM Generation (PWM) on the DIO Type 3 Unit ................................. 188

PWM Generation (PWM) on the DIO Type 4 Unit ................................. 193

PWM Generation (PWM) on the DIO 1552 Type 1 Unit ........................ 198

Square-Wave Signal Generation (FREQ) on the DIO Type 3 Unit ............ 201

Square-Wave Signal Generation (FREQ) on the DIO Type 4 Unit ............ 204

Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1


Unit ..................................................................................................... 207

Overview of the Signal Generation Functionalities

Introduction MicroAutoBox provides various methods for signal generation depending on the
available hardware and the specified boot mode.

Hardware and boot mode The signal generation functions can be divided into the following four main
requirements groups:
§ PWM signal generation with a variable period (PWM, PWM_VP, PWM_VP_TPU)
§ PWM signal generation with a fixed period (PWM_FP, PWM_FP_TPU)
§ Square-wave signal generation (FREQ)
§ Multi-channel PWM signal generation (MC_PWM)

180
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Supported MicroAutoBox hardware:

MicroAutoBox with I/O Boards


Signal Generation

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
PWM_VP ✓1) ✓1) ✓1) – – – – –
PWM_VP_TPU ✓2) ✓2) ✓2) – – – – –
PWM – – – – ✓ ✓3) ✓ ✓3)
FREQ – – – – ✓ ✓3) ✓ ✓3)
PWM_FP ✓4) ✓4) ✓4) – – – – –
PWM_FP_TPU ✓4) ✓4) ✓4) – – – – –
MC_PWM ✓5), 6) ✓5) ✓5) – ✓ – ✓ –
1) CC, DCEA, DCCA or EEC boot mode is needed
2) CC boot mode is needed
3) Requires a DS1552 Multi-I/O Module.
4) EEC boot mode is needed
5) DCCA or DCEA boot mode is needed
6) I/O board version 7.x or higher is needed

Supported I/O board boot modes: see the footnotes above

Overview of the Characteristics of the functions for signal generation with variable period
characteristics and duty cycle The following table shows the main characteristics. For
detailed information, refer to the function descriptions.

Characteristics PWM_VP PWM_VP_TPU


(DIO Type 1) (DIO Type 1)
Number of output channels 4 12
Signal polarity Active high Active low
Active low
Run-time adjustable parameter Period
Duty cycle
Update mode Synchronous
Period range 10 µs … 1600 ms 10 µs … 400 ms
Divided into 8 subranges Divided into 7 subranges
Resolution 100 ns … 25.6 µs 200 ns … 12.8 µs
Depends on the specified Depends on the specified
range. range.

Characteristics PWM PWM PWM


(DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Number of output channels 40 24 16
(3 ports with 16/16/8 channels) (2 ports with 16/8 channels)
Signal polarity Active high
Active low

181
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics PWM PWM PWM


(DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Run-time adjustable parameter Period
Duty cycle
Update mode Synchronous
Asynchronous
Period range 6.7 µs … 107.3 s
Divided into 16 subranges
Resolution 50 ns … 1.64 ms
Depends on the specified range.

Characteristics of the functions for signal generation with a variable


period The following table shows the main characteristics. For detailed
information, refer to the function descriptions.

Characteristics FREQ FREQ FREQ


(DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Number of output channels 40 24 16
(3 ports with 16/16/8 channels) (2 ports with 16/8 channels)
Signal polarity Active high
Active low
Run-time adjustable parameter Period
Update mode Synchronous
Period range 6.7 µs … 333.3 s
Divided into 16 subranges
Resolution 50 ns … 1.64 ms
Depends on the specified range.

Characteristics of the functions for PWM signal generation with a fixed


period and variable duty cycle The following table shows the main
characteristics. For detailed information, refer to the function descriptions.

Characteristics PWM_FP PWM_FP_TPU


(DIO Type 1) (DIO Type 1)
Number of output channels 2 12
Signal polarity Active high Active low
Active low
Run-time adjustable parameter Duty cycle
Update mode Synchronous
Period range 10 µs … 400 ms 10 µs … 400 ms
Divided into 6 subranges Divided into 7 subranges
Resolution 100 ns … 12.6 µs 200 ns … 12.8 µs
Depends on the specified Depends on the specified
period range period range

182
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Characteristics of the functions for multi-channel PWM signal


generation The following table shows the main characteristics. For detailed
information, refer to the function descriptions.

Characteristics MC_PWM (DCEA) MC_PWM (DCCA) MC_PWM MC_PWM


(DIO Type 1) (DIO Type 1) (DIO Type 3) (DIO Type 4)
Number of output 6 12 40 24
channels To get one 3‑phase To get one 3‑phase (3 ports with (2 ports with
signal. or 6‑phase signal. 16/16/8 channels) 16/8 channels)
Alignment mode Edge-aligned Center-aligned § Edge-aligned
§ Center-aligned
Inverted signals Not supported Supported
Run-time adjustable Duty cycle Duty cycle § Period
parameters § Duty cycle
Dead time Not supported Supported Supported1)
Update mode Synchronized to Synchronized to the Edge-aligned mode:
rising edges center of the low § Synchronized to rising edges
phases Center-aligned mode:
§ Synchronized to the center of the high pulses
(middle of a period)
§ Synchronized to the center of the low pulses
(start of a period)
§ Combination of both
Period range 20 µs … 209 ms 50 µs … 209 ms 6.7 µs … 107.3 s
Divided into Divided into Divided into 16 subranges
7 subranges 7 subranges
Resolution 200 ns … 12.8 µs 50 ns … 1.64 ms
Depends on the specified period range Depends on the specified range.
Interrupt Interrupt generation Interrupt generation Interrupt generation after 1 … 255 periods.
generation after after
1 … 256 periods. 1 … 127 periods.
Trigger generation Not supported Trigger generation after 1 … 255 periods.
Adjustable event Not supported Supported
(interrupt/trigger)
position
1) Depends on selected alignment mode.

Related topics Basics

Basics on Multi-Channel PWM Signal Generation (DCCA) ..................................................... 219


Basics on Multi-Channel PWM Signal Generation (DCEA) ...................................................... 216
Basics on Multi-Channel PWM Signal Generation on the DIO Type 3 ..................................... 225
Basics on Multi-Channel PWM Signal Generation on the DIO Type 4 ..................................... 237
PWM Generation (PWM) on the DIO 1552 Type 1 Unit ......................................................... 198
PWM Generation (PWM) on the DIO Type 3 Unit .................................................................. 188
PWM Generation (PWM) on the DIO Type 4 Unit .................................................................. 193
PWM Generation with a Fixed Period (PWM_FP) for EEC ....................................................... 210

183
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC ............................................... 213
PWM Generation with a Variable Period (PWM_TPU_VP) on the TPU for CC ......................... 186
PWM Generation with a Variable Period (PWM_VP) on the CTM ........................................... 184
Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit .................................... 207
Square-Wave Signal Generation (FREQ) on the DIO Type 3 Unit ............................................. 201
Square-Wave Signal Generation (FREQ) on the DIO Type 4 Unit ............................................. 204

PWM Generation with a Variable Period (PWM_VP) on the CTM

Purpose To generate active high or active low PWM signals with variable periods and
variable duty cycles adjustable during run time. Four PWM_VP outputs are
available.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics Four outputs are available for the generation of PWM signals on the CTM
(PWM_VP) with a run-time adjustable frequency and run‑time adjustable duty
cycle. You can generate PWM periods within the range of 10 µs … 1600 ms and
the duty cycle can be defined between 0.0 and 1.0.

184
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Within specified limits, you can set the


§ Duty cycle
§ PWM period
§ Polarity

The following illustration shows how the duty cycle (T/Tp ratio) and polarity are
defined.
PWM
output

polarity: active high


high

low
T Tp t

PWM
output

polarity: active low


high

low
Tp t

(PWM period)

The following period ranges are defined:

Range Minimum Period Maximum Period Resolution


1 0.2 µs1) 6.25 ms 0.1 μs
2 0.4 µs1) 12.5 ms 0.2 μs
3 0.8 µs1) 25 ms 0.4 μs
4 1.6 µs1) 50 ms 0.8 μs
5 3.2 µs1) 100 ms 1.6 μs
6 6.4 µs1) 200 ms 3.2 μs
7 12.8 µs 400 ms 6.4 μs
8 51.6 µs 1600 ms 25.6 μs
1) Through signal conditioning of the MicroAutoBox the minimum period is limited to 10 µs.

I/O mapping The following table shows the mapping of the logical PWM_VP channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector.

185
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Channel Signal I/O Connector Pin


1 CTM ch 5 out C4
2 CTM ch 6 out C5
3 CTM ch 7 out C6
4 CTM ch 8 out D3

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_PWM_VP_Mx_Cy ( MicroAutoBox RTI Reference)


PWM Generation with a Variable Period (PWM_VP) ( MicroAutoBox RTLib
Reference)
PWM Signal Generation with a Variable Period ( MicroAutoBox RTI Reference)

PWM Generation with a Variable Period (PWM_TPU_VP) on the TPU for CC

Purpose To generate low active square-wave signals with variable periods and variable
duty cycles adjustable during run time.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

186
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ – – –

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics For PWM generation 12 channels are available on the TPU. The generated PWM
signals are low active. Thus, the outputs are in high state after reset. You can
generate PWM periods within the range of 10 µs … 400 ms and the duty cycle
can be defined between 0.0 and 1.0.

The following period ranges are defined:

Range Minimum Period Maximum Period Resolution


1 6.4 µs1) 6.25 ms 0.2 μs
2 12.8 µs 12.5 ms 0.4 μs
3 25.6 µs 25 ms 0.8 μs
4 51.2 µs 50 ms 1.6 μs
5 102.4 µs 100 ms 3.2 μs
6 204.8 µs 200 ms 6.4 μs
7 409.6 µs 400 ms 12.8 μs
1) Through signal conditioning of the MicroAutoBox the minimum period is limited to 10 µs.

Note

You can use at most two TPU channels with the maximum frequency at the
same time.

I/O mapping The following table shows the mapping of the logical channel number, as used in
RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O connector.

Channel Signal I/O Connector Pin


1 TPU ch 1 out F6
2 TPU ch 2 out G1

187
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Channel Signal I/O Connector Pin


3 TPU ch 3 out G2
4 TPU ch 4 out G6
5 TPU ch 5 out H1
6 TPU ch 6 out H2
7 TPU ch 7 out H5
8 TPU ch 8 out H6
9 TPU ch 9 out J1
10 TPU ch 10 out J2
11 TPU ch 11 out J3
12 TPU ch 12 out J4

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_PWM_TPU_Mx_Cy ( MicroAutoBox RTI Reference)


PWM Generation with a Variable Period (PWM_VP) on the TPU for CC
( MicroAutoBox RTLib Reference)

PWM Generation (PWM) on the DIO Type 3 Unit

Purpose To generate a PWM signal with the period and duty cycle adjustable during run
time.

188
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics 40 digital outputs are available for generating PWM signals. These outputs are
shared with the other DIO Type 3 output functions. The output channels are
grouped to three ports with a different number of channels.

Port Number of
Channels/Bits
1 16
2 16
3 8

The following ranges are defined for PWM signal generation:

Range Meaning
Minimum Maximum Resolution
Period Period
1 100 ns1) 3.27 ms 50 ns
2 200 ns1) 6.55 ms 100 ns
3 400 ns1) 13.1 ms 200 ns
4 800 ns1) 26.2 ms 400 ns
5 1.6 µs1) 52.4 ms 800 ns
6 3.2 µs1) 104 ms 1.6 µs
7 6.4 µs1) 209 ms 3.2 µs
8 12.8 µs 419 ms 6.4 µs
9 25.6 µs 838 ms 12.8 µs
10 51.2 µs 1.67 s 25.6 µs
11 103 µs 3.35 s 51.2 µs
12 205 µs 6.71 s 103 µs
13 410 µs 13.4 s 205 µs
14 820 µs 26.8 s 410 µs
15 1.64 ms 53.6 s 820 µs
16 3.28 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

189
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Update mode A PWM signal is specified by its period and duty cycle. To change the signal
during run time, you can specify new values for the period and the duty cycle.

Synchronous update mode New values for the period and/or the duty cycle
are updated at the next rising edge of the PWM output signal. The update is
synchronous for constant period values only.
The following figure shows an example how the duty cycle will be updated in
synchronous update mode.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 50% 50% 30% 70%

Low
t
Function call anywhere
within the period

Asynchronous update mode New values for the period and/or the duty
cycle are updated immediately. The update is asynchronous to the period. This
can result in period and/or duty cycle values that differ from the old and the new
values for one period.
If you want to extend the current duty cycle, the update is immediately executed
when you call the update during high level. New values during low level are
updated at the next period.
If you want to reduce the current duty cycle, the update depends also on the
position within the high level. The following figures show how the duty cycle will
be updated in asynchronous update mode.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 30% 70% 30% 70%

Low
t
Time of the
function call

190
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

If the function call for updating is executed on high level before the new duty
cycle has been reached, the update takes place within the same period.

Change to
Duty cycle = 0.5 duty cycle = 0.3
30% 50%
High
50% 50% 30% 70%

Low
t
Time of the
function call

If the function call for updating is executed on high level between the new duty
cycle and the old duty cycle, the update results in a duty cycle within this interval
in the same period and a fully updated duty cycle in the next period.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 50% 50% 30% 70%

Low
t
Time of the
function call

If the function call for updating is executed on low level, the update takes place
at the next period.

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

I/O mapping The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

191
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3
2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5
3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

192
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Note

Concurrent access to the same digital output channel(s) by other DIO Type 3
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE3_PWM_BLx ( MicroAutoBox RTI Reference)


PWM Generation (PWM) on the DIO Type 3 ( MicroAutoBox RTLib Reference)

PWM Generation (PWM) on the DIO Type 4 Unit

Purpose To generate a PWM signal with the period and duty cycle adjustable during run
time.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

193
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics 24 digital outputs are available for generating PWM signals. These outputs are
shared with the other DIO Type 4 output functions. The output channels are
grouped to two ports with a different number of channels.

Port Number of
Channels/Bits
1 16
2 8

The following ranges are defined for PWM signal generation:

Range Meaning
Minimum Maximum Resolution
Period Period
1 100 ns1) 3.27 ms 50 ns
2 200 ns1) 6.55 ms 100 ns
3 400 ns1) 13.1 ms 200 ns
4 800 ns1) 26.2 ms 400 ns
5 1.6 µs1) 52.4 ms 800 ns
6 3.2 µs1) 104 ms 1.6 µs
7 6.4 µs1) 209 ms 3.2 µs
8 12.8 µs 419 ms 6.4 µs
9 25.6 µs 838 ms 12.8 µs
10 51.2 µs 1.67 s 25.6 µs
11 103 µs 3.35 s 51.2 µs
12 205 µs 6.71 s 103 µs
13 410 µs 13.4 s 205 µs
14 820 µs 26.8 s 410 µs
15 1.64 ms 53.6 s 820 µs
16 3.28 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

Update mode A PWM signal is specified by its period and duty cycle. To change the signal
during run time, you can specify new values for the period and the duty cycle.

Synchronous update mode New values for the period and/or the duty cycle
are updated at the next rising edge of the PWM output signal. The update is
synchronous for constant period values only.

194
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

The following figure shows an example how the duty cycle will be updated in
synchronous update mode.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 50% 50% 30% 70%

Low
t
Function call anywhere
within the period

Asynchronous update mode New values for the period and/or the duty
cycle are updated immediately. The update is asynchronous to the period. This
can result in period and/or duty cycle values that differ from the old and the new
values for one period.
If you want to extend the current duty cycle, the update is immediately executed
when you call the update during high level. New values during low level are
updated at the next period.
If you want to reduce the current duty cycle, the update depends also on the
position within the high level. The following figures show how the duty cycle will
be updated in asynchronous update mode.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 30% 70% 30% 70%

Low
t
Time of the
function call

If the function call for updating is executed on high level before the new duty
cycle has been reached, the update takes place within the same period.

Change to
Duty cycle = 0.5 duty cycle = 0.3
30% 50%
High
50% 50% 30% 70%

Low
t
Time of the
function call

195
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

If the function call for updating is executed on high level between the new duty
cycle and the old duty cycle, the update results in a duty cycle within this interval
in the same period and a fully updated duty cycle in the next period.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 50% 50% 30% 70%

Low
t
Time of the
function call

If the function call for updating is executed on low level, the update takes place
at the next period.

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

I/O mapping The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

196
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5
2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

197
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE4_PWM_BLx ( MicroAutoBox RTI Reference)


PWM Generation (PWM) on the DIO Type 4 ( MicroAutoBox RTLib Reference)

PWM Generation (PWM) on the DIO 1552 Type 1 Unit

Purpose To generate a PWM signal with the period and duty cycle adjustable during run
time using the DS1552 Multi-I/O Module.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics 16 digital outputs are available for generating PWM signals. These outputs are
shared with the other functions on the DIO 1552 Type 1 unit.

The following ranges are defined for PWM signal generation:

Range Meaning
Minimum Maximum Resolution
Period Period
1 100 ns1) 3.27 ms 50 ns
2 200 ns1) 6.55 ms 100 ns
3 400 ns1) 13.1 ms 200 ns
4 800 ns1) 26.2 ms 400 ns
5 1.6 µs1) 52.4 ms 800 ns
6 3.2 µs1) 104 ms 1.6 µs

198
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Range Meaning
Minimum Maximum Resolution
Period Period
7 6.4 µs1) 209 ms 3.2 µs
8 12.8 µs 419 ms 6.4 µs
9 25.6 µs 838 ms 12.8 µs
10 51.2 µs 1.67 s 25.6 µs
11 103 µs 3.35 s 51.2 µs
12 205 µs 6.71 s 103 µs
13 410 µs 13.4 s 205 µs
14 820 µs 26.8 s 410 µs
15 1.64 ms 53.6 s 820 µs
16 3.28 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

Update mode A PWM signal is specified by its period and duty cycle. To change the signal
during run time, you can specify new values for the period and the duty cycle.
The new values are updated according to the specified update mode.

Synchronous update mode New values for the period and/or the duty cycle
are updated at the next rising edge of the PWM output signal. The update is
synchronous for constant period values only.
The following figure shows an example how the duty cycle will be updated in
synchronous update mode.

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 50% 50% 30% 70%

Low
t
Function call anywhere
within the period

Asynchronous update mode New values for the period and/or the duty
cycle are updated immediately. The update is asynchronous to the period. This
can result in period and/or duty cycle values that differ from the old and the new
values for one period.
If you want to extend the current duty cycle, the update is immediately executed
when you call the update during high level. New values during low level are
updated at the next period.
If you want to reduce the current duty cycle, the update depends also on the
position within the high level. The following figure shows an example how the
duty cycle will be updated in asynchronous update mode.

199
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Change to
Duty cycle = 0.5 duty cycle = 0.3

High
50% 50% 30% 70% 30% 70%

Low
t
Time of the
function call

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

I/O mapping The following table shows the mapping of the channel number, as used in RTI
and RTLib, to the related I/O pin of the MicroAutoBox I/O connector (DS1512 or
DS1514 ZIF connector).

Channel Signal I/O Connector Pin


1 DigOut ch 1 F5
2 DigOut ch 2 E5
3 DigOut ch 3 E6
4 DigOut ch 4 D2
5 DigOut ch 5 D3
6 DigOut ch 6 D4
7 DigOut ch 7 D5
8 DigOut ch 8 D6
9 DigOut ch 9 C2
10 DigOut ch 10 C3
11 DigOut ch 11 C5
12 DigOut ch 12 B2
13 DigOut ch 13 B5
14 DigOut ch 14 B6
15 DigOut ch 15 A5
16 DigOut ch 16 A6

200
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Note

Concurrent access to the same digital output channel by other DIO 1552
Type 1 blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO1552_TP1_PWM_BLx ( MicroAutoBox RTI Reference)


PWM Generation (PWM) on the DIO 1552 Type 1 Unit of the DS1552 Multi-I/O
Module ( MicroAutoBox RTLib Reference)

Square-Wave Signal Generation (FREQ) on the DIO Type 3 Unit

Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50%.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics 40 digital outputs are available for generating square-wave signals. These
outputs are shared with the other DIO Type 3 output functions. The output
channels are grouped to three ports with a different number of channels.

201
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Number of
Channels/Bits
1 16
2 16
3 8

The following ranges are defined for square-wave signal generation:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

Update mode A frequency value changed during run time, is updated at the next rising edge of
the output signal (synchronous update mode).

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

I/O mapping The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

202
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3
2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5
3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

203
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Note

Concurrent access to the same digital output channel(s) by other DIO Type 3
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE3_FREQ_BLx ( MicroAutoBox RTI Reference)


PWM Generation (PWM) on the DIO Type 3 ( MicroAutoBox RTLib Reference)

Square-Wave Signal Generation (FREQ) on the DIO Type 4 Unit

Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50%.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

204
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Characteristics 24 digital outputs are available for generating square-wave signals. These
outputs are shared with the other DIO Type 4 output functions. The output
channels are grouped to two ports with a different number of channels.

Port Number of
Channels/Bits
1 16
2 8

The following ranges are defined for square-wave signal generation:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

Update mode A frequency value changed during run time, is updated at the next rising edge of
the output signal (synchronous update mode).

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

205
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

I/O mapping The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5
2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

206
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE4_FREQ_BLx ( MicroAutoBox RTI Reference)


PWM Generation (PWM) on the DIO Type 4 ( MicroAutoBox RTLib Reference)

Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit

Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50% using the DS1552 Multi-I/O Module.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics 16 digital outputs are available for generating square-wave signals. These
outputs are shared with the other functions of the DIO 1552 Type 1 unit.

The following ranges are defined for square-wave signal generation:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs

207
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Range Minimum Maximum Resolution


Frequency Frequency
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

Update mode A frequency value changed during run time, is updated at the next rising edge of
the output signal (synchronous update mode).

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

I/O mapping The following table shows the mapping of the channel number, as used in RTI
and RTLib, to the related I/O pin of the MicroAutoBox I/O connector (DS1512 or
DS1514 ZIF connector).

Channel Signal I/O Connector Pin


1 DigOut ch 1 F5
2 DigOut ch 2 E5
3 DigOut ch 3 E6
4 DigOut ch 4 D2
5 DigOut ch 5 D3
6 DigOut ch 6 D4
7 DigOut ch 7 D5
8 DigOut ch 8 D6
9 DigOut ch 9 C2
10 DigOut ch 10 C3
11 DigOut ch 11 C5
12 DigOut ch 12 B2
13 DigOut ch 13 B5
14 DigOut ch 14 B6

208
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period

Channel Signal I/O Connector Pin


15 DigOut ch 15 A5
16 DigOut ch 16 A6

Note

Concurrent access to the same digital output channel by other DIO 1552
Type 1 blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO1552_TP1_FREQ_BLx ( MicroAutoBox RTI Reference)


Square-Wave Signal Generation (FREQ) on the DIO 1552 Type 1 Unit of the DS1552
Multi-I/O Module ( MicroAutoBox RTLib Reference)

209
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM Signal Generation with a Fixed Period


Introduction MicroAutoBox provides the timing I/O feature to generate pulse-width
modulated signals with a fixed period.

Where to go from here Information in this section

PWM Generation with a Fixed Period (PWM_FP) for EEC ...................... 210

PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC .............. 213

PWM Generation with a Fixed Period (PWM_FP) for EEC

Purpose To generate PWM signals (PWM_FP) with fixed period and run‑time adjustable
duty cycle for extended engine control (EEC).

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – – ✓

For further information, refer to I/O Features and Boot Modes on page 105.

210
MicroAutoBox Features May 2018
PWM Signal Generation with a Fixed Period

Characteristics Two outputs are available for the generation of standard PWM signals on the
CTM with a fixed period (PWM_FP) and run‑time adjustable duty cycle. Within
specified limits, you can set the following parameters:
§ Duty cycle (T/Tp ratio)
§ Polarity

Symmetric mode is fixed. The PWM period Tp is limited within the range of 10
μs ... 400 ms and the duty cycle can be defined between 0.0 and 1.0. You
cannot change the period during run time. If you want to change the frequency
during run time, refer to PWM Generation with a Variable Period (PWM_VP) on
the CTM on page 184.

The following illustration shows how the duty cycle (T/Tp ratio) and polarity are
defined.
PWM
output

polarity: active high


high

low
T Tp t

PWM
output

polarity: active low


high

low
Tp t

(PWM period)

The following table shows the available ranges for PWM generation:

Range Minimum Period Maximum Period Resolution


1 0.2 µs 3.1 ms 0.1 μs
2 3.1 ms 6.25 ms 0.2 μs
3 6.25 ms 12.5 ms 0.4 μs
4 12.5 ms 25 ms 0.8 μs
5 25 ms 50 ms 1.6 μs
6 50 ms 400 ms 12.6 μs

211
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

I/O mapping The following table shows the mapping of the logical PWM_FP channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector.

Channel Signal I/O Connector Pin


1 CTM ch 2 out C3
2 CTM ch 4 out D5

Note

When software does not control the digital I/O signals (during reset or
before correct initialization) each output is in the same state as the
corresponding input: CTM ch 2 out has the same logical level as CTM ch 2
in, for example. Without connection, the input levels are high due to pull-
ups.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_PWM_FP_Mx_Cy ( MicroAutoBox RTI Reference)


PWM Generation with a Fixed Period (PWM_FP) for EEC ( MicroAutoBox RTLib
Reference)

212
MicroAutoBox Features May 2018
PWM Signal Generation with a Fixed Period

PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC

Purpose To generate PWM signals (PWM_FP_TPU) with fixed period and run‑time
adjustable duty cycle for extended engine control (EEC).

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

– ✓ ✓ ✓ – – – – DS1514

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – – ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics In addition to the PWM generation with a fixed period (PWM_FP), the TPU
provides twelve channels for the generation of standard PWM signals with a
fixed period (PWM_FP_TPU) and run‑time adjustable duty cycle.

Note

PWM_FP_TPU shares the output pins with the extended engine control
functions (PSP). This restricts the number of channels available for
PWM_FP_TPU if you use PSP functions at the same time.

The generated PWM signals are low active. Thus, the outputs are in high state
after reset. You can generate PWM periods within the range of 10 µs … 400 ms
and the duty cycle can be defined between 0.0 and 1.0.

213
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

The following ranges are defined:

Range Minimum Period Maximum Period Resolution


1 10 µs 6.25 ms 0.2 µs
2 12.8 µs 12.5 ms 0.4 µs
3 25.6 µs 25 ms 0.8 µs
4 51.2 µs 50 ms 1.6 µs
5 102.4 µs 100 ms 3.2 µs
6 204.8 µs 200 ms 6.4 µs
7 409.6 µs 400 ms 12.8 µs

Note

PMMX and PWM_FP_TPU must be initialized with the same range.

The following illustration shows how the duty cycle (T/Tp ratio) and polarity are
defined.
PWM
output T

polarity: active low


high

low
Tp t

(PWM period)

If you want to change the frequency during run time, refer to PWM Generation
with a Variable Period (PWM_VP) on the CTM on page 184.

I/O mapping The following table shows the mapping of the logical PWM_FP_TPU channel
numbers, as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox
I/O connector.

PWM_FP_TPU Shared with Passive Sensor Mode Active Sensor Mode


Channel PSP Channel
Signal I/O Signal I/O
Connector Connector
Pin Pin
1 1 TPU ch 2 out G1 TPU ch 3 out G2
2 2 TPU ch 3 out G2 TPU ch 4 out G6
3 3 TPU ch 4 out G6 TPU ch 5 out H1
4 4 TPU ch 5 out H1 TPU ch 6 out H2
5 5 TPU ch 6 out H2 TPU ch 7 out H5
6 6 TPU ch 7 out H5 TPU ch 8 out H6
7 7 TPU ch 8 out H6 TPU ch 9 out J1

214
MicroAutoBox Features May 2018
PWM Signal Generation with a Fixed Period

PWM_FP_TPU Shared with Passive Sensor Mode Active Sensor Mode


Channel PSP Channel
Signal I/O Signal I/O
Connector Connector
Pin Pin
8 8 TPU ch 9 out J1 TPU ch 10 out J2
9 9 TPU ch 10 out J2 TPU ch 11 out J3
10 10 TPU ch 11 out J3 TPU ch 12 out J4
11 11 TPU ch 12 out J4 TPU ch 13 out J5
12 12 TPU ch 13 out J5 TPU ch 14 out J6

Note

When software does not control the digital I/O signals (during reset or
before correct initialization) each output is in the same state as the
corresponding input: TPU ch 2 out has the same logical level as TPU ch 2 in,
for example. Without connection, the input levels are high due to pull-ups.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_PWM_FP_TPU_Mx_Cy ( MicroAutoBox RTI Reference)


PWM Generation with a Fixed Period (PWM_TPU_FP) for EEC ( MicroAutoBox
RTLib Reference)

215
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Multi-Channel PWM Signal Generation (MC_PWM)


Introduction MicroAutoBox provides the timing I/O feature to generate pulse-width
modulated signals on multi channels (MC_PWM).

Where to go from here Information in this section

Basics on Multi-Channel PWM Signal Generation (DCEA) .................... 216

Basics on Multi-Channel PWM Signal Generation (DCCA) .................... 219

Basics on Multi-Channel PWM Signal Generation on the DIO


Type 3 ................................................................................................. 225

Basics on Multi-Channel PWM Signal Generation on the DIO


Type 4 ................................................................................................. 237

Basics on Multi-Channel PWM Signal Generation (DCEA)

Purpose To generate a 3-phase edge-aligned multi-channel PWM signal.

Note

§ It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or
chassis control) within the same model. Thus, you must apply the same
boot mode throughout the whole RTI model running on the
MicroAutoBox.
§ For MicroAutoBox II 1401/1501, an I/O board version 7.x or higher is
needed. In the dSPACE experiment software, you can find information on
the MicroAutoBox variant and the I/O board version in the Properties
dialog of the MicroAutoBox.

216
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– ✓ – –

For further information, refer to I/O Features and Boot Modes on page 105.

Basics on multi-channel PWM Multi-channel PWM generation can be used to manage up to three half bridges
signal generation for three-phase current motor control, for example. The generation of the three-
phase sinusoidal output voltages u, v and w of the frequency converter is based
on multi-channel pulse width modulation.

The following image shows a three phase current.

u v w

The three phases have the same period and separately adjustable duty cycles. For
each phase there is an inverted and a non-inverted output signal.

Drives Control Edge Aligned Drives control edge-aligned provides multi-channel PWM signals with the rising
(DCEA) edge synchronized.

217
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

See the following example of edged-aligned PWM signals:

PWM U+

PWM V+

PWM W+
Period High time

Characteristics (DCEA) For drives control edge aligned, 7 channels are allocated, but only 6 channels are
used on the TPU for the non-inverted and the inverted signals. You can generate
PWM periods within the range of 25.4 µs … 209 ms and the duty cycles (1 – 3)
can be defined between 0.0 and 1.0. Depending on your setting, the TPU can
periodically generate a PPC interrupt after 1 … 256 PWM periods.

In the drives control edge-aligned boot mode you cannot use dead times.

The following table shows the available PWM ranges. According to the specified
period to be generated, the lowest period range and resolution are automatically
set.

Range Periodmax Resolution


1 3.27 ms 0.2 μs
2 6.55 ms 0.4 μs
3 13.1 ms 0.8 μs
4 26.2 ms 1.6 μs
5 52.4 ms 3.2 μs
6 104 ms 6.4 μs
7 209 ms 12.8 μs

I/O mapping (DCEA) The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

Function PWM Channel Signal I/O Connector Pin


For internal use TPU ch 1 out -
PWM U+ 1 TPU ch 2 out G1
PWM U+ 2 TPU ch 3 out G2
PWM V+ 3 TPU ch 4 out G6
PWM V+ 4 TPU ch 5 out H1
PWM W+ 5 TPU ch 6 out H2
PWM W+ 6 TPU ch 7 out H5

218
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Note

TPU channel 1 is used for internal purposes and thus has undefined signal
sequences at its output.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Basics on Multi-Channel PWM Signal Generation (DCCA) ..................................................... 219


Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_EA_MC_PWM_Mx ( MicroAutoBox RTI Reference)


Multi-Channel PWM Generation (TPU) for DCEA ( MicroAutoBox RTLib
Reference)

Basics on Multi-Channel PWM Signal Generation (DCCA)

Purpose To generate a 3- or 6-phase center-aligned multi channel PWM signal.

Note

§ It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or
chassis control) within the same model. Thus, you must apply the same
boot mode throughout the whole RTI model running on the
MicroAutoBox.
§ For MicroAutoBox II 1401/1501, an I/O board version 7.x or higher is
needed. In the dSPACE experiment software, you can find information on
the MicroAutoBox variant and the I/O board version in the Properties
dialog of the MicroAutoBox.

219
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – ✓ –

For further information, refer to I/O Features and Boot Modes on page 105.

Basics on multi-channel PWM Multi-channel PWM generation can be used to manage up to three half bridges
signal generation for three-phase current motor control, for example. The generation of the three-
phase sinusoidal output voltages u, v and w of the frequency converter is based
on multi-channel pulse width modulation.

The following image shows a three phase current.

u v w

Drives Control Center Aligned The drives control center aligned mode provides the possibility to use dead times
(DCCA) for reducing the effective PWM duty cycle slightly. This is useful if signals are
required to control the low or high-side of a half bridge. To do this, the two
switches of the half bridge must not be processed at the same time.
Uncontrolled currents may occur. This boot mode also provides the possibility to
use the PWM signal generation in 3-phase or 6-phase mode.

Characteristics (DCCA) For drives control center aligned 14 channels are reserved on the TPU. You can
choose between 3-phase or 6-phase PWM signal generation.

220
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Within specified limits you can set the


§ PWM period
§ Run time adjustable duty cycles (T/Tp ratio)
§ Dead time
§ Interrupt rate (The TPU can periodically generate a PPC interrupt after 1 …
127 PWM periods)

Signal characteristics of a 3-phase PWM signal

TP
TP / 2
Thigh, U
PWM U+

t
Thigh, V
PWM V+

t
Thigh, W

PWM W+

t
∆t Update for
duty cycles
Center position Master interrupt Center position
of high times of low times

221
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Signal characteristics of a 6-phase PWM signal


TP
TP / 2
PWM U–

t
Thigh, U
PWM U+

PWM V–

t
Thigh, V
PWM V+

PWM W–

t
Thigh, W
PWM W+

t
∆t Update for
duty cycles
Center position Master interrupt Center position
of high times of low times

You can generate PWM periods within the range of 50 µs … 209 ms and the
duty cycles (1 … 3) can be defined between 0.0 and 1.0. The dead time depends
on the resolution.

The following table shows the available maximum dead times. According to the
specified period to be generated, the lowest period range and resolution are
automatically set.

Range Periodmax DeadTimemax Resolution


1 3.27 ms 25.4 μs 0.2 μs
2 6.55 ms 50.8 μs 0.4 μs
3 13.1 ms 101 μs 0.8 μs

222
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Range Periodmax DeadTimemax Resolution


4 26.2 ms 203 μs 1.6 μs
5 52.4 ms 406 μs 3.2 μs
6 104 ms 812 μs 6.4 μs
7 209 ms 1620 μs 12.8 μs

Dead time With the dead time parameter, you can define the timing relationship between
each of the 3 PWM output signals and their corresponding inverted output
signals, for example, to avoid ripple currents or prevent shoot-through currents
on the phase drivers. The high times of the non-inverted output signals are
reduced symmetrically by the dead time. The following illustration shows center-
aligned multi-channel PWM with a specified dead time.

High time

PWM U–

Dead time/2 Dead time/2


High time – Dead time

PWM U+

I/O mapping (DCCA) The number of channels used for signal generation depends on the specified
mode (3-phase or 6-phase PWM), but the number of reserved channels is always
14.

For 3-phase PWM signals, the non-inverted signals U+, V+ and W+ and their
inverted signals U+, V+ and W+are generated.

For 6-phase PWM signals, the non-inverted signals U+, V+, W+, the negated
signals U-, V-, W- and their inverted signals are generated.

The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

I/O Mapping using 3-phase multi-channel PWM

Function PWM Channel Signal I/O Connector Pin


For internal use TPU ch 1 out -
- - TPU ch 2 out -
- - TPU ch 3 out -
PWM U+ 1 TPU ch 4 out G6
PWM U+ 2 TPU ch 5 out H1

223
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Function PWM Channel Signal I/O Connector Pin


- - TPU ch 6 out -
- - TPU ch 7 out -
PWM V+ 3 TPU ch 8 out H6
PWM V+ 4 TPU ch 9 out J1
- - TPU ch 10 out -
- - TPU ch 11 out -
PWM W+ 5 TPU ch 12 out J4
PWM W+ 6 TPU ch 13 out J5
For internal use TPU ch 14 out -

Note

The TPU channels 1 and 14 are used for internal purposes and thus have
undefined signal sequences at their outputs. TPU channels 2, 3, 6, 7, 10 and
11 are not used for signal generation.

I/O Mapping using 6-phase multi-channel PWM

Function PWM Channel Signal I/O Connector Pin


For internal use TPU ch 1 out -
PWM U– 1 TPU ch 2 out G1
PWM U– 2 TPU ch 3 out G2
PWM U+ 3 TPU ch 4 out G6
PWM U+ 4 TPU ch 5 out H1
PWM V– 5 TPU ch 6 out H2
PWM V– 6 TPU ch 7 out H5
PWM V+ 7 TPU ch 8 out H6
PWM V+ 8 TPU ch 9 out J1
PWM W– 9 TPU ch 10 out J2
PWM W– 10 TPU ch 11 out J3
PWM W+ 11 TPU ch 12 out J4
PWM W+ 12 TPU ch 13 out J5
For internal use TPU ch 14 out -

Note

The TPU channels 1 and 14 are used for internal purposes and thus have
undefined signal sequences at their outputs.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

224
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)

Related topics Basics

Basics on Multi-Channel PWM Signal Generation (DCEA) ...................................................... 216


Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE1_CA_MC_PWM_Mx ( MicroAutoBox RTI Reference)


Multi-Channel PWM Generation (TPU) for DCCA ( MicroAutoBox RTLib
Reference)

Basics on Multi-Channel PWM Signal Generation on the DIO Type 3

Purpose To generate different kinds of multi-channel PWM signals.

Note

To use the multi-channel PWM signal generation on the DIO Type 3,


firmware version 1.3 or higher is required.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Basics on multi-channel PWM The multi-channel PWM signal generation on the DIO Type 3 can be flexibly
signal generation on the DIO configured for any number of channels within the limits of available output
Type 3 channels. You can use it to generate from 1‑phase PWM signals up to 16-phase
PWM signals according to your needs.

225
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics The DIO Type 3 unit provides 40 digital output channels. These channels are
grouped to three ports with 16, 16 and 8 channels. Besides the number of
channels, each port can be identically configured. The assignment of I/O
channels can only be done within one port. This guarantees data consistency.

In the initialization phase of the multi-channel PWM signal generation, the


following settings can be specified:
§ Number of channels used for the non-inverted PWM signal generation
including the start channel within one port
§ Settings of the low-side and high-side switches
§ Period range for the signals to be generated and the related resolutions (refer
to Period ranges and resolutions on page 234)
§ Alignment of the channels (refer to Alignment mode on page 226)
§ Update mode (refer to Update mode on page 229)
§ Generation of inverted signals (refer to Generation of inverted signals
on page 228)
§ Generation of interrupts (refer to Generation and configuration of interrupts
and triggers on page 232)
§ Generation of external trigger signals (refer to Generation and configuration
of interrupts and triggers on page 232)
§ Rate and time delay for interrupts and triggers (refer to Generation and
configuration of interrupts and triggers on page 232)
§ Dead time (refer to Specifying dead time on page 233)

During run time, you can change the following parameters:


§ Period
§ Duty cycles

Alignment mode For multi-channel PWM signal generation, you can configure how the signals are
aligned to each other. You can choose between center-aligned signal generation
and edge-aligned signal generation.

Signal characteristics of a center-aligned PWM signal The following


example shows a center-aligned 3‑phase PWM signal. The signals are aligned to
the middle of their periods, which is also the middle of their high pulses.

226
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

PWM U+

PWM V+

PWM W+

Center postion of Center postion of


high times (middle low times (start of
of a period) a period)

Signal characteristics of an edge-aligned PWM signal The following


example shows an edge-aligned 3‑phase PWM signal. The signals are aligned to
their rising edges.

TP

Thigh, U
PWM U+

t
Thigh, V
PWM V+

t
Thigh, W

PWM W+

227
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Settings that depend on the alignment mode Depending on the specified


alignment mode, not all the configurations are available for some settings. The
following table gives you an overview.

Alignment Update Mode Dead Time


Edge-aligned § At the start of a period Not available
Center-aligned § At the start of a period Available
and/or
§ at the middle of a period

Generation of inverted You can specify the generation of inverted signals for center-aligned PWM signal
signals generation. The number of required channels is then automatically doubled. The
number of required channels must not exceed the number of available channels.

228
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Signal characteristics of a center-aligned PWM signal with inverted


signals The following example shows a center-aligned 3‑phase PWM signal
generation with inverted signals.
TP
TP / 2

Thigh, U
PWM U+

t
Thigh, V
PWM V+

t
Thigh, W
PWM W+

PWM U-

PWM V-

PWM W-

Center postion of Center postion of


high times (middle low times (start of
of a period) a period)

Update mode During run time, you can specify new values for the period and the duty cycles.
With the update mode, you can specify the timing behavior of the update.

The duty cycles have to be specified for the non-inverted channels. If you have
enabled the generation of inverted signals, their duty cycles are automatically
adjusted.

229
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Synchronous update for edge-aligned multi-channel PWM signal


generation New values for the period and/or the duty cycles are updated at
the next rising edge of the PWM output signal.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in synchronous update mode.

Change to
Duty cycle U = 0.5 duty cycle = 0.7
PWM U+
50% 50% 70%
50% 50% 30%
t

Change to
Duty cycle V = 0.3 duty cycle = 0.5
PWM V+
30% 30% 50%
70% 70% 50%
t

Change to
Duty cycle = 0.2 duty cycle = 0.3
PWM W+
20% 20% 30%
80% 80% 70%
t
Function call anywhere
within the period

Update at the middle of the high pulses for center-aligned multi-channel


PWM signal generation New values for the period and/or the duty cycles
are updated at the middle of the high pulses of the PWM output signals.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in the CENTER update mode.
The update function must be called before the next middle of the high pulses
(Δt) for considering the new values at the second half of the current high pulses.

230
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Change to
Duty cycle U = 0.5 duty cycle = 0.7

50% 50% 25% 35% 70%

Change to
Duty cycle V = 0.3 duty cycle = 0.5 15% 25%
30% 30% 50%

Change to
Duty cycle = 0.2 duty cycle = 0.3
10% 15%
20% 20% 30%

<D t >D t t

Function call anywhere Middle of a period


within the range

Update at the start of a period for center-aligned multi-channel PWM


signal generation New values for the period and/or the duty cycles are
updated at the start of a period (middle of the low pulses) of the PWM output
signals.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in the START update mode.

231
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

The update function must be called before the middle of the low pulses (Δt; start
of the period) for considering the new values at the following period.

Change to
Duty cycle U = 0.5 duty cycle = 0.7

50% 50% 70%

Change to
Duty cycle V = 0.3 duty cycle = 0.5

30% 30% 50%

Change to
Duty cycle = 0.2 duty cycle = 0.3

20% 20% 30%

<D t >D t t

Start of a period
Function call anywhere
within the range

In center-aligned mode, you can combine the both full-cycle update modes.
Then, new values are updated at the start of a period and in the middle of the
high pulses, whichever occurs first. In this half-cycle update mode, changes take
effect faster.

Generation and configuration You can specify to generate interrupts and external trigger pulses during multi-
of interrupts and triggers channel PWM signal generation.

An interrupt can be used to trigger an interrupt service routine, an external


trigger pulse can be used for external triggering. For example, you can use an
external trigger pulse to start an A/D conversion. When you enable the trigger
pulse generation an additional output channel is automatically allocated.

Interrupts and external trigger pulses can be generated at the start and/or in the
middle of a period.

The generation of interrupts and external trigger pulses can be specified


separately. Either you enable the interrupt generation or the trigger pulse
generation, or both. However, the configuration of interrupts and external
trigger pulses is commonly. Interrupts and external trigger pulses are handled as
events of the multi-channel PWM signal generation. For these events, you can
specify an event rate in the range 1 … 255 and a delay.

The following example shows an edge-aligned multi-channel PWM signal


generation with an event rate of 3 and an event delay Δt. Each 3rd rising edge
(start of a period) is used for generating an event (interrupt and/or external
trigger pulse).

232
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Event rate = 3
Interrupt Interrupt

∆t ∆t t
Event delay
Start of a period

The following example shows a center-aligned multi-channel PWM signal


generation with an event rate of 2 and an event delay Δt. An interrupt and an
external trigger pulse are generated at each second middle of the high times
(middle of the period) and at each second middle of the low times (start of a
period).
Event rate = 2
External External External External
trigger trigger trigger trigger

Interrupt Interrupt Interrupt Interrupt

Event delay t
∆t ∆t ∆t ∆t

Start of a period

Middle of the high times

Specifying dead time With the dead time parameter, you can define the timing relationship between
the PWM output signals and their corresponding inverted output signals for
center-aligned PWM signal generation. The specified dead time is valid for all the
channels of the current multi-channel PWM group. Dead times are used, for
example, to avoid ripple currents or prevent shoot-through currents on the phase
drivers. The high times of the inverted and non-inverted output signals are
reduced symmetrically. The following illustration shows center-aligned multi-
channel PWM with a specified dead time.

233
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM U+

t
Dead time Dead time

PWM U–

The dead time can be specified in the range 0 … 12.8 µs. If the high time of the
inverted or non-inverted signal is less than the specified dead time, the signal
remains in low state.

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

Period ranges and resolutions The period range is divided into 16 ranges. For each range, there is a specific
resolution.

Due to quantization effects, you might encounter considerable deviations


between the desired PWM period and the generated PWM period, especially for
higher PWM frequencies. To avoid poor frequency resolution, you should
therefore select the period range with the best possible resolution (resolution
values as small as possible).

Range Meaning
Minimum Maximum Resolution
Period Period
1 200 ns1) 3.27 ms 50 ns
2 400 ns1) 6.55 ms 100 ns
3 800 ns1) 13.1 ms 200 ns
4 1.6 µs1) 26.2 ms 400 ns
5 3.2 µs1) 52.4 ms 800 ns
6 6.4 µs1) 104 ms 1.6 µs
7 12.8 µs 209 ms 3.2 µs
8 25.6 µs 419 ms 6.4 µs

234
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Range Meaning
Minimum Maximum Resolution
Period Period
9 51.2 µs 838 ms 12.8 µs
10 103 µs 1.67 s 25.6 µs
11 205 µs 3.35 s 51.2 µs
12 410 µs 6.71 s 103 µs
13 820 µs 13.4 s 205 µs
14 1.64 ms 26.8 s 410 µs
15 3.28 ms 53.6 s 820 µs
16 6.56 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

RTI/RTLib support The multi-channel PWM signal generation is supported by RTI and RTLib. For
detailed information, refer to:
§ DIO_TYPE3_MC_PWM_BLx ( MicroAutoBox RTI Reference)
§ Multi-Channel PWM Generation (MC_PWM) on the DIO Type 3
( MicroAutoBox RTLib Reference)

I/O mapping The following table shows the order of the generated signals.

Without Inverted Signals With Inverted Signals


Non-inverted signal 1 Non-inverted signal 1
... ...
Non-inverted signal n Non-inverted signal n
External trigger signal (optional) Inverted signal 1
...
Inverted signal n
External trigger signal (optional)

The number of required channels must not exceed the number of available
channels on the selected port.

The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

235
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3
2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5
3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

236
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Note

Concurrent access to the same digital output channel(s) by other DIO Type 3
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE3_MC_PWM_BLx ( MicroAutoBox RTI Reference)


Multi-Channel PWM Generation (MC_PWM) on the DIO Type 3 ( MicroAutoBox
RTLib Reference)

Basics on Multi-Channel PWM Signal Generation on the DIO Type 4

Purpose To generate different kinds of multi-channel PWM signals.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

237
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Basics on multi-channel PWM The multi-channel PWM signal generation on the DIO Type 4 can be flexibly
signal generation on the DIO configured for any number of channels within the limits of available output
Type 4 channels. You can use it to generate from 1‑phase PWM signals up to 16-phase
PWM signals according to your needs.

Characteristics The DIO Type 4 unit provides 24 digital output channels. These channels are
grouped to two ports with 16 and 8 channels. Besides the number of channels,
each port can be identically configured. The assignment of I/O channels can only
be done within one port. This guarantees data consistency.

In the initialization phase of the multi-channel PWM signal generation, the


following settings can be specified:
§ Number of channels used for the non-inverted PWM signal generation
including the start channel within one port
§ Settings of the low-side and high-side switches
§ Period range for the signals to be generated and the related resolutions (refer
to Period ranges and resolutions on page 246)
§ Alignment of the channels (refer to Alignment mode on page 238)
§ Update mode (refer to Update mode on page 241)
§ Generation of inverted signals (refer to Generation of inverted signals
on page 240)
§ Generation of interrupts (refer to Generation and configuration of interrupts
and triggers on page 244)
§ Generation of external trigger signals (refer to Generation and configuration
of interrupts and triggers on page 244)
§ Rate and time delay for interrupts and triggers (refer to Generation and
configuration of interrupts and triggers on page 244)
§ Dead time (refer to Specifying dead time on page 245)

During run time, you can change the following parameters:


§ Period
§ Duty cycles

Alignment mode For multi-channel PWM signal generation, you can configure how the signals are
aligned to each other. You can choose between center-aligned signal generation
and edge-aligned signal generation.

Signal characteristics of a center-aligned PWM signal The following


example shows a center-aligned 3‑phase PWM signal. The signals are aligned to
the middle of their periods, which is also the middle of their high pulses.

238
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

PWM U+

PWM V+

PWM W+

Center postion of Center postion of


high times (middle low times (start of
of a period) a period)

Signal characteristics of an edge-aligned PWM signal The following


example shows an edge-aligned 3‑phase PWM signal. The signals are aligned to
their rising edges.

TP

Thigh, U
PWM U+

t
Thigh, V
PWM V+

t
Thigh, W

PWM W+

239
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Settings that depend on the alignment mode Depending on the specified


alignment mode, not all the configurations are available for some settings. The
following table gives you an overview.

Alignment Update Mode Dead Time


Edge-aligned § At the start of a period Not available
Center-aligned § At the start of a period Available
and/or
§ at the middle of a period

Generation of inverted You can specify the generation of inverted signals for center-aligned PWM signal
signals generation. The number of required channels is then automatically doubled. The
number of required channels must not exceed the number of available channels.

240
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Signal characteristics of a center-aligned PWM signal with inverted


signals The following example shows a center-aligned 3‑phase PWM signal
generation with inverted signals.
TP
TP / 2

Thigh, U
PWM U+

t
Thigh, V
PWM V+

t
Thigh, W
PWM W+

PWM U-

PWM V-

PWM W-

Center postion of Center postion of


high times (middle low times (start of
of a period) a period)

Update mode During run time, you can specify new values for the period and the duty cycles.
With the update mode, you can specify the timing behavior of the update.

The duty cycles have to be specified for the non-inverted channels. If you have
enabled the generation of inverted signals, their duty cycles are automatically
adjusted.

241
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Synchronous update for edge-aligned multi-channel PWM signal


generation New values for the period and/or the duty cycles are updated at
the next rising edge of the PWM output signal.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in synchronous update mode.

Change to
Duty cycle U = 0.5 duty cycle = 0.7
PWM U+
50% 50% 70%
50% 50% 30%
t

Change to
Duty cycle V = 0.3 duty cycle = 0.5
PWM V+
30% 30% 50%
70% 70% 50%
t

Change to
Duty cycle = 0.2 duty cycle = 0.3
PWM W+
20% 20% 30%
80% 80% 70%
t
Function call anywhere
within the period

Update at the middle of the high pulses for center-aligned multi-channel


PWM signal generation New values for the period and/or the duty cycles
are updated at the middle of the high pulses of the PWM output signals.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in the CENTER update mode.
The update function must be called before the next middle of the high pulses
(Δt) for considering the new values at the second half of the current high pulses.

242
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Change to
Duty cycle U = 0.5 duty cycle = 0.7

50% 50% 25% 35% 70%

Change to
Duty cycle V = 0.3 duty cycle = 0.5 15% 25%
30% 30% 50%

Change to
Duty cycle = 0.2 duty cycle = 0.3
10% 15%
20% 20% 30%

<D t >D t t

Function call anywhere Middle of a period


within the range

Update at the start of a period for center-aligned multi-channel PWM


signal generation New values for the period and/or the duty cycles are
updated at the start of a period (middle of the low pulses) of the PWM output
signals.
The following figure shows an example how the duty cycles of a 3‑phase PWM
will be updated in the START update mode.

243
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

The update function must be called before the middle of the low pulses (Δt; start
of the period) for considering the new values at the following period.

Change to
Duty cycle U = 0.5 duty cycle = 0.7

50% 50% 70%

Change to
Duty cycle V = 0.3 duty cycle = 0.5

30% 30% 50%

Change to
Duty cycle = 0.2 duty cycle = 0.3

20% 20% 30%

<D t >D t t

Start of a period
Function call anywhere
within the range

In center-aligned mode, you can combine the both full-cycle update modes.
Then, new values are updated at the start of a period and in the middle of the
high pulses, whichever occurs first. In this half-cycle update mode, changes take
effect faster.

Generation and configuration You can specify to generate interrupts and external trigger pulses during multi-
of interrupts and triggers channel PWM signal generation.

An interrupt can be used to trigger an interrupt service routine, an external


trigger pulse can be used for external triggering. For example, you can use an
external trigger pulse to start an A/D conversion. When you enable the trigger
pulse generation an additional output channel is automatically allocated.

Interrupts and external trigger pulses can be generated at the start and/or in the
middle of a period.

The generation of interrupts and external trigger pulses can be specified


separately. Either you enable the interrupt generation or the trigger pulse
generation, or both. However, the configuration of interrupts and external
trigger pulses is commonly. Interrupts and external trigger pulses are handled as
events of the multi-channel PWM signal generation. For these events, you can
specify an event rate in the range 1 … 255 and a delay.

The following example shows an edge-aligned multi-channel PWM signal


generation with an event rate of 3 and an event delay Δt. Each 3rd rising edge
(start of a period) is used for generating an event (interrupt and/or external
trigger pulse).

244
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Event rate = 3
Interrupt Interrupt

∆t ∆t t
Event delay
Start of a period

The following example shows a center-aligned multi-channel PWM signal


generation with an event rate of 2 and an event delay Δt. An interrupt and an
external trigger pulse are generated at each second middle of the high times
(middle of the period) and at each second middle of the low times (start of a
period).
Event rate = 2
External External External External
trigger trigger trigger trigger

Interrupt Interrupt Interrupt Interrupt

Event delay t
∆t ∆t ∆t ∆t

Start of a period

Middle of the high times

Specifying dead time With the dead time parameter, you can define the timing relationship between
the PWM output signals and their corresponding inverted output signals for
center-aligned PWM signal generation. The specified dead time is valid for all the
channels of the current multi-channel PWM group. Dead times are used, for
example, to avoid ripple currents or prevent shoot-through currents on the phase
drivers. The high times of the inverted and non-inverted output signals are
reduced symmetrically. The following illustration shows center-aligned multi-
channel PWM with a specified dead time.

245
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM U+

t
Dead time Dead time

PWM U–

The dead time can be specified in the range 0 … 12.8 µs. If the high time of the
inverted or non-inverted signal is less than the specified dead time, the signal
remains in low state.

Configuring the switches The output state of a digital output channel depends on its individual settings for
the low-side switch L (GND) and the high-side switch H (VDRIVE).
§ If the low-side switch L (GND) is enabled, the output is actively driven to GND.
§ If the high-side switch H (VDRIVE) is enabled, the output is actively driven to
VDRIVE.
§ If you set low-side switch L (GND) and high-side switch H (VDRIVE), the digital
output channel is actively driven to both VDRIVE and GND (push-pull mode).

Period ranges and resolutions The period range is divided into 16 ranges. For each range, there is a specific
resolution.

Due to quantization effects, you might encounter considerable deviations


between the desired PWM period and the generated PWM period, especially for
higher PWM frequencies. To avoid poor frequency resolution, you should
therefore select the period range with the best possible resolution (resolution
values as small as possible).

Range Meaning
Minimum Maximum Resolution
Period Period
1 200 ns1) 3.27 ms 50 ns
2 400 ns1) 6.55 ms 100 ns
3 800 ns1) 13.1 ms 200 ns
4 1.6 µs1) 26.2 ms 400 ns
5 3.2 µs1) 52.4 ms 800 ns
6 6.4 µs1) 104 ms 1.6 µs
7 12.8 µs 209 ms 3.2 µs
8 25.6 µs 419 ms 6.4 µs

246
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Range Meaning
Minimum Maximum Resolution
Period Period
9 51.2 µs 838 ms 12.8 µs
10 103 µs 1.67 s 25.6 µs
11 205 µs 3.35 s 51.2 µs
12 410 µs 6.71 s 103 µs
13 820 µs 13.4 s 205 µs
14 1.64 ms 26.8 s 410 µs
15 3.28 ms 53.6 s 820 µs
16 6.56 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

RTI/RTLib support The multi-channel PWM signal generation is supported by RTI and RTLib. For
detailed information, refer to:
§ DIO_TYPE4_MC_PWM_BLx ( MicroAutoBox RTI Reference)
§ Multi-Channel PWM Generation (MC_PWM) on the DIO Type 4
( MicroAutoBox RTLib Reference)

I/O mapping The following table shows the order of the generated signals.

Without Inverted Signals With Inverted Signals


Non-inverted signal 1 Non-inverted signal 1
... ...
Non-inverted signal n Non-inverted signal n
External trigger signal (optional) Inverted signal 1
...
Inverted signal n
External trigger signal (optional)

The number of required channels must not exceed the number of available
channels on the selected port.

The following table shows the mapping of the port number and channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

247
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5
2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

248
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)

Related topics Basics

Overview of the Signal Generation Functionalities ................................................................. 180

References

DIO_TYPE4_MC_PWM_BLx ( MicroAutoBox RTI Reference)


Multi-Channel PWM Generation (MC_PWM) on the DIO Type 4 ( MicroAutoBox
RTLib Reference)

249
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

PWM Signal Measurement (PWM2D)


Introduction MicroAutoBox provides the timing I/O feature to measure pulse-width modulated
signals (PWM2D).

Where to go from here Information in this section

Overview of the Signal Measurement Functionalities ............................ 250

PWM Measurement (PWM2D) on the TPU for CC ................................ 253

PWM Measurement (PWM2D) on the DIO Type 3 Unit ......................... 255

PWM Measurement (PWM2D) on the DIO Type 4 Unit ......................... 259

PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit ................ 263

Overview of the Signal Measurement Functionalities

Introduction MicroAutoBox provides various methods for signal measurement depending on


the available hardware and the specified boot mode.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
Signal Measurement
DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

FPW2D ✓1) ✓1) ✓1) – – – – –


PWM2D – – – – ✓ ✓2) ✓ ✓2)
PPM (CTM) ✓3) ✓3) ✓3) – – – – –
PPM (TPU) ✓1) ✓1) ✓1) – – – – –
F2D – – – – ✓ ✓2) ✓ ✓2)
PW2D – – – – ✓ – ✓ –
1) CC boot mode is needed
2) Requires a DS1552 Multi-I/O Module.
3) Available in all boot modes

250
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Overview of the The signal measurement functions can be divided into the following four main
characteristics groups:
§ PWM signal measurement (PWM2D)
§ Pulse pattern measurement (PPM, FPW2D)
§ Frequency measurement (F2D)
§ Pulse width measurement (PW2D)

Characteristics of the functions for PWM signal measurement The


following table shows the main characteristics. For detailed information, refer to
the function descriptions.

Characteristics PWM2D PWM2D PWM2D PWM2D


(TPU) (DIO Type 3) (DIO Type 4) (DIO 1552
Type 1)
Number of input 4 40 24 16
channels (3 ports with (2 ports with
16/16/8 channels) 16/8 channels)
Measured values Pulse width
Frequency
Signal detection Rising edge Depends on the update mode
Averaging No
Update mode Synchronous Synchronous
Asynchronous
Period range 10 µs … 100 ms 6.7 µs … 107.3 s
Divided into Divided into 16 subranges
4 subranges
Resolution 400 ns … 3.2 µs 50 ns … 1.62 ms
Depends on the Depends on the specified range.
specified range.

Characteristics of the functions for pulse pattern and frequency


measurement The following table shows the main characteristics. For
detailed information, refer to the function descriptions.

Characteristics PPM PPM


(FPW2D on CTM) (FPW2D on TPU)
Number of input channels CC1)/DC2): 4 4
EEC3): 2
Measured values Pulse width
Frequency
Signal detection Rising edge
Falling edge
Averaging No For 1 … 255 periods
Update mode Synchronous
Frequency range 1.25 Hz … 100 kHz 37.3 mHz … 2.5 MHz
(12.8 µs … 800 ms pulse width range) (15 µs … 26.8 s pulse width range)
Divided into 6 subranges Divided into 4 subranges

251
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics PPM PPM


(FPW2D on CTM) (FPW2D on TPU)
Resolution 100 ns … 12.8 µs 400 ns … 3.2 µs
Depends on the specified frequency range Depends on the specified frequency range
1) CC: Chassis control
2) DC: Drives control center aligned or edge aligned
3) EEC: Extended engine control

Characteristics F2D F2D F2D


(DIO Type 3) (DIO Type 4) (DIO 1552 Type 1)
Number of input channels 40 24 16
(3 ports with 16/16/8 channels) (2 ports with 16/8 channels)
Measured values Frequency
Signal detection Rising edge
Averaging No
Update mode Synchronous
Frequency range 0.3 mHz … 150 kHz
Divided into 16 subranges
Resolution 50 ns … 1.64 ms
Depends on the specified period range

Characteristics of the functions for pulse width measurement The


following table shows the main characteristics. For detailed information, refer to
the function descriptions.

Characteristics PW2D PW2D


(DIO Type 3) (DIO Type 4)
Number of input channels 40 24
(3 ports with 16/16/8 channels) (2 ports with 16/8 channels)
Measured values Pulse width
Measurement mode High time pulses or low time pulses
Averaging No
Update mode After each specified pulse, according to the specified measurement mode
Pulse width range 3.33 µs … 53.6 s
Divided into 16 subranges
Resolution 50 ns … 1.64 ms
Depends on the specified range.

Related topics Basics

Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit ................................................. 278
Frequency Measurement (F2D) on the DIO Type 3 Unit .......................................................... 271
Frequency Measurement (F2D) on the DIO Type 4 Unit .......................................................... 275
Pulse Pattern Measurement (PPM, FPW2D) on the CTM ........................................................ 266
Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC .............................................. 269
PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit ................................................. 263

252
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

PWM Measurement (PWM2D) on the DIO Type 3 Unit .......................................................... 255


PWM Measurement (PWM2D) on the DIO Type 4 Unit .......................................................... 259
PWM Measurement (PWM2D) on the TPU for CC ................................................................. 253

PWM Measurement (PWM2D) on the TPU for CC

Purpose To measure frequency and duty cycle of PWM signals in chassis control boot
mode.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ – – –

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics For analysis of the frequency and duty cycle of PWM signals, four PWM2D inputs
are available. The three edges of a period are detected and used to measure the
time between the edges. With the measured times, the frequency and duty cycle
are calculated and returned.

253
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Note

Each channel can be configured separately to perform either PWM


measurement (PWM2D) or pulse pattern measurement (PPM). The specified
range must be the same for all four channels. See also Pulse Pattern
Measurement (PPM, FPW2D) on the TPU for CC on page 269.

The following ranges are defined for PWM2D measurement:

Range PWM2D: Pulse Width Resolution


Minimum Maximum
1 10 μs 12.5 ms 0.4 μs
2 10 μs 25 ms 0.8 μs
3 10 μs 50 ms 1.6 μs
4 10 μs 100 ms 3.2 μs

Note

§ The maximum frequency and the minimum pulse width are limited to 100
kHz (= 10.0 µs) by a low pass filter. In addition, the Fmax of 100 kHz can
only be reached by measuring with one channel. If all channels are used
the maximum frequency is limited to 20 kHz (all channels are connected
to the same input signal, triggering on rising edge).
§ If the frequency of the signal is below the lower range limit, a frequency
of 0 Hz will be detected. If the pulse width is longer than the selected
maximum, the detected value is 0 or infinity.
§ All channels must be initialized for the same range.

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

I/O mapping The following table shows the mapping of the logical PWM2D channel number,
as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

254
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

PWM2D Channel Signal I/O Connector Pin


1 TPU ch 13 in S3
2 TPU ch 14 in S4
3 TPU ch 15 in S5
4 TPU ch 16 in S6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

PWM Signal Measurement ( MicroAutoBox RTI Reference)


PWM Signal Measurement (TPU) for CC ( MicroAutoBox RTLib Reference)

PWM Measurement (PWM2D) on the DIO Type 3 Unit

Purpose To measure the frequency and duty cycle of PWM signals.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

255
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics 40 digital inputs are available for analyzing the frequency and duty cycle of PWM
signals. Three subsequent edges are detected and used to measure the time of
the related period. With the measured times, the frequency and duty cycle are
calculated and returned.

The inputs are shared with the other DIO Type 3 input functions. The input
channels are grouped to three ports with a different number of channels.

Port Number of
Channels/Bits
1 16
2 16
3 8

The following ranges are defined for PWM2D measurement:

Range Meaning
Minimum Maximum Resolution
Period Period
1 200 ns1) 3.27 ms 50 ns
2 400 ns1) 6.55 ms 100 ns
3 800 ns1) 13.1 ms 200 ns
4 1.6 µs1) 26.2 ms 400 ns
5 3.2 µs1) 52.4 ms 800 ns
6 6.4 µs1) 104 ms 1.6 µs
7 12.8 µs 209 ms 3.2 µs
8 25.6 µs 419 ms 6.4 µs
9 51.2 µs 838 ms 12.8 µs
10 103 µs 1.67 s 25.6 µs
11 205 µs 3.35 s 51.2 µs
12 410 µs 6.71 s 103 µs
13 820 µs 13.4 s 205 µs
14 1.64 ms 26.8 s 410 µs
15 3.28 ms 53.6 s 820 µs
16 6.56 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

Note

§ A measured period that is above the maximum range limit results in a


frequency of 0 Hz. If the counter for the low periods has an overflow, the
duty cycle is set to 0. If the counter for the high periods has an overflow,
the duty cycle is set to 1. If both counters have an overflow, the duty
cycle is also set to 0.
§ A measured period that is below the minimal range limit returns
unpredictable results due to alias effects.

256
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values can be updated in different modes.

Asynchronous update mode The measured values are updated at the end
of each Thigh and Tlow period of the PWM signal. The update is asynchronous to
the period.

Tmeasured

High

Low
t

Synchronous update mode The measured values are updated at the end of
each Tlow period of the PWM signal only. The update is synchronous to the
period.

Tmeasured

High

Low
t

I/O mapping The following table shows the mapping of the port number and PWM2D
channel number, as used in RTI and RTLib, to the related I/O pin of the
MicroAutoBox I/O connector.

257
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3
2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

258
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Note

Concurrent access to the same digital input channel by other DIO Type 3
blocks or functions is not supported.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE3_PWM2D_BLx ( MicroAutoBox RTI Reference)


PWM Signal Measurement (PWM2D) on the DIO Type 3 ( MicroAutoBox RTLib
Reference)

PWM Measurement (PWM2D) on the DIO Type 4 Unit

Purpose To measure the frequency and duty cycle of PWM signals.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics 24 digital inputs are available for analyzing the frequency and duty cycle of PWM
signals. Three subsequent edges are detected and used to measure the time of

259
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

the related period. With the measured times, the frequency and duty cycle are
calculated and returned.

The inputs are shared with the other DIO Type 4 input functions. The input
channels are grouped to two ports with a different number of channels.

Port Number of
Channels/Bits
1 16
2 8

The following ranges are defined for PWM2D measurement:

Range Meaning
Minimum Maximum Resolution
Period Period
1 200 ns1) 3.27 ms 50 ns
2 400 ns1) 6.55 ms 100 ns
3 800 ns1) 13.1 ms 200 ns
4 1.6 µs1) 26.2 ms 400 ns
5 3.2 µs1) 52.4 ms 800 ns
6 6.4 µs1) 104 ms 1.6 µs
7 12.8 µs 209 ms 3.2 µs
8 25.6 µs 419 ms 6.4 µs
9 51.2 µs 838 ms 12.8 µs
10 103 µs 1.67 s 25.6 µs
11 205 µs 3.35 s 51.2 µs
12 410 µs 6.71 s 103 µs
13 820 µs 13.4 s 205 µs
14 1.64 ms 26.8 s 410 µs
15 3.28 ms 53.6 s 820 µs
16 6.56 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

Note

§ A measured period that is above the maximum range limit results in a


frequency of 0 Hz. If the counter for the low periods has an overflow, the
duty cycle is set to 0. If the counter for the high periods has an overflow,
the duty cycle is set to 1. If both counters have an overflow, the duty
cycle is also set to 0.
§ A measured period that is below the minimal range limit returns
unpredictable results due to alias effects.

Averaging There is no averaging, the measured values are based on one


period.

260
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Update mode The measured values can be updated in different modes.

Asynchronous update mode The measured values are updated at the end
of each Thigh and Tlow period of the PWM signal. The update is asynchronous to
the period.

Tmeasured

High

Low
t

Synchronous update mode The measured values are updated at the end of
each Tlow period of the PWM signal only. The update is synchronous to the
period.

Tmeasured

High

Low
t

I/O mapping The following table shows the mapping of the port number and PWM2D
channel number, as used in RTI and RTLib, to the related I/O pin of the
MicroAutoBox I/O connector.

261
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5
2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital input channel by other DIO Type 4
blocks or functions is not supported.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

262
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE4_PWM2D_BLx ( MicroAutoBox RTI Reference)


PWM Signal Measurement (PWM2D) on the DIO Type 4 ( MicroAutoBox RTLib
Reference)

PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit

Purpose To measure the pulse width, frequency and duty cycle of PWM signals using a
DS1552 Multi-I/O Module.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

Characteristics 16 digital inputs are available for analyzing the frequency and duty cycle of PWM
signals. Three subsequent edges are detected and used to measure the time
between the edges. With the measured times, the frequency and duty cycle are
calculated and returned.

The inputs are shared with the other functions of the DIO 1552 Type 1 unit.

The following ranges are defined for PWM2D measurement:

Range Meaning
Minimum Maximum Resolution
Period Period
1 200 ns1) 3.27 ms 50 ns
2 400 ns1) 6.55 ms 100 ns

263
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Range Meaning
Minimum Maximum Resolution
Period Period
3 800 ns1) 13.1 ms 200 ns
4 1.6 µs1) 26.2 ms 400 ns
5 3.2 µs1) 52.4 ms 800 ns
6 6.4 µs1) 104 ms 1.6 µs
7 12.8 µs 209 ms 3.2 µs
8 25.6 µs 419 ms 6.4 µs
9 51.2 µs 838 ms 12.8 µs
10 103 µs 1.67 s 25.6 µs
11 205 µs 3.35 s 51.2 µs
12 410 µs 6.71 s 103 µs
13 820 µs 13.4 s 205 µs
14 1.64 ms 26.8 s 410 µs
15 3.28 ms 53.6 s 820 µs
16 6.56 ms 107.3 s 1.64 ms
1) This is a theoretical value. In practice, the minimum period is limited to 6.7 µs.

Note

§ A measured period that is above the maximum range limit results in a


frequency of 0 Hz. If the counter for the low periods has an overflow, the
duty cycle is set to 0. If the counter for the high periods has an overflow,
the duty cycle is set to 1. If both counters have an overflow, the duty
cycle is also set to 0.
§ A measured period that is below the minimal range limit returns
unpredictable results due to alias effects.

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values can be updated in different modes.

Asynchronous update mode The measured values are updated at the end
of each Thigh and Tlow period of the PWM signal. The update is asynchronous to
the period.

Synchronous update mode The measured values are updated at the end of
each Tlow period of the PWM signal only. The update is synchronous to the
period.

I/O mapping The following table shows the mapping of the channel number, as used in RTI
and RTLib, to the related I/O pin of the MicroAutoBox I/O connector (DS1512 or
DS1514 ZIF connector).

264
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)

Channel Signal I/O Connector Pin


1 DigIn ch 1 V5
2 DigIn ch 2 U5
3 DigIn ch 3 U6
4 DigIn ch 4 T2
5 DigIn ch 5 T3
6 DigIn ch 6 T4
7 DigIn ch 7 T5
8 DigIn ch 8 T6
9 DigIn ch 9 S2
10 DigIn ch 10 S3
11 DigIn ch 11 S5
12 DigIn ch 12 R2
13 DigIn ch 13 R5
14 DigIn ch 14 R6
15 DigIn ch 15 P5
16 DigIn ch 16 P6

Note

§ Concurrent access to the same digital input channel by other DIO 1552
Type 1 blocks or functions is not allowed.
§ DigIn ch 1 … DigIn ch 4 are shared with the external trigger inputs of the
ADC 1552 Type 1 unit.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO1552_TP1_PWM2D_BLx ( MicroAutoBox RTI Reference)


PWM Signal Measurement (PWM2D) on the DIO 1552 Type 1 Unit of the DS1552
Multi-I/O Module ( MicroAutoBox RTLib Reference)

265
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Pulse Pattern Measurement


Introduction MicroAutoBox provides the timing I/O feature to measure pulse patterns.

Where to go from here Information in this section

Pulse Pattern Measurement (PPM, FPW2D) on the CTM ....................... 266

Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC ............. 269

Frequency Measurement (F2D) on the DIO Type 3 Unit ......................... 271

Frequency Measurement (F2D) on the DIO Type 4 Unit ......................... 275

Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit ................ 278

Pulse Pattern Measurement (PPM, FPW2D) on the CTM

Purpose To measure pulse widths or frequencies of square-wave signals.

Pulse pattern measurement is a feature for extended engine control, drives


control edge aligned, drives control center aligned and chassis control
implemented on the CTM.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

266
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics For pulse pattern measurement (PPM), the following inputs are available on the
CTM. RTI blocks are named FPW2D.
§ CC/DCEA/DCCA: Four inputs
§ EEC: Two inputs

You can measure the pulse patterns (frequency or pulse width) of signals within
the frequency range of 1.25 Hz … 100 kHz. It is possible to detect active high or
active low signals.

In each boot mode, you can choose between frequency measurement (→ F2D
on page 524) and pulse width measurement (→ PW2D on page 525). If you
concurrently use both features, the same range must be specified for them.

The following ranges are defined for PPM measurements:

Range PPM: Frequency PPM: Pulse Width Resolution


Minimum Maximum Minimum Maximum
1 160 Hz 10 MHz 100 ns 6.25 ms 0.1 μs
2 80 Hz 5 MHz 200 ns 12.5 ms 0.2 μs
3 40 Hz 2.5 MHz 400 ns 25 ms 0.4 μs
4 20 Hz 1.25 MHz 800 ns 50 ms 0.8 μs
5 10 Hz 625 kHz 1.6 µs 100 ms 1.6 μs
6 1.25 Hz 78.1 kHz 12.8 µs 800 ms 12.8 μs

Note

§ The maximum frequency and the minimum pulse width are theoretical
values. In practice, the values are limited to 100 kHz (using one channel)
by a low pass filter.
§ If you use all (CC/DCEA/DCCA: four; EEC: two) channels the maximum
frequency is limited to 10 kHz by the load of the Slave DIO MC.
§ To reach these limits, no other function should be active on the Slave DIO
MC.
§ If the frequency of the signal is below the lower range limit, a frequency
of 0 Hz is detected. If the pulse width is longer than the selected
maximum, the detected value is 0 or infinity.

For pulse width measurement, the signal must have a minimum frequency that
matches the minimum frequency of the corresponding PPM range. For example,
if you use the PPM range 1, the signal to be measured must have a minimum
frequency of 160 Hz.

267
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

I/O mapping (CC/DCEA/DCCA) The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Unit Group Channel Signal I/O Connector Pin


PPM (FPW2D) on CTM Block 1 1 CTM ch 1 M2
2 CTM ch 2 M4
Block 2 3 CTM ch 3 M5
4 CTM ch 4 M6

I/O mapping (EEC) The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Unit Group Channel Signal I/O Connector Pin


PPM (FPW2D) on CTM 1 CTM ch 1 M2
2 CTM ch 3 M5

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

268
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

Pulse Pattern Measurement ( MicroAutoBox RTI Reference)


Pulse Pattern Measurement (CTM) for CC ( MicroAutoBox RTLib Reference)

Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC

Purpose To measure pulse widths or frequencies of square-wave signals.

Pulse pattern measurement is a feature for chassis control implemented on the


TPU.

Note

§ It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or
chassis control) within the same model. Thus, you must apply the same
boot mode throughout the whole RTI model running on the
MicroAutoBox.
§ Each channel can be configured separately to perform either PWM
measurement (PWM2D) or pulse pattern measurement. The specified
range must be the same for all four channels. See also PWM
Measurement (PWM2D) on the TPU for CC on page 253.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ – – –

269
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics For pulse pattern measurement (PPM), four inputs on the TPU are available. RTI
blocks are named FPW2D.

You can measure the pulse patterns (frequency or pulse width) of signals within
the frequency range of 1.25 Hz … 100 kHz. Measurement over several periods is
available. It is possible to detect active high or active low signals. The following
ranges are defined for PPM measurements:

Range PPM: Frequency PPM: Pulse Width Resolution


Minimum Maximum Minimum Maximum
1 300 mHz … 100 Hz 2.5 MHz 15 µs 10 ms … 3.33 s 0.4 µs
2 150 mHz … 100 Hz 1.25 MHz 15 µs 10 ms … 6.66 s 0.8 µs
3 75 mHz … 100 Hz 625 kHz 15 µs 10 ms … 13.3 s 1.6 µs
4 37.3 mHz … 100 Hz 312.5 kHz 15 µs 10 ms … 26.8 s 3.2 µs

Note

§ The maximum frequencies and the minimum pulse widths are theoretical
values. In practice, the values are limited to 100 kHz (= 10.0 µs, using one
channel) by a low pass filter.
§ If you use all four channels the maximum frequency is limited to 20 kHz
by the load of the Slave DIO MC.
§ To reach these limits, no other function should be active on the Slave DIO
MC.
§ If the frequency of the signal is below the lower range limit, a frequency
of 0 Hz will be detected. If the pulse width is longer than the selected
maximum, the detected value is 0 or the maximum value.

For pulse width measurement, the signal must have a minimum frequency that
matches the minimum frequency of the corresponding PPM range.

Averaging This function uses the absolute averaging method for the
specified number of periods in the range 1 … 255. This means, that the
measurement returns the averaged value after the specified number of periods.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

270
MicroAutoBox Features May 2018
Pulse Pattern Measurement

I/O mapping The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Unit Group Channel Signal I/O Connector Pin


PPM (FPW2D) on TPU 1 TPU ch 13 S3
2 TPU ch 14 S4
3 TPU ch 15 S5
4 TPU ch 16 S6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE1_FPW2D_TPU_Mx_Cy ( MicroAutoBox RTI Reference)


Pulse Pattern Measurement (TPU) for CC ( MicroAutoBox RTLib Reference)

Frequency Measurement (F2D) on the DIO Type 3 Unit

Purpose To measure the frequency of a square-wave signal. The measurement covers the
values of one period.

271
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics All the 40 digital inputs on the Digital I/O Unit Type 3 are available for frequency
measurement. These inputs are shared with the other DIO Type 3 input
functions. The input channels are grouped to three ports with a different number
of channels.

Port Number of
Channels/Bits
1 16
2 16
3 8

You can measure the frequency of signals in the frequency range 0.3 mHz …
150 kHz. The following ranges are defined for F2D measurements:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

272
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

Handling invalid frequencies The measurement result is forced to zero if:


§ The input signal frequency is less than the lower frequency range limit.
§ The input signal is constantly LOW.
§ The input signal is constantly HIGH.

Note

The measurement returns unpredictable results, if the input signal frequency


is greater than the upper frequency range limit.

I/O mapping The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

273
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3
2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

274
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Note

Concurrent access to the same digital input channel by other DIO Type 3
blocks or functions is not supported.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE3_F2D_BLx ( MicroAutoBox RTI Reference)


Frequency Measurement (F2D) on the DIO Type 3 ( MicroAutoBox RTLib
Reference)

Frequency Measurement (F2D) on the DIO Type 4 Unit

Purpose To measure the frequency of a square-wave signal. The measurement covers the
values of one period.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

275
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics All the 24 digital inputs on the Digital I/O Unit Type 4 are available for frequency
measurement. These inputs are shared with the other DIO Type 4 input
functions. The input channels are grouped to two ports with a different number
of channels.

Port Number of
Channels/Bits
1 16
2 8

You can measure the frequency of signals in the frequency range 0.3 mHz …
150 kHz. The following ranges are defined for F2D measurements:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

276
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Handling invalid frequencies The measurement result is forced to zero if:


§ The input signal frequency is less than the lower frequency range limit.
§ The input signal is constantly LOW.
§ The input signal is constantly HIGH.

Note

The measurement returns unpredictable results, if the input signal frequency


is greater than the upper frequency range limit.

I/O mapping The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5
2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

277
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Note

Concurrent access to the same digital input channel by other DIO Type 4
blocks or functions is not supported.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE4_F2D_BLx ( MicroAutoBox RTI Reference)


Frequency Measurement (F2D) on the DIO Type 4 ( MicroAutoBox RTLib
Reference)

Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit

Purpose To measure the frequency of a square-wave signal using a DS1552 Multi-I/O


Module. The measurement covers the values of one period.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.

Supported I/O board boot modes: not relevant

278
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Characteristics 16 digital inputs on the DIO 1552 Type 1 unit of the DS1552 Multi-I/O Module
are available for frequency measurement. These inputs are shared with the other
DIO 1552 Type 1 input functions.

You can measure the frequency of signals in the frequency range 0.3 mHz …
150 kHz. The following ranges are defined for F2D measurements:

Range Minimum Maximum Resolution


Frequency Frequency
1 9.54 Hz 150 kHz 50 ns
2 4.77 Hz 150 kHz 100 ns
3 2.39 Hz 150 kHz 200 ns
4 1.20 Hz 150 kHz 400 ns
5 0.60 Hz 150 kHz 800 ns
6 0.30 Hz 150 kHz 1.6 µs
7 0.15 Hz 150 kHz 3.2 µs
8 75 mHz 78.12 kHz 6.4 µs
9 38 mHz 39.06 kHz 12.8 µs
10 19 mHz 19.53 kHz 25.6 µs
11 10 mHz 9.76 kHz 51.2 µs
12 5.0 mHz 4.88 kHz 103 µs
13 2.5 mHz 2.44 kHz 205 µs
14 1.2 mHz 1.22 kHz 410 µs
15 0.6 mHz 610.35 Hz 820 µs
16 0.3 mHz 305.17 Hz 1.64 ms

Averaging There is no averaging, the measured values are based on one


period.

Update mode The measured values are updated at the end of each Tlow
period of the input signal only. The update is synchronous to the period.

Tmeasured

High

Low
t

Handling invalid frequencies The measurement result is forced to zero if:


§ The input signal frequency is less than the lower frequency range limit.
§ The input signal is constantly LOW.
§ The input signal is constantly HIGH.

279
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Note

The measurement returns unpredictable results, if the input signal frequency


is greater than the upper frequency range limit.

I/O mapping The following table shows the mapping of the channel numbers, as used in RTI
and RTLib, to the related I/O pins of the MicroAutoBox I/O connector (DS1512 or
DS1514 ZIF connector).

Channel Signal I/O Connector Pin


1 DigIn ch 1 V5
2 DigIn ch 2 U5
3 DigIn ch 3 U6
4 DigIn ch 4 T2
5 DigIn ch 5 T3
6 DigIn ch 6 T4
7 DigIn ch 7 T5
8 DigIn ch 8 T6
9 DigIn ch 9 S2
10 DigIn ch 10 S3
11 DigIn ch 11 S5
12 DigIn ch 12 R2
13 DigIn ch 13 R5
14 DigIn ch 14 R6
15 DigIn ch 15 P5
16 DigIn ch 16 P6

Note

§ Concurrent access to the same digital input channel by other DIO 1552
Type 1 blocks or functions is not allowed.
§ DigIn ch 1 … DigIn ch 4 are shared with the external trigger inputs of the
ADC 1552 Type 1 unit.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

280
MicroAutoBox Features May 2018
Pulse Pattern Measurement

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO1552_TP1_F2D_BLx ( MicroAutoBox RTI Reference)


Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit of the DS1552 Multi-
I/O Module ( MicroAutoBox RTLib Reference)

281
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Pulse Width Measurement (PW2D)


Introduction MicroAutoBox provides the timing I/O feature to measure the pulse width of
square‑wave signals (PW2D).

Where to go from here Information in this section

Pulse Width Measurement (PW2D) on the DIO Type 3 Unit .................. 282

Pulse Width Measurement (PW2D) on the DIO Type 4 Unit .................. 286

Pulse Width Measurement (PW2D) on the DIO Type 3 Unit

Purpose To measure the pulse width of a square‑wave signal.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics 40 digital inputs are available for analyzing the pulse width of square‑wave
signals. Each pulse is detected and used to measure its width. You can configure
whether to use the high pulse or the low pulse of a signal for measurement.

The inputs are shared with the other DIO Type 3 input functions. The input
channels are grouped to three ports with a different number of channels.

282
MicroAutoBox Features May 2018
Pulse Width Measurement (PW2D)

The following ranges are defined for PW2D measurement:

Range Meaning
Minimum Maximum Resolution
Pulse Width Pulse Width
1 3.33 µs1) 1.63 ms 50 ns
2 3.33 µs1) 3.27 ms 100 ns
3 3.33 µs1) 6.55 ms 200 ns
4 3.33 µs1) 13.1 ms 400 ns
5 3.33 µs1) 26.2 ms 800 ns
6 3.33 µs1) 52.4 ms 1.6 µs
7 6.4 µs 104 ms 3.2 µs
8 12.8 µs 209 ms 6.4 µs
9 25.6 µs 419 ms 12.8 µs
10 51.2 µs 838 ms 25.6 µs
11 103 µs 1.67 s 51.2 µs
12 205 µs 3.35 s 103 µs
13 410 µs 6.71 s 205 µs
14 820 µs 13.4 s 410 µs
15 1.64 ms 26.8 s 820 µs
16 3.28 ms 53.6 s 1.64 ms
1) While the theoretical minimum value is in the range 100 ns … 3.2 µs, the minimum
value to be measured in practice is limited to 3.33 µs.

Note

The pulse width of the input signal must remain in the specified pulse width
range, otherwise the measured value is not correct.
§ If the pulse width is less than the lower limit, the measured pulse width is
unpredictable.
§ If the pulse width is higher than the upper limit, the measured pulse
width is detected as the maximum float value (FLT_MAX).

Averaging There is no averaging, the measured values are based on one


pulse.

Update mode The measured values are updated at the end of each pulse. If you measure high
pulses, the values are updated at the falling edges of the signal. If you measure
low pulses, the values are updated at the rising edges of the signal.

Measurement mode The pulse width can be measured either for the high times of the connected
signal or the low times. You configure the measurement mode by specifying the
edge polarity to be used for measurement.

283
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Measurement Meaning
Mode
Rising edge The measurement starts with a rising edge of the
connected signal so that the high time of the pulse is
measured.
Falling edge The measurement starts with a falling edge of the
connected signal so that the low time of the pulse is
measured.

I/O mapping The following table shows the mapping of the port number and PW2D channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3

284
MicroAutoBox Features May 2018
Pulse Width Measurement (PW2D)

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital input channel by other DIO Type
blocks or functions is not supported.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

285
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE3_PW2D_BLx ( MicroAutoBox RTI Reference)


Pulse Width Measurement (PW2D) on the DIO Type 3 ( MicroAutoBox RTLib
Reference)

Pulse Width Measurement (PW2D) on the DIO Type 4 Unit

Purpose To measure the pulse width of a square‑wave signal.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics 24 digital inputs are available for analyzing the pulse width of square‑wave
signals. Each pulse is detected and used to measure its width. You can configure
whether to use the high pulse or the low pulse of a signal for measurement.

The inputs are shared with the other DIO Type 4 input functions. The input
channels are grouped to two ports with a different number of channels.

The following ranges are defined for PW2D measurement:

Range Meaning
Minimum Maximum Resolution
Pulse Width Pulse Width
1 3.33 µs1) 1.63 ms 50 ns
2 3.33 µs1) 3.27 ms 100 ns
3 3.33 µs1) 6.55 ms 200 ns
4 3.33 µs1) 13.1 ms 400 ns

286
MicroAutoBox Features May 2018
Pulse Width Measurement (PW2D)

Range Meaning
Minimum Maximum Resolution
Pulse Width Pulse Width
5 3.33 µs1) 26.2 ms 800 ns
6 3.33 µs1) 52.4 ms 1.6 µs
7 6.4 µs 104 ms 3.2 µs
8 12.8 µs 209 ms 6.4 µs
9 25.6 µs 419 ms 12.8 µs
10 51.2 µs 838 ms 25.6 µs
11 103 µs 1.67 s 51.2 µs
12 205 µs 3.35 s 103 µs
13 410 µs 6.71 s 205 µs
14 820 µs 13.4 s 410 µs
15 1.64 ms 26.8 s 820 µs
16 3.28 ms 53.6 s 1.64 ms
1) While the theoretical minimum value is in the range 100 ns … 3.2 µs, the minimum
value to be measured in practice is limited to 3.33 µs.

Note

The pulse width of the input signal must remain in the specified pulse width
range, otherwise the measured value is not correct.
§ If the pulse width is less than the lower limit, the measured pulse width is
unpredictable.
§ If the pulse width is higher than the upper limit, the measured pulse
width is detected as the maximum float value (FLT_MAX).

Averaging There is no averaging, the measured values are based on one


pulse.

Update mode The measured values are updated at the end of each pulse. If you measure high
pulses, the values are updated at the falling edges of the signal. If you measure
low pulses, the values are updated at the rising edges of the signal.

Measurement mode The pulse width can be measured either for the high times of the connected
signal or the low times. You configure the measurement mode by specifying the
edge polarity to be used for measurement.

287
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Measurement Meaning
Mode
Rising edge The measurement starts with a rising edge of the
connected signal so that the high time of the pulse is
measured.
Falling edge The measurement starts with a falling edge of the
connected signal so that the low time of the pulse is
measured.

I/O mapping The following table shows the mapping of the port number and PW2D channel
number, as used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O
connector.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5
2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital input channel by other DIO Type
blocks or functions is not supported.

288
MicroAutoBox Features May 2018
Pulse Width Measurement (PW2D)

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Overview of the Signal Measurement Functionalities ............................................................. 250

References

DIO_TYPE4_PWM2D_BLx ( MicroAutoBox RTI Reference)


Pulse Width Measurement (PW2D) on the DIO Type 4 ( MicroAutoBox RTLib
Reference)

289
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Incremental Encoder Interface


Introduction MicroAutoBox provides the timing I/O feature to decode the signals of an
incremental encoder.

Where to go from here Information in this section

Overview of the Incremental Encoder Interfaces ................................... 290

Basics on the Incremental Encoder Interface ......................................... 291

Incremental Encoder Interface for DCCA .............................................. 293

Incremental Encoder Interface for DCEA .............................................. 294

Incremental Encoder Interface on the DIO Type 3 Unit .......................... 296

Incremental Encoder Interface on the DIO Type 4 Unit .......................... 301

Overview of the Incremental Encoder Interfaces

Introduction MicroAutoBox provides various incremental encoder interfaces.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
Incremental Encoder
DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

DIO Type 1 ✓ ✓ ✓ – – – – –
DIO Type 3 – – – – ✓ – – –
DIO Type 4 – – – – – – ✓ –

Overview of the The main characteristics of the incremental encoder interfaces are listed below.
characteristics

Incremental Encoder
Characteristics (TPU: DCEA) (TPU: DCCA) (DIO Type 3) (DIO Type 4)
Encoder interfaces 3 1 4
Index pulse support Yes No Yes

290
MicroAutoBox Features May 2018
Incremental Encoder Interface

Incremental Encoder
Characteristics (TPU: DCEA) (TPU: DCCA) (DIO Type 3) (DIO Type 4)
Position count range –8192.0 … +8191.75 -2,097,152.0 … +2,097,151.75
(-213 … +213-0.25) (–221 … +221-0.25)
Adjustable parameters Start position Start position Start position
Index position Index position
Min. count value
Max. count value
Noise filter
Gated mode
Interrupt generation Yes No Yes1)
1) For information on the DIO Type 3 and DIO Type 4 interrupts, refer to Basics on Interrupt Handling
on page 53.

Related topics Basics

Basics on Interrupt Handling ................................................................................................... 53


Incremental Encoder Interface for DCCA ............................................................................... 293
Incremental Encoder Interface for DCEA ............................................................................... 294
Incremental Encoder Interface on the DIO Type 3 Unit ........................................................... 296
Incremental Encoder Interface on the DIO Type 4 Unit ........................................................... 301

Basics on the Incremental Encoder Interface

Introduction The incremental encoder interface can be used to decode signals of an


incremental encoder.

Note

Only single‑ended encoders are supported. Diffential and analog encoders


cannot be used.

Except for drives control center aligned, encoder index signals are supported. The
index is used to update the internal position counter with the predefined index
value.

Measuring signals Incremental encoders provide the two encoder signals PHI0 and PHI90 and the
optional index signal IDX. The encoder signals PHI0 and PHI90 have a phase shift
of 90°. In addition, most encoders also provide the inverted signals /PHI0, /PHI90
and /IDX.

291
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Tip

Some encoder manufacturers use the terms A, B and Z instead of PHI0,


PHI90 and IDX.

The following illustration shows the shape of the PHI0 and PHI90 digital signals
together with the optional index signal. It also shows the 4-fold subdivision of an
encoder line. The gray‑shaded area represents one encoder line (360° means one
period). For the number of encoder lines per rotation, refer to the encoder user
documentation.

360°

PHI0

PHI90

INDEX

A position counter stores the current value. The count direction depends on the
encoder’s rotation direction.

Note

The incremental encoder interface for DCCA does not support encoder
index signals.

Measuring speed The rotation speed is calculated as the ratio between the encoder positions since
the last call and the related time intervals. The unit of the returned value is lines/s
in steps of 0.25. The sign of the value represents the direction of the encoder
rotation. A positive value represents a clockwise rotation.

292
MicroAutoBox Features May 2018
Incremental Encoder Interface

Maximum edge distance With RTI, you can configure the capture resolution by specifying the maximum
distance between two subsequent edges, see the figure below.

Maximum edge distance Maximum edge distance

PHI0

PHI90

Incremental Encoder Interface for DCCA

Introduction The incremental encoder interface of the drives control center aligned boot
mode can be used to decode the signals of an incremental encoder.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – ✓ –

For further information, refer to I/O Features and Boot Modes on page 105.

293
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Characteristics DCCA provides one incremental encoder interface. The software position
counter of the incremental encoder interface can be within the range of –
8192 … 8191.75 lines. For further information, refer to Basics on the
Incremental Encoder Interface on page 291.

Note

For DCCA an incremental encoder index signal is not supported.

I/O mapping The following table shows the mapping of the logical encoder channel numbers,
as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O
connector:

Encoder Channel Signal I/O Connector Pin


Signal 1 1 TPU ch 15 in S5
Signal 2 1 TPU ch 16 in S6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Basics on the Incremental Encoder Interface .......................................................................... 291


Overview of the Incremental Encoder Interfaces .................................................................... 290

References

Incremental Encoder Interface ( MicroAutoBox RTI Reference)

Incremental Encoder Interface for DCEA

Introduction The incremental encoder interface of the drives control edge aligned mode can
be used to decode the signals of incremental encoders. Index signals can
optionally be used to reset the position counters of the incremental encoder
interfaces.

294
MicroAutoBox Features May 2018
Incremental Encoder Interface

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– ✓ – –

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics DCEA provides 3 incremental encoder interfaces with optional index signals. You
can set the index mode to:
§ No index signal used
§ To reset the counter once, the counter is reset only after the first index
detection.
§ To reset the counter continuously, the counter is reset after each index
detection.

You can enable subinterrupt generation on the PPC for each index signal. The
software position counter of the incremental encoder interface can be within the
range of –8192 … 8191.75 lines. For further information, refer to Basics on the
Incremental Encoder Interface on page 291.

I/O mapping The following table shows the mapping of the logical encoder channel numbers,
as used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O
connector:

Encoder Channel Signal I/O Connector Pin


Index ch1 1 TPU ch 8 in R4
Signal 1 ch1 1 TPU ch 9 in R5
Signal 2 ch1 1 TPU ch 10 in R6

295
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Encoder Channel Signal I/O Connector Pin


Index ch2 2 TPU ch 11 in S1
Signal 1 ch2 2 TPU ch 12 in S2
Signal 2 ch2 2 TPU ch 13 in S3
Index ch3 3 TPU ch 14 in S4
Signal 1 ch3 3 TPU ch 15 in S5
Signal 2 ch3 3 TPU ch 16 in S6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

Basics on the Incremental Encoder Interface .......................................................................... 291


Overview of the Incremental Encoder Interfaces .................................................................... 290

References

DIO_TYPE1_EA_MC_PWM_Mx ( MicroAutoBox RTI Reference)

Incremental Encoder Interface on the DIO Type 3 Unit

Introduction The incremental encoder interface can be used to decode the signals of an
incremental encoder, and to evaluate data on an axle's speed and position. An
optional index signal can be used to reset the counter of the incremental
encoder.

296
MicroAutoBox Features May 2018
Incremental Encoder Interface

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics The incremental encoder interface of the Digital I/O Unit Type 3 supports up to 4
encoders, each with the signals PHI0, PHI90 and the optional index signal IDX.

Each encoder interface can handle positions in the range –221 … +221-0.25 lines
(-2,097,152.0 … +2,097,151.75), including the 4-fold subdivision.

Each encoder interface can react to an index pulse. You can set the index mode
to:
§ No index signal used: the index pulses are ignored.
§ Reset the counter once: the counter is reset only after the first index
detection.
§ Reset the counter continuously: the counter is reset after each index
detection.

Note

The index signal must have a length of at least 0.25 lines. If it is shorter, it
will not be detected.

You can use the GateMode parameter to specify whether the Index signal is
gated to the PHI0 and PHI90 signals. That means, the Index signal is only
interpreted, if PHI0, PHI90 and IDX are high at the same time.

For the encoder configuration, you can specify various positions:

Position Parameter Description


Start position Specifies the position that is written to the position
counter when the specified encoder is initialized.
Index position Specifies the position that is written to the position
counter when an index signal pulse is detected. If the
index signal is not used, this parameter is ignored.
Minimum position count value Specifies the minimum value for the position count range
of the specified encoder.
Maximum position count value Specifies the maximum value for the position count
range of the specified encoder.

297
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

To adapt the length of the position counter to the resolution of the connected
encoder, you can specify the minimum and maximum position count values. If
the position counter's value reaches the maximum position count value, the
minimum position count value is written to the position counter with the next
increment. If the position counter's value reaches the minimum position count
value, the maximum position count value is written to the position counter with
the next decrement.

Note

The last line of the connected encoder indicates the next revolution. The
current revolution ends with LineMax - 0.25.

For example, if you have an encoder with 3600 lines and you want to start
with zero as minimum position count value, you have to specify 3599.75 as
the maximum position count value.

Noise filter sample rate With the noise filter sample rate, you can specify the minimum pulse width of a
signal to be used for processing. A signal is ignored if its pulse width is less than
the time required for four samples.

Pulses that have a pulse width lower than four times of the period of the
specified noise filter sample rate are ignored.

PulseWidthMin = 4 · 1 / NoiseFilterSampleRate

Noise Filter Sample Rate Minimum Pulse Width


312.5 kHz 12.8 µs (= 4 · 3.2 µs)
625.0 kHz 6.4 µs
1.25 MHz 3.2 µs
2.5 MHz 1.6 µs
5 MHz 800 ns
10 MHz 400 ns
20 MHz 200 ns

In the figure below, the first signal is ignored because its pulse width is less than
four samples. If you specify a higher sample rate, the number of samples
increases. If there are four or more samples during the first pulse, it will be used
for processing.

Noise filter sample rate

2 samples 7 samples

The noise filter sample rate can be separately specified for each encoder.

298
MicroAutoBox Features May 2018
Incremental Encoder Interface

Channel usage You must specify the first channel for the incremental encoder. Two further
channels are allocated automatically for the second encoder signal and the index
pulse, even if the index pulse is not used.

The channel usage for the incremental encoder interface is:

Channel Used Meaning


1st channel 1st encoder input channel (signal PHI0)
2nd channel 2nd encoder input channel (signal PHI90)
3rd channel Used for the index signal if index mode is
set to “Reset counter once” or “Reset
counter continuously” (signal IDX).

Tip

Some encoder manufacturers use the terms A, B and Z instead of PHI0,


PHI90 and IDX.

I/O mapping The following table shows the mapping of the logical encoder channel numbers,
as used in RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3

299
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

Note

§ Access to the same input channels by other DIO Type 3 blocks or


functions is not allowed.
§ You have to specify only the first channel to be used for an encoder, the
two subsequent channels are automatically assigned. You can therefore
specify up to channel 14 on ports 1 and 2, and up to channel 6 on port 3
for the first channel.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

300
MicroAutoBox Features May 2018
Incremental Encoder Interface

Related topics Basics

Basics on the Incremental Encoder Interface .......................................................................... 291


Overview of the Incremental Encoder Interfaces .................................................................... 290

References

DIO_TYPE3_ENC_BLx ( MicroAutoBox RTI Reference)


DIO_TYPE3_ENC_POS_SET_BLx ( MicroAutoBox RTI Reference)
Incremental Encoder on the DIO Type 3 ( MicroAutoBox RTLib Reference)

Incremental Encoder Interface on the DIO Type 4 Unit

Introduction The incremental encoder interface can be used to decode the signals of an
incremental encoder, and to evaluate data on an axle's speed and position. An
optional index signal can be used to reset the counter of the incremental
encoder.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics The incremental encoder interface of the Digital I/O Unit Type 4 supports up to 4
encoders, each with the signals PHI0, PHI90 and the optional index signal IDX.

Each encoder interface can handle positions in the range ‑221 … +221-0.25 lines
(-2,097,152.0 … +2,097,151.75), including the 4-fold subdivision.

Each encoder interface can react to an index pulse. You can set the index mode
to:
§ No index signal used: the index pulses are ignored.
§ Reset the counter once: the counter is reset only after the first index
detection.

301
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

§ Reset the counter continuously: the counter is reset after each index
detection.

Note

The index signal must have a length of at least 0.25 lines. If it is shorter, it
will not be detected.

You can use the GateMode parameter to specify whether the Index signal is
gated to the PHI0 and PHI90 signals. That means, the Index signal is only
interpreted, if PHI0, PHI90 and IDX are high at the same time.

For the encoder configuration, you can specify various positions:

Position Parameter Description


Start position Specifies the position that is written to the position
counter when the specified encoder is initialized.
Index position Specifies the position that is written to the position
counter when an index signal pulse is detected. If the
index signal is not used, this parameter is ignored.
Minimum position count value Specifies the minimum value for the position count range
of the specified encoder.
Maximum position count value Specifies the maximum value for the position count
range of the specified encoder.

To adapt the length of the position counter to the resolution of the connected
encoder, you can specify the minimum and maximum position count values. If
the position counter's value reaches the maximum position count value, the
minimum position count value is written to the position counter with the next
increment. If the position counter's value reaches the minimum position count
value, the maximum position count value is written to the position counter with
the next decrement.

Note

The last line of the connected encoder indicates the next revolution. The
current revolution ends with LineMax - 0.25.

For example, if you have an encoder with 3600 lines and you want to start
with zero as minimum position count value, you have to specify 3599.75 as
the maximum position count value.

Noise filter sample rate With the noise filter sample rate, you can specify the minimum pulse width of a
signal to be used for processing. A signal is ignored if its pulse width is less than
the time required for four samples.

302
MicroAutoBox Features May 2018
Incremental Encoder Interface

Pulses that have a pulse width lower than four times of the period of the
specified noise filter sample rate are ignored.

PulseWidthMin = 4 · 1 / NoiseFilterSampleRate

Noise Filter Sample Rate Minimum Pulse Width


312.5 kHz 12.8 µs (= 4 · 3.2 µs)
625.0 kHz 6.4 µs
1.25 MHz 3.2 µs
2.5 MHz 1.6 µs
5 MHz 800 ns
10 MHz 400 ns
20 MHz 200 ns

In the figure below, the first signal is ignored because its pulse width is less than
four samples. If you specify a higher sample rate, the number of samples
increases. If there are four or more samples during the first pulse, it will be used
for processing.

Noise filter sample rate

2 samples 7 samples

The noise filter sample rate can be separately specified for each encoder.

Channel usage You must specify the first channel for the incremental encoder. Two further
channels are allocated automatically for the second encoder signal and the index
pulse, even if the index pulse is not used.

The channel usage for the incremental encoder interface is:

Channel Used Meaning


1st channel 1st encoder input channel (signal PHI0)
2nd channel 2nd encoder input channel (signal PHI90)
3rd channel Used for the index signal if index mode is
set to “Reset counter once” or “Reset
counter continuously” (signal IDX).

Tip

Some encoder manufacturers use the terms A, B and Z instead of PHI0,


PHI90 and IDX.

303
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

I/O mapping The following table shows the mapping of the logical encoder channel numbers,
as used in RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5
2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Note

§ Access to the same input channels by other DIO Type 4 blocks or


functions is not allowed.
§ You have to specify only the first channel to be used for an encoder, the
two subsequent channels are automatically assigned. You can therefore
specify up to channel 14 on port 1, and up to channel 6 on port 2 for the
first channel.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

304
MicroAutoBox Features May 2018
Incremental Encoder Interface

§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)

Related topics Basics

Basics on the Incremental Encoder Interface .......................................................................... 291


Overview of the Incremental Encoder Interfaces .................................................................... 290

References

DIO_TYPE4_ENC_BLx ( MicroAutoBox RTI Reference)


DIO_TYPE4_ENC_POS_SET_BLx ( MicroAutoBox RTI Reference)
Incremental Encoder on the DIO Type 4 ( MicroAutoBox RTLib Reference)

305
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

Stepper Motor Control for EEC

Stepper Motor Control for EEC

Purpose To control a stepper motor.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – – ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics Two outputs are available to control the actuating signal of a stepper motor that,
for example, adjusts a throttle valve. The signals are digital. The rotating direction
of the motor is determined by the sequence of edges of the two signals. You can
generate step counts within the range – 32768 … (32767 – number of
acceleration steps). For example, if position = 0, you can move the motor 32768
steps in negative direction or 32767 steps in positive direction. The resulting
number of motor revolutions depends on the stepper motor used.

306
MicroAutoBox Features May 2018
Stepper Motor Control for EEC

The signals have the following characteristics:

Primary pin

Secondary pin

The number of acceleration and deceleration steps r – 1 and the step period
difference between two consecutive steps dT can be used to define the
acceleration and deceleration of the stepper motor. The step period T_0 is
limited by a maximum value within the range of 0.02 … 100 ms. The period T is
calculated by T = T_0 – (r – 1) · dT.

Step
period

T0

dT

T
Acceleration Constant Deceleration

1 2 3 4 r n-r n-3 n-2 n-1 n Steps

Note

To avoid negative periods the following inequality has to be observed:

(r – 1) · dT < T_0

I/O mapping The following table shows the mapping of the logical channel numbers, as used
in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

Stepper Motor Signal I/O Connector Pin


Signal 1 (Primary) TPU ch 15 out K1
Signal 2 (Secondary) TPU ch 16 out K2

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)

307
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features

§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)

Related topics Basics

Extended Engine Control Modes ........................................................................................... 311

308
MicroAutoBox Features May 2018
Extended Engine Control (EEC)

Extended Engine Control (EEC)

Purpose Extended Engine Control provides functions to process engine signals such as
crankshaft and camshaft signals. It is a feature of the Slave DIO MC.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


– – – ✓

For further information, refer to I/O Features and Boot Modes on page 105.

309
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Where to go from here Information in this section

Basics on Extended Engine Control ...................................................... 311

How Extended Period Measurement for Engine Control Works ............ 320

How Position-Synchronized Pulse Generation for Engine Control


Works ................................................................................................. 338

310
MicroAutoBox Features May 2018
Basics on Extended Engine Control

Basics on Extended Engine Control


Where to go from here Information in this section

Extended Engine Control Modes .......................................................... 311

Basic Functions of Extended Engine Control ......................................... 312

Extended Period Measurement (PMMX) for EEC ................................... 313

Position-Synchronized Pulse Generation (PSP) for EEC .......................... 314

Relationship between PMMX and PSP .................................................. 317

Extended Engine Control Modes

Introduction Extended engine control provides two different modes:

Note

Extended engine control functions (PMMX, PSP, PWM_FP_TPU) use different


I/O mappings for the two modes.

Passive sensor mode The input signals of passive crankshaft sensors are connected to input channels
that allow you to detect zero crossings of the signals. The following illustration
shows a zero crossing signal.
V

Active sensor mode For active camshaft and crankshaft sensors (TTL, for example) without zero
crossing, the signals are connected to input channels that allow you to detect
active signals. The following illustration shows an example for a TTL signal.
V
TTL high

0
TTL low

311
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Note

In active mode, the signals are inverted by the input channel. That means, if
you connect a crankshaft sensor signal an active low signal is actually
needed.

Related topics Basics

Extended Engine Control (EEC) ............................................................................................. 309

Basic Functions of Extended Engine Control

Introduction Two basic functions are provided by the Slave DIO MC time processor unit (TPU):
§ Extended Period Measurement (PMMX) for EEC on page 313
§ Position-Synchronized Pulse Generation (PSP) for EEC on page 314

They are designed to provide the angle-based engine management operations


needed to control fuel injection timing and ignition timing. For basic information
on these engine management features, refer to Extended Engine Control (EEC)
on page 309.

Note

It is not possible to use functions from extended engine control, drives


control, and chassis control within the same model.

PMMX features PMMX is an input function which is specifically designed to correctly process the
input signals from crankshaft timing wheels.

The key features of PMMX are:


§ Different noise rejection algorithms eliminate the effect of spurious signals on
the input pin
§ Separate counters provide angular references based on crankshaft and
camshaft positions
§ Camshaft synchronization

PSP features PSP is an output function that can be configured to provide fuel injection timing
pulses or ignition timing pulses. Once initialized, the pulses are scheduled
automatically in each crankshaft or camshaft cycle, as specified by timing
parameters supplied by the Master PPC.

312
MicroAutoBox Features May 2018
Basics on Extended Engine Control

The key features of PSP are:


§ The ignition pulses may be directly specified as a dwell time and a spark
advance angle
§ The fuel injection pulses may be specified as an injection start angle and a
fuelling time
§ Multiple injection within one motor cycle is available
§ Automatic compensation for changes in engine speed

Related topics Basics

Extended Engine Control Modes ........................................................................................... 311


Extended Period Measurement (PMMX) for EEC .................................................................... 313
How Extended Period Measurement for Engine Control Works ............................................. 320
How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338
Position-Synchronized Pulse Generation (PSP) for EEC ........................................................... 314

Extended Period Measurement (PMMX) for EEC

Characteristics For extended period measurement, one PMMX input is available. The PMMX is
designed to process the input signals from different crankshaft timing wheels.

Note

The connection from the crankshaft sensor to the PMMX input must be
shielded against electrical disturbances.

For basic information on PMMX, refer to How Extended Period Measurement for
Engine Control Works on page 320.

Using PMMX functions, you can calculate the engine angle and engine speed,
and the resulting engine position. Depending on the engine position you can
generate position-synchronized pulses using the PSP function (refer to Position-
Synchronized Pulse Generation (PSP) for EEC on page 314).

For engine speed calculation, the following ranges are defined (rpm = revolutions
per minute) for a 60-2 wheel:

Range Engine Speed PSP Resolution at 6000 rpm


Minimum (depends Maximum in ns in °
on the configured
wheel)
1 600 rpm > 20000 rpm 200 ns 0.03°
2 300 rpm > 20000 rpm 400 ns 0.03°
3 150 rpm > 20000 rpm 800 ns 0.03°

313
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Range Engine Speed PSP Resolution at 6000 rpm


Minimum (depends Maximum in ns in °
on the configured
wheel)
4 80 rpm > 20000 rpm 1600 ns 0.06°
5 40 rpm > 20000 rpm 3200 ns 0.12°
6 20 rpm 12000 rpm 6400 ns 0.23°
7 10 rpm 6000 rpm 12800 ns 0.46°

Note

To obtain a high resolution you have to choose a range providing the


highest minimum engine speed possible. This also depends on the number
of teeth selected and the TPU prescaler.

I/O mapping The following table shows the mapping of the logical PMMX channel number, as
used in RTI and RTLib, to the related I/O pin of the MicroAutoBox I/O connector.

PMMX Channel Passive Sensor Mode Active Sensor Mode


Signal I/O Connector Pin Signal I/O Connector Pin
1 TPU ch 1 in P3 TPU ch 2 in P4

Note

MicroAutoBox uses a digital input connected to a camshaft sensor to check


whether the camshaft marker is within a user-defined camshaft window.
After initialization of the PMMX function, the digital input pin (Group 4 ch
8, refer to Bit I/O Unit (DIO Type 1) on page 144) is read. A high input
means that the camshaft marker is currently detected by the camshaft
sensor.

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320

Position-Synchronized Pulse Generation (PSP) for EEC

Characteristics For position-synchronized pulse generation, 12 outputs for ignition and injection
are available. For more detailed information on PSP, refer to How Position-
Synchronized Pulse Generation for Engine Control Works on page 338.

314
MicroAutoBox Features May 2018
Basics on Extended Engine Control

The position indicator is calculated by PMMX functions(refer to Extended Period


Measurement (PMMX) for EEC on page 313).

You can generate up to five signals per channel within one engine cycle.

Note

If you generate several pulses per channel, you have to keep the sequence
of the pulses. Pulse 0 must be generated before pulse 1, for example. A
change of the sequence will lead to unpredictable pulse sequences at the
output.

PSP signal generation contains a mechanism to suppress the rescheduling of


pulses within a predefined angle range. This can lead to unpredictable pulse
generation. For details, refer to Time-Angle Operation With PSP
on page 339.

PSP resolution The resolution of the generated PSP signals depends on the selected TPU
prescaler, the maximum available engine revolution and the working frequency
of the CPU (slave MC68K). It can be calculated by the following formula:

§ Psc = Prescaler value (4, 8, 16, 32, 64, 128, 256)


§ Rpmmax = maximum expected revolution
§ CPUclk = CPU frequency, normally 20 MHz for the slave MC68K.

Note

The resolution is always calculated for a corresponding revolution. For


higher revolutions the resolution decreases, for lower it increases. The
resolution does not depend on the number teeth the wheel has, for
example 30, 60 or 90 teeth, but the number of teeth affects the available
maximum revolution.

The following table shows the PSP resolution in relation to the selected prescaler
value for a 60-2 wheel:

Range Engine Speed PSP Resolution at 6000 rpm


Minimum (depends Maximum in ns in °
on the configured
wheel)
1 600 rpm > 20000 rpm 200 ns 0.03°
2 300 rpm > 20000 rpm 400 ns 0.03°
3 150 rpm > 20000 rpm 800 ns 0.03°
4 80 rpm > 20000 rpm 1600 ns 0.06°
5 40 rpm > 20000 rpm 3200 ns 0.12°

315
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Range Engine Speed PSP Resolution at 6000 rpm


Minimum (depends Maximum in ns in °
on the configured
wheel)
6 20 rpm 12000 rpm 6400 ns 0.23°
7 10 rpm 6000 rpm 12800 ns 0.46°

The calculated resolution is only valid for a constant engine speed. If the
revolution changes the tooth transitions are interpolated by the period of the last
tooth. The pulse generation may then be inaccurate. The inaccuracy depends on
the number of wheel teeth. The higher the number of wheel teeth, the more
precise is the interpolation. For example, if you use a 90-tooth wheel, the angle
between two teeth is 4°. For a 30-tooth wheel, the angle between two teeth is
12°. If the revolution changes, the interpolation comprises only 4° for the 90-
tooth wheel. The related period value is much more current than a period value
related from a 30-tooth wheel covering 12°.

Note

The resolution values are only theoretical values. The real available
resolution depends on several parameters such as the current loading of the
TPU.

Note

§ To obtain a high resolution, you have to choose a range providing the


highest minimum engine speed possible for the corresponding TPU
channel.
§ You have to connect the TPU channels used for PSP to Vcc to ensure a
proper output state if PMMX loses synchronization.

I/O mapping The following table shows the mapping of the logical PSP channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

PSP Shared with Passive Sensor Mode Active Sensor Mode


Channel PWM_FP_TPU
Signal I/O Connector Signal I/O Connector
Channel
Pin Pin
1 1 TPU ch 2 out G1 TPU ch 3 out G2
2 2 TPU ch 3 out G2 TPU ch 4 out G6
3 3 TPU ch 4 out G6 TPU ch 5 out H1
4 4 TPU ch 5 out H1 TPU ch 6 out H2
5 5 TPU ch 6 out H2 TPU ch 7 out H5
6 6 TPU ch 7 out H5 TPU ch 8 out H6
7 7 TPU ch 8 out H6 TPU ch 9 out J1
8 8 TPU ch 9 out J1 TPU ch 10 out J2
9 9 TPU ch 10 out J2 TPU ch 11 out J3

316
MicroAutoBox Features May 2018
Basics on Extended Engine Control

PSP Shared with Passive Sensor Mode Active Sensor Mode


Channel PWM_FP_TPU
Signal I/O Connector Signal I/O Connector
Channel
Pin Pin
10 10 TPU ch 11 out J3 TPU ch 12 out J4
11 11 TPU ch 12 out J4 TPU ch 13 out J5
12 12 TPU ch 13 out J5 TPU ch 14 out J6

Note

§ When software does not control the digital I/O signals (during reset or
before correct initialization), each output is in the same state as the
corresponding input: TPU ch 2 out has the same logical level as TPU ch 2
in, for example. Without connection, the input levels are high due to pull-
ups.
§ PSP shares the output pins with PWM_FP_TPU. This allows you to
generate PWM signals on unused PSP channels.

Related topics Basics

How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338

Relationship between PMMX and PSP

Introduction The following illustration shows the connection of PMMX input, PSP outputs,
and camshaft synchronization via the bit I/O input. The next illustration shows
the connection of the crankshaft sensor signal and PMMX interrupt.

317
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Optical or C: Signal conditioning


magnetic sensor and buffering
electronics
Camshaft Group 4 ch 8
C
(Bit I/O Unit)

Optical or
magnetic sensor
Flywheel
crankshaft PMMX Engine
C Channel positon
60-2

D: High-current

Electronic Spark time


driver electronics
PSP
A D Channel 1
time-angle angle
prior
To sprak plugs

PSP
A D Channel 2
time-angle angle
prior

720° mode PSP


D Channel 3
time-angle angle
B B: Fuel value prior

Electronic Fuel Injection


B: Fuel injection

PSP
D Channel 4
time-angle angle
B prior

PSP
Pressurized D Channel 5
fuel line time-angle angle
prior
B

PSP
D Channel 6
time-angle angle
prior
B

318
MicroAutoBox Features May 2018
Basics on Extended Engine Control

57 58 59 0 1 2 3 4 5 6 7
Crankshaft

adaptive arming
level: 0.02 ... 0.5V
V
Crankshaft
sensor signal

6° 12° 18° 24° 30° 36° 42° 48°


V Internal
57 0 1 2 3 4 5 6 7 crankshaft
signal 68336
TPU input

Interrupt
V
MicroAutoBox
PMMX interrupt

Note

The relationships between signal shapes shown above are only schematic.
For example, the internal crankshaft signal represents the illustrated
crankshaft sensor signal (passive mode) after conversion.

Related topics Basics

Extended Period Measurement (PMMX) for EEC .................................................................... 313


Position-Synchronized Pulse Generation (PSP) for EEC ........................................................... 314

319
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

How Extended Period Measurement for Engine Control Works


Introduction Note

For the PMMX feature references including the I/O connector mapping of
the MicroAutoBox, refer to Extended Period Measurement (PMMX) for EEC
on page 313.

PMMX is used to measure engine speed and maintain separate angular position
counters referenced to the crankshaft cycle (360°) and the engine cycle (720°).
You can synchronize crankshaft signals with camshaft signals to control injection
and ignition via a revolution counter and a camshaft sensor.

Where to go from here Information in this section

Specifying the Crankshaft Wheel ......................................................... 320

Detecting Crankshaft Wheel Gaps ....................................................... 322

Detecting Camshaft Signals ................................................................. 324

Crankshaft and Camshaft Synchronization ........................................... 324

Example for a 60 - 2 Wheel with One Camshaft Pulse ......................... 326

Example for a 60 - 2 Wheel with Two Camshaft Pulses ........................ 328

Example for a 60 - 2 x 2 Wheel with Four Camshaft Pulses .................. 329

Performing Engine Speed Measurement .............................................. 332

Angle-Based Interrupts ........................................................................ 335

Error Handling for Extended Period Measurement ................................ 337

Specifying the Crankshaft Wheel

Introduction PMMX is designed to work with a toothed wheel with an adjustable number of
teeth, missing teeth and gaps. The following illustration shows examples of
possible wheel teeth combinations.

320
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

The PMMX function allows only symmetric gap-teeth combinations. If you want
to use three gaps, for example, the number of teeth between the gaps must be
equal. Using a 90´-tooth wheel, a 90 – 3 · 2 crankshaft flywheel generates a
wheel with three segments, each containing 28 teeth, and three gaps with two
missing teeth.

The following illustration shows a linearized pattern of a toothed wheel


containing 58 teeth with one gap (two missing teeth) that is used as a revolution
sensor (60 – 2 toothed wheel), for example. The upper scale represents the
number of periods within one revolution of the crankshaft, the lower scale the
angle values of the engine cycle.

Tooth counters There are two tooth counters representing the angular position of the crankshaft
and the engine cycles. The resolution depends on the number of specified teeth.

For example, for a wheel with 120 teeth the resolution is 3°. The 360° tooth
counter counts from 0 … 119, and the 720° tooth counter counts from 0 …
239. The counters are incremented only after the PMMX function recognizes a
synchronizing condition and places itself in the synchronized state, see Detecting
a gap on page 322 for detailed information.

Related topics Basics

Detecting Crankshaft Wheel Gaps ........................................................................................ 322

321
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Detecting Crankshaft Wheel Gaps

Introduction The synchronization between crankshaft and camshaft is reached by detecting a


gap on the crankshaft wheel and by detecting a pulse generated by the
camshaft sensor in the corresponding angle range.

Starting gap detection In the pre-synchronized or wait state – meaning before the first gap is detected –
the PMMX function ignores total teeth · 2 transitions that occur immediately
after the function start. During this time, the period is not measured and gaps
are not searched for. After this time the gap search is started. If insufficient
transitions occur, an error code is returned to indicate a stalled condition, and an
interrupt is issued to the slave MC. The error code can be read by the slave MC.
No other action is performed by the PMMX function until the next transition.

Detecting a gap A gap is detected if no tooth is detected for a tooth period that is at least greater
than the last “period · ratio” value. For more information, see Ratio
on page 333.

After the first gap was detected, the counters are reset to 0 and the TPU triggers
an interrupt at the slave MC on each detected rising edge.

In the synchronized state, each subsequent transition causes the 360° and 720°
counters to be incremented. Starting at the first transition after the gap, the
tooth period is also updated on every transition.

Once the synchronized state is obtained, PMMX may generate service requests to
PSP. These functions may then schedule their output signals according to PMMX.

Missing tooth filler When the last transition occurs, a tooth filler match is scheduled for a period of
time after the time of the current transition. This effectively simulates the
occurrence of a tooth within the gap, at a point that corresponds to the
expected position if the toothed wheel was rotating at a constant speed. When
the match for the first simulated tooth occurs, the 360° and 720° counters are
incremented as normal, but the period is unchanged. Following the first
simulated tooth, the next simulated tooth is scheduled in exactly the same
manner. On every transition, the 360° counter and the 720° are incremented.
The 360° counter is reset on every revolution while the 720° counter is reset on
every second revolution.

If a transition is detected during the tooth-filling operation, an error code is


returned to indicate a stalled condition and an interrupt is issued to the slave
MC. The error code can be read by the slave MC. No other action is performed
by the PMMX function until the next transition.

Under normal operating conditions the 360° counter is reset on the last
simulated tooth of the last gap within one revolution. The 720° counter is reset
on the last simulated tooth of the last gap within every second revolution. The
following illustration shows how the counters increment across gaps.

322
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

Noise suppression Two methods are implemented to reduce the effects of noise on the operation of
the PMMX function.
§ The first method ignores transitions that occur at an interval less than an
expected value, given by the expression: period / ratio.
That means, the transition has to be within the ratio window. If a transition
occurs before period / ratio, it is detected as noise. An error code is returned.
No other action is taken by the PMMX function until the next transition.
§ The second method detects the loss of an expected tooth transition and
inserts a simulated transition. The simulated tooth is placed at a time after the
last valid transition that corresponds to a constant speed of rotation of the
toothed wheel. This means that the measured period does not change.

Note

Noise suppression can be disabled for a predefined number of crankshaft


teeth.

§ After successful synchronization, the motor speed can increase rapidly during
the start phase within a very short time (rapid speed explosion). This can cause
several signal edges of the crankshaft wheel to be out of the range that is
defined by the Ratio parameter. These edges would be detected as noise and
synchronization would be restarted.

Related topics Basics

Specifying the Crankshaft Wheel .......................................................................................... 320

323
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Detecting Camshaft Signals

Introduction Camshaft sensor wheels generate signals depending on the wheel used and the
current angle position of the camshaft marker. For synchronizing the crankshaft
and camshaft cycles, it is necessary to specify angle ranges where the detected
camshaft signals are expected. MicroAutoBox uses a digital input connected to a
camshaft sensor to check whether the camshaft marker is within the user-
defined camshaft window. After initialization of the PMMX function, the digital
input pin (Group 4 ch 8, refer to Bit I/O Unit (DIO Type 1) on page 144) is read.

The angle ranges that are searched for signals can be distributed over the whole
engine cycle of 720°.

Using several camshaft windows (quick start wheel) reduces the time for
synchronization. At most, the time passing between two camshaft teeth is
required.

Note

A camshaft signal must at least cover the rising edges of two crankshaft
signals.

Related topics Basics

Crankshaft and Camshaft Synchronization ............................................................................ 324

Crankshaft and Camshaft Synchronization

Introduction The camshaft is coupled to the crankshaft and rotates at half of the rate of the
crankshaft. Since the initial synchronization causes the 720° counter to be reset
to 0, it is possible that this value could be out of phase with the actual engine
cycle.

To avoid signal distortions in the beginning of the synchronization phase, the


rising edges are only detected and counted as long as “number of teeth” · 2
rising edges are reached. Then the first gap is searched for. If the gap is detected
the tooth counter is reset to 0 and for each detected rising edge an interrupt is
issued.

The following steps are performed for synchronization:


§ Synchronization is started after the first gap is detected.
§ During PMMX initialization you have to define the start and end angles where
the camshaft windows are expected.

324
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

§ For each crankshaft interrupt, MicroAutoBox checks if the input of the


camshaft sensor is active high.
§ If the position of the crankshaft interrupt is within the corresponding camshaft
window, MicroAutoBox checks if the camshaft window lies within the given
start and end angles.
§ If the last condition is true, the PMMX function is synchronized and PSP signal
generation is started.

Tip

You can shorten the synchronization time if you use a quick start wheel the
camshaft sensor. These wheels have several markers to generate several
sensor signals.

Segments Internally, the PMMX function uses an angle counter that depends on the
number of gaps that the crankshaft wheel has. The crankshaft cycle of 360° is
divided into segments according to the formula:

Segment = 360° / number of gaps

For example, a wheel with one gap has a segment angle of 360°, a wheel with
two gaps has a segment of 180°.

If a camshaft signal is detected and the crankshaft interrupt is not within the
user-defined camshaft window, the segment value is added to the next
crankshaft angle. The segment value is added to the current crankshaft angle
repeatedly until the crankshaft interrupt is within the user-defined camshaft
window.

To avoid erroneous synchronization, camshaft windows are not allowed to


overlap. Camshaft windows overlap if they are defined in the same angle ranges
of segments. That means if you locate all camshaft windows in one segment
they are not allowed to overlap. If they overlap, the camshaft can be
synchronized, for example, to the next crankshaft segment and not to the
segment in which the camshaft window is actually located. The algorithm cannot
distinguish between the different crankshaft segments. See the following
illustration:

18° 54° 240° 276° 462° 519° 684° 720° 18° 54°

... ... ... ...

...
*1 *2 *3 *4 *5 *6 *7

At position “1” tooth counting is started.

325
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time the camshaft input is checked, but no camshaft signal is
detected.

At position “4” (144°) a camshaft signal is detected. The current angle value of
144° is not within the camshaft window. The angle counter now adds the
segment value of 180° to the current angle value.

At position “5” (150° + 180° = 330°) the next interrupt is generated and a
camshaft signal is detected. The angle value is still outside the user-defined
camshaft window of 684° … 720°. The angle counter adds again the segment
value of 180° to the current angle value.

At position “6” (336° + 180° = 516°) the next interrupt is generated and a
camshaft signal is detected. Synchronization is successful, but erroneous,
because the crankshaft is synchronized to the third (462° … 528°) and not to the
fourth segment (684° … 720°).

Note

§ To avoid erroneous synchronization, camshaft windows are not allowed


to overlap adjacent segments.
§ If you specify an incorrect start or end angle, the PMMX function will
probably not be synchronized.

Example Several examples illustrate different use cases that can occur when using the
PMMX function:
§ Example for a 60 - 2 Wheel with One Camshaft Pulse on page 326
§ Example for a 60 - 2 Wheel with Two Camshaft Pulses on page 328
§ Example for a 60 - 2 x 2 Wheel with Four Camshaft Pulses on page 329

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320
How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338
Relationship between PMMX and PSP ................................................................................... 317

Example for a 60 - 2 Wheel with One Camshaft Pulse

Introduction The example shows you camshaft and crankshaft synchronization for a 60 – 2
crankshaft wheel and a camshaft sensor that generates one signal per

326
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

revolution. The 60 – 2 wheel has 58 teeth and one gap with two missing teeth.
This corresponds to an angle increment of 6° per tooth.

The camshaft window is defined within the range 18° … 54°.

Synchronization after the first In the illustration below, tooth counting is started at position “1”, which
gap corresponds to the 0° reference position (see Reference position on page 334).
Crankshaft signal search starts immediately after the first gap is detected.

18° 54° 18° 54°

. . . . . .

*1 *2 *3

Position “2” shows the first crankshaft signal, for which an interrupt is
generated (dotted arrow), but no camshaft signal is detected.

Position “3” shows the next crankshaft signal with its interrupt. A camshaft
signal is detected and its position is in accordance with the user-defined
camshaft window for that pulse. Synchronization is successful and PSP signal
generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

Synchronization after the In the illustration below, tooth counting is started at position “1”, which
second gap corresponds to the 0° reference position of the second gap (see Reference
position on page 334). Crankshaft signal search starts after the second
crankshaft wheel gap.

18° 54° 18° 54°

. . . . . .

. . .
*1 *2 *3 *4 *5

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time an interrupt is issued the camshaft input is checked, but no
camshaft signal is detected.

At position “4” a camshaft signal is detected. The current angle value of 378° is
not within the camshaft window. The angle counter now adds the segment
value of 360° to the current angle value.

327
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

At position “5” (378° + 360° = 744° = 24°) the next interrupt is generated and
again a camshaft signal is detected. The angle value is within the user-defined
camshaft window of 18° – 54°. Synchronization is successful and PSP signal
generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320

Examples

Example for a 60 - 2 Wheel with Two Camshaft Pulses ......................................................... 328

Example for a 60 - 2 Wheel with Two Camshaft Pulses

Introduction The example shows you camshaft and crankshaft synchronization for a 60 – 2
crankshaft wheel and a camshaft sensor that generates two signals per
revolution. The 60 –2 wheel has 58 teeth and one gap with two missing teeth.
This corresponds to an angle increment of 6° per tooth.

The camshaft windows are defined within the ranges 18° … 54° and 462° …
489°.

Synchronization after first In the illustration below, tooth counting is started at position “1”, which
gap corresponds to the 0° reference position (see Reference position on page 334).

18° 54° 462° 489° 18° 54°

. . . . . .

*1 *2 *3

Position “2” shows the first crankshaft signal, for which an interrupt is
generated (dotted arrows), but no camshaft signal is detected.

Position “3” shows the next crankshaft signal with its interrupt. A camshaft
signal is detected, the angle is checked and its position is in accordance with the
user-defined camshaft window for that pulse (18° … 54°). Synchronization is
successful and PSP signal generation is started (see How Position-Synchronized
Pulse Generation for Engine Control Works on page 338).

328
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

Synchronization after the In the illustration below, tooth counting is started at position “1”, which
second gap corresponds to the 0° reference position of the second gap (see Reference
position on page 334). Crankshaft signal search starts after the second
crankshaft wheel gap.

18° 54° 462° 489° 18° 54°

. . . . . .

*1 *2 *3 *4 *5

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time an interrupt is issued the camshaft input is checked, but no
camshaft signal is detected.

At position “4” (102°) a camshaft signal is detected. The current angle value of
102° is not within the camshaft window. The angle counter now adds the
segment value of 360° to the current angle value.

At position “5” (108 ° + 360° = 468°) the next interrupt is generated and again
a camshaft signal is detected. The angle value is now within the user-defined
camshaft window of 462° – 498°. Synchronization is successful and PSP signal
generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

In comparison to the example that describes a case with one camshaft pulse (see
Example for a 60 - 2 Wheel with One Camshaft Pulse on page 326),
synchronization is reached half an engine cycle faster.

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320

Examples

Example for a 60 - 2 Wheel with One Camshaft Pulse ........................................................... 326

Example for a 60 - 2 x 2 Wheel with Four Camshaft Pulses

Introduction The example shows you camshaft and crankshaft synchronization for a 60 – 2x2
crankshaft wheel and a camshaft sensor that generates four signals per
revolution. The 60 –2 x 2 wheel has 2 x 28 teeth and two gaps each with two

329
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

missing teeth. This corresponds to an angle increment of 6° per tooth. The


segment value is 180° (360°/2).

The camshaft windows are defined within the ranges 18° … 54°, 240° … 276°,
462° … 489° and 684° … 720°.

In the illustration below, tooth counting is started at position “1”, which


corresponds to the 0° reference position (see Reference position on page 334).
Crankshaft signal search starts after the first crankshaft wheel gap.

18° 54° 240° 276° 462° 489° 684° 720° 18° 54°

... ... ... ...

*1 *2 *3

Position “2” shows the first crankshaft signal for which an interrupt is generated
(dotted arrows), but no camshaft signal is detected.

Position “3” shows the next crankshaft signal with its interrupt. A camshaft
signal is detected, the angle is checked and its position is in accordance with the
user-defined camshaft window for that pulse (18° … 54°). Synchronization is
successful and PSP signal generation is started (see How Position-Synchronized
Pulse Generation for Engine Control Works on page 338).

Synchronization after the In the illustration below, tooth counting is started at position “1”, which
second gap corresponds to the 0° reference position (see Reference position on page 334).
Crankshaft signal search starts after the second crankshaft wheel gap.

18° 54° 240° 276° 462° 489° 684° 720° 18° 54°

... ... ... ...

*1 *2 *3 *4 *5

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time an interrupt is issued the camshaft input is checked, but no
camshaft signal is detected.

At position “4” (60°) a camshaft signal is detected. The current angle value of
60° is not within the camshaft window. The angle counter now adds the
segment value of 180° to the current angle value.

At position “5” (66° + 180° = 246°) the next interrupt is generated and a
camshaft signal is detected. The angle value is now within the user-defined

330
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

camshaft window of 240° – 276°. Synchronization is successful and PSP signal


generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

Synchronization after the In the illustration below, tooth counting is started at position “1” which
third gap corresponds to the 0° reference position (see Reference position on page 334).
Crankshaft signal search starts after the third crankshaft wheel gap.

18° 54° 240° 276° 462° 489° 684° 720° 18° 54°

... ... ...

*1 *2 *3 *4 *5 *6

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time an interrupt is issued the camshaft input is checked, but no
camshaft signal is detected.

At position “4” (102°) a camshaft signal is detected. The current angle value of
102° is not within the camshaft window. The angle counter now adds the
segment value of 180° to the current angle value.

At position “5” (108° + 180° = 288°) the next interrupt is generated and a
camshaft signal is detected. The angle value is still outside the user-defined
camshaft window of 462° – 489°. The angle counter again adds the segment
value of 180° to the current angle value.

At position “6” (295° + 180° = 474°) the next interrupt is generated and again a
camshaft signal is detected. The angle value is now within the user-defined
camshaft window of 462° – 498°. Synchronization is successful and PSP signal
generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

Synchronization after the In the illustration below, tooth counting is started at position “1”, which
fourth gap corresponds to the 0° reference position (see Reference position on page 334).
Crankshaft signal search starts after the fourth crankshaft wheel gap.

18° 54° 240° 276° 462° 489° 684° 720° 18° 54°

... ... ... ...

...
*1 *2 *3 *4 *5 *6 *7

331
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

Position “2 - 3” shows the crankshaft signals, for which interrupts are


generated. Each time the camshaft input is checked, but no camshaft signal is
detected.

At position “4” (144°) a camshaft signal is detected. The current angle value of
144° is not within the camshaft window. The angle counter now adds the
segment value of 180° to the current angle value.

At position “5” (150° + 180° = 330°) the next interrupt is generated and a
camshaft signal is detected. The angle value is still outside the user-defined
camshaft window of 684° – 720°. The angle counter again adds the segment
value of 180° to the current angle value.

At position “6” (336° + 180° = 516°) the next interrupt is generated and a
camshaft signal is detected. The angle value is still outside the user-defined
camshaft window of 684° – 720°. The angle counter again adds the segment
value of 180° to the current angle value.

At position “7” (516° + 180° = 702°) the next interrupt is generated and again a
camshaft signal is detected. The angle value is now within the user-defined
camshaft window of 684° – 720°. Synchronization is successful and PSP signal
generation is started (see How Position-Synchronized Pulse Generation for
Engine Control Works on page 338).

In comparison to the example that describes a case with two camshaft pulses
(see Example for a 60 - 2 Wheel with Two Camshaft Pulses on page 328),
synchronization is reached at least after 180°.

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320

Examples

Example for a 60 - 2 Wheel with Two Camshaft Pulses ......................................................... 328

Performing Engine Speed Measurement

Introduction In the synchronized state, the current engine speed is obtained by accumulating
several periods of normal tooth transitions of the toothed wheel. The number of
periods to be accumulated must be greater than the number of missing teeth
and is set automatically. It must also be divisible by the number of teeth between
two gaps without any remainder. In the non-synchronized state, an engine speed
value is obtained by measuring the last period.

332
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

Ratio The engine revolution can be changed by acceleration or deceleration. The ratio
determines the factor that the revolution is allowed to change by the next period
without generating an error, for example a noise error. For example, if a ratio of
1.4 is set, the next tooth transition is expected within a window of
period/1.4 … period · 1.4. For period = 1 ms this is a window within 0.7 … 1.4
ms.

Period detection In the synchronized state, the ratio is used to detect tooth
periods which do not match the ratio window (period/ratio … period · ratio):
§ If an unexpected transition occurs, error message 83 is issued. The last period
was smaller than the ratio window.
§ If the period exceeds the ratio window (period · ratio), error message 84 is
issued. A gap is detected at a position where a transition should be.
Both error messages cause the slave MC68K to synchronize again. In the
synchronized state the position of the gap is known. If the gap is not detected at
the expected position – a transition is detected at the gap’s position – error
message 82 is issued (refer to Error Handling for Extended Period Measurement
on page 337).

Available engine speed The maximum and minimum engine speed depends on the TPU prescaler. The
TPU prescaler is specified within the timer count register 1 (TCR1). The minimum
and maximum engine speed can be determined with the following formulas.

To calculate the working frequency of TCR1:

§ Tcr1clk = Working frequency of TCR1


§ CPUclk = MC68k clock frequency (normally 20 MHz)
§ Psc = Prescaler value adjusted by the TPUPrescaler parameter

To calculate the number of TCR1 timer tics:

§ TicsTcr1 = Number of Tcr1 timer tics


§ Ratio = Value of the Ratio parameter

Note

Transferring ratio from the Master PPC to the Slave DIO MC the data type
changes from Float64 to Int. The value is rounded. Using the rounded Int
value can result in a different Rpmmin value. Use then the float value directly.

To calculate engine revolution:

333
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

§ Rpmmin = minimum engine speed (rpm) possible to measure


§ Tcr1clk = working frequency of TCR1
§ TotalTeeth = value of the TotalTeeth parameter
§ TicsTcr1 = number of TCR1 timer tics

This results in the following formula to calculate the minimum engine speed:

Crankshaft wheels with a lower number of teeth allow higher maximum engine
speeds and wheels with a higher number of teeth lower maximum engine
speeds. The formula is only an approximation because the maximum available
engine speed also depends on the current loading of the TPU. The following
table shows an example of possible engine speeds for a 60 – 2 wheel.

TPU Prescaler Maximal engine speed [rpm]


4 > 20 000
8 > 20 000
16 > 20 000
32 > 20 000
64 > 20 000
128 12 000
256 6 000

Reference position The 0° reference position for the PMMX and PSP functions is the rising edge of
the last simulated tooth of the gap. The following illustration shows examples for
a 90x3, a 60x2 and a 30x1 toothed wheel.
0° at rising edge

90x3 toothed wheel


4° 8° 12°

0° at rising edge
60x2 toothed wheel 6° 12°

0° at rising edge
30x1 toothed wheel
12°

334
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

Note

This reference position does not match the industrial standard "degree
before TDC (top dead centre) for the corresponding cylinder." To adjust an
angle relative to the 0° reference position, you have to define the engine-
specific offset for every cylinder. This is an angle before and after the top
dead centre.

Related topics Basics

Crankshaft and Camshaft Synchronization ............................................................................ 324


How Extended Period Measurement for Engine Control Works ............................................. 320

References

dio_tp1_eec_tpu_pmmx2_init ( MicroAutoBox RTLib Reference)


DIO_TYPE1_CRANK_SETUP_Mx ( MicroAutoBox RTI Reference)
DIO_TYPE1_ENG_SPEED_Mx ( MicroAutoBox RTI Reference)

Angle-Based Interrupts

Introduction Interrupts can be generated on the slave MC68K on every tooth transition to
ensure error detection, for example. In addition, interrupts can be defined on
specified engine angles. For those interrupts you have to include a delay time.
Within the interrupt task, sensor data is read, new PSP data (injection and
ignition data) is calculated, and data is transferred to the slave MC68K. To
transfer the PSP data in time you therefore have to generate the interrupt a
sufficient time before PSP signal generation. The following illustration shows you
a simplified angle-based interrupt generation with PSP signals:

0° Angle-based interrupt 720°

Inj1 Inj2 Inj3 Inj4

The following illustrations show the interrupt generation with one or more
subinterrupts in relation to tooth transitions. The delay time is 54 μs for all
ranges.

335
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

0 36

Subinterrupt should Subinterrupt is triggered with


be triggered at 12° a delay of 54 µs - here at 13.5°

Only one subinterrupt per tooth transition can be triggered. If you want to
trigger more than one subinterrupt between two tooth transitions, the first is
triggered with the normal delay time. The following subinterrupts are triggered
after the next tooth transition plus the delay time.
Second subinterrupt is triggered
First subinterrupt is after the next transition + delay time
triggered with - here at 13.5° (here at 19.5°)

0 36

First subinterrupt should be Second subinterrupt should


triggered at 13.5° be triggered at 16.5°

Note

You can trigger two subinterrupts within the angle range of one tooth
transition, for example 6°, if the tooth transition is between the two
subinterrupts.

First subinterrupt is Second subinterrupt is


triggered here at 10.5° triggered here at 13.5°

0 36

First subinterrupt should be Second subinterrupt should


triggered at 10.5° be triggered at 13.5°

If more than one subinterrupt should be triggered at the same angle, only the
first is triggered under normal conditions. All others are triggered after the next
tooth transition plus the delay time. No subinterrupt is lost but they are not
triggered at the desired angle.

336
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works

Second and third subinterrupt is


First subinterrupt is triggered after the next transition +
triggered - here at 15° delay time (here at 19.5°)

Three subinterrupts should


be triggered at 15°

Related topics Basics

How Extended Period Measurement for Engine Control Works ............................................. 320
How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338

References

dio_tp1_eec_tpu_angle_int_init ( MicroAutoBox RTLib Reference)


DIO_TYPE1_ANGLE_INT_Mx_SINTy ( MicroAutoBox RTI Reference)

Error Handling for Extended Period Measurement

Introduction When the PMMX detects an error it returns an error code and issues an interrupt
to the Slave DIO MC. The error code can be read by the Slave DIO MC. Further
transitions and matches are processed as if the error had not occurred. This may
result in a new error code overwriting the previous value.

The PMMX function can generate the following error codes. In all cases the error
code is reported to the Slave DIO MC. Using dio_tp1_eec_tpu_pmmx_read_fast
you can read the error message from the Master PPC:

Error Error Type Error Condition Reaction


Number
0x81 Error_Code_Stall Insufficient transitions occurred in wait No special action
state.
0x82 Error_Code_Shortgap Unexpected transition occurred in the No special action
gap.
0x83 Error_Code_Noise Unexpected transition occurred outside Stops PMMX and initializes
the gap. again.
0x84 Error_Code_Sync_Stall Tooth period exceeds expected maximum Stops PMMX and initializes
in synchronized state. again.
0x85 Error_Code_Match_Range Time-out match exceeds 0x8000. Stops PMMX and initializes
again.

337
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

How Position-Synchronized Pulse Generation for Engine


Control Works
Introduction Note

For the PSP feature references including the I/O connector mapping of the
MicroAutoBox, refer to Position-Synchronized Pulse Generation (PSP) for
EEC on page 314.

Output pulses The PSP function is designed to produce up to five logic low-output pulses per
channel within one engine cycle. Modern engines, for example, common rail
diesel engines, use up to three pulses per engine cycle. You have to specify the
angle and duration time for each pulse.

Note

If you generate several pulses per channel, you have to keep their sequence.
Pulse 0 must be generated before pulse 1, for example. A change of the
sequence will lead to unpredictable pulse sequences at the output.

Top dead center (TDC) Engine control is based on the top dead centers of the cylinders of an engine.
For example, if you use a six-cylinder engine, the TDCs are 0°, 120°, 240°, 360°,
480° and 600°. All angles of the PSP are related to these TDC values. Because
the reference position of the PMMX function does not match the industrial TDC,
you have to define an engine specific offset, for example 20°. This angle can be
before or after the TDC. In contrast to the RTI blocks, the RTLib functions use
absolute angle values that are not related to the TDC. You must therefore
convert the angle values in your S‑Function, User‑Code or hand‑coded
application.

PSP may be operated in one of two basic ways:


§ Time-Angle Operation With PSP on page 339
§ Angle-Time Mode With PSP on page 341

Where to go from here Information in this section

Time-Angle Operation With PSP .......................................................... 339

Angle-Time Mode With PSP ................................................................. 341

338
MicroAutoBox Features May 2018
How Position-Synchronized Pulse Generation for Engine Control Works

Time-Angle Operation With PSP

Introduction The rising edge of the output pulse is defined by an angular position referenced
from one of the 2 tooth counters (see Tooth counters on page 321) maintained
by the PMMX function. These tooth counters are internal functions and cannot
be accessed by you.

The falling edge of the output pulse is defined as a constant time prior to the
rising edge, and is called the Dwell Time.

You may configure the time-angle function of PSP to operate in one of two
different modes:
§ Time-angle time priority
§ Time-angle angle priority.

Time-angle time-priority The time priority mode can be used to generate an injection signal for an petrol
engine. A defined amount of gasoline has to be injected into the cylinder within
a specified time. The quantity is important, because too much gasoline can
impair exhausting behavior.

Provided that the Master PPC does not change the dwell time once the falling
edge occurs in time-priority mode, the duration of the low pulse is held constant,
irrespective of changes in tooth period. This means that the rising edge may
occur at a different angle to the one specified in End Angle if the tooth period
changes while the output is low.
Constant Speed Deceleration

Dwell Time Dwell Time

Actual Expected
End Angle End Angle

Pulse angle scheduling The Master PPC may asynchronously update the pulse angle without inadvertent
loss or addition of a pulse.

Limitations § PSP signal generation contains a mechanism to suppress the rescheduling of


pulses within a predefined angle range, starting at a specified end angle. No
new pulse is generated until the next engine cycle within this window. This
can lead to unpredictable pulse generation behavior when:
§ The time between two pulses is less than the predefined window.
§ The acceleration or deceleration of the engine is very high.

339
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

The window size for suppressing the rescheduling of pulses depends on the
number of teeth and the priority mode.

Time-Angle Mode Window Size


(Number of Teeth)
Time‑angle time priority nteeth / 6
Time-angle angle priority nteeth / 12
Angle-time mode nteeth / 12
§ You can change the length of the first pulse during its generation. If the
modified pulse ends before the rescheduling window has been started, the
pulse will be scheduled a second time. This can lead to unpredicted signal
generation in time-angle time priority mode.

Example If you use a wheel with 60 teeth, each tooth represents an angle of 6°. The
window for suppressing pulse rescheduling in time‑angle time priority mode is
60 / 6 = 10 teeth, or 10 · 6° = 60°, starting at the specified end angle. In the
other modes the window size is 5 teeth, or 30°.

Time-angle angle priority The angle priority can be used if an exact end angle of the camshaft is expected,
for example, for the generation of an ignition pulse for a petrol motor. The
ignition coil is charged within a specified time. At the end angle, the ignition has
to be performed whether or not the revolution changes. An exact end angle is
more important than a shorter or longer charging time.

Depending on the resolution given by the specified wheel, the angle-priority


mode calculates the angular position of the rising edge, irrespective of whether
the output is low or high. This means that while the output pin is low, the actual
duration of the low pulse may change as a result of a change in tooth period,
which ensures the best case angular position of the rising edge.

In angle-priority mode, the TPU uses the new Dwell Time and End Angle
parameters at the next tooth transition.

Limitations § If acceleration causes both the rising and falling edges of a pulse to become
scheduled in the next tooth period to the expected one, the pulse is
rescheduled for the next cycle by the microcoded pulse scheduler. This means

340
MicroAutoBox Features May 2018
How Position-Synchronized Pulse Generation for Engine Control Works

that the expected pulse does not occur. This problem only arises for short
pulse widths and high acceleration.
§ The pulse discontinuity must not be less than ((NumOfTeeth * 10) / 120)
teeth, otherwise there will be unpredictable low pulses.
§ Anomalous operation occurs if Dwell Time equals or exceeds the period of the
cycle of the referenced tooth counter (more than 360° or 720°).

Related topics Basics

Angle-Time Mode With PSP .................................................................................................. 341


Extended Period Measurement (PMMX) for EEC .................................................................... 313
Position-Synchronized Pulse Generation (PSP) for EEC ........................................................... 314

Angle-Time Mode With PSP

Introduction The angle-time mode can be used for diesel engines. These lack ignition pulses.
It is more important to start the injection of gasoline at an exact start angle to
get a correct ignition for the cylinder.

The falling edge of the output pulse is defined by an angular position referenced
from a counter maintained by the PMMX function. The rising edge of the output
pulse is defined as a constant time after the falling edge, and is called Dwell
Time. Once the falling edge occurs, the duration of the low pulse is defined
solely by Dwell Time, and is independent of any change in the tooth period. The
Dwell Time value may be changed by the Master PPC at any time.

Limitations § The pulse discontinuity must not be less than ((NumOfTeeth * 10) / 120)
teeth, otherwise there will be unpredictable high and low pulses for one
crankshaft cycle.
§ Anomalous operation occurs if Dwell Time equals or exceeds the period of the
cycle of the referenced tooth counter (more than 360° or 720°).

Related topics Basics

Extended Period Measurement (PMMX) for EEC .................................................................... 313


Position-Synchronized Pulse Generation (PSP) for EEC ........................................................... 314
Time-Angle Operation With PSP ........................................................................................... 339

341
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)

342
MicroAutoBox Features May 2018
CAN Support

CAN Support

Introduction The following topics provide all the information required for working with
dSPACE CAN boards.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ – ✓ ✓ – ✓ –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Setting Up a CAN Controller ................................................................ 345


Explains how to set up a CAN controller to use a dSPACE board with
CAN bus interface.

Using the RTI CAN MultiMessage Blockset ........................................... 360


Provides information on using the RTI CAN MultiMessage Blockset.

CAN Signal Mapping ........................................................................... 382


Lists the CAN signals of the dSPACE real-time hardware and the mapping
of these signals to RTI blocks and RTLib functions.

343
May 2018 MicroAutoBox Features
CAN Support

Information in other sections

Limited Number of CAN Messages ...................................................... 477


When you implement CAN communication with RTI CAN Blockset or
with RTLib's CAN access functions, the number of CAN messages in an
application is limited.

344
MicroAutoBox Features May 2018
Setting Up a CAN Controller

Setting Up a CAN Controller


Introduction To use a dSPACE board with CAN bus interface, you have to set up the CAN
controller.

Where to go from here Information in this section

Initializing the CAN Controller ............................................................. 346


The CAN controller performs serial communication according to the CAN
protocol. You must configure the CAN controller according to the
application.

CAN Transceiver Types ......................................................................... 347


The way in which CAN messages are transmitted on a CAN bus depends
on the CAN transceiver used.

MicroAutoBox: Selecting the CAN Controller Frequency ...................... 351


Depending on the CAN module version of your MicroAutoBox,
MicroAutoBox supports different maximum CAN controller clock
frequencies.

Defining CAN Messages ...................................................................... 352


The dSPACE CAN software lets you easily define CAN messages to be
transmitted or received.

Implementing a CAN Interrupt ............................................................. 353


The CAN controller is responsible for generating interrupts to the master
processor. You can specify the events on which these interrupts are
generated.

Using RX Service Support ..................................................................... 354


RTI CAN Blockset provides two concepts for receiving CAN messages.

Removing a CAN Controller (Go Bus Off) ............................................. 356


You can remove the CAN controller that is being used from the bus
when you use several CAN controllers.

Getting CAN Status Information .......................................................... 356


You can use the Error Management Logic (EML) of a CAN controller to
get error and status information on the CAN bus and the controller.

CAN Partial Networking ....................................................................... 358


With CAN partial networking, selected ECUs in a network can be set to
sleep mode or shut down ifthey do not have to run continuously.
Wake‑up messages then activate specific ECUs as and when required,
and for as long as required.

345
May 2018 MicroAutoBox Features
CAN Support

Initializing the CAN Controller

Introduction The CAN controller performs serial communication according to the CAN
protocol. You can take control of or communicate with other members of a CAN
bus via the controller. This means you must configure the CAN controller —
called the CAN channel — according to the application.

Standard configuration You must specify the baud rate for the CAN application and the sample mode:

Sample Mode Description


1‑sample mode (supported by all dSPACE CAN boards)
The controller samples a bit once to determine if it is
dominant or recessive.
3‑sample mode (supported by the DS4302 only)
The controller samples a bit three times and uses the majority
to determine if it is dominant or recessive.

The required bit timing parameters are automatically calculated by the dSPACE
CAN software.

Advanced configuration (bit The bits of a CAN message are transmitted in consecutive bit times. According to
timing parameters) the CAN specification, a bit time consists of two programmable time segments
and a synchronization segment:

TSeg1 Timing segment 1. The time before the sample point.

TSeg2 Timing segment 2. The time after the sample point.

SyncSeg Used to synchronize the various bus members (nodes).

1 bit time

Sync-
Seg TSeg1 TSeg2

1 time quantum Sample point

The following parameters are also part of the advanced configuration:

SP Sample point. Defines the point in time at which the bus voltage level
(CAN-H, CAN-L) is read and interpreted as a bit value.

SJW Synchronization jump width. Defines how far the CAN controller can
shift the location of the sample point to synchronize itself to the other bus
members.

BRP Baud rate prescaler value. The BRP defines the length of one time
quantum.

346
MicroAutoBox Features May 2018
Setting Up a CAN Controller

SMPL Sample mode. Either 1-sample or 3‑sample mode. Applicable to the


DS4302 only.
Except for the SyncSeg parameter, you must define all these parameters via the
values of the bit timing registers (BTR0, BTR1), located on the CAN controller.

Note

Setting up bit timing parameters requires advanced knowledge of the CAN


controller hardware and the CAN bus hardware.

RTI support You initialize a CAN controller with the RTICAN CONTROLLER SETUP block.

Refer to RTICAN CONTROLLER SETUP ( RTI CAN Blockset Reference).

Related topics References

RTICAN CONTROLLER SETUP ( RTI CAN Blockset Reference)

CAN Transceiver Types

Introduction To communicate with other bus members in a CAN bus, each bus member is
equipped with a CAN transceiver. The transceiver defines the type of wire used
for the bus (coaxial, two-wire line, or fiber-optic cables), the voltage level, and
the pulse forms used for 0‑bit and 1‑bit values. The way in which CAN messages
are transmitted on a CAN bus therefore significantly depends on the CAN
transceiver used.

Note

Make sure that the CAN transceiver type used on the CAN bus matches the
type on the dSPACE board you use to connect to the bus.

Terminating the CAN bus Depending on the CAN transceiver type, you must terminate each CAN bus with
resistors at both ends of the bus.

Note

Failure to terminate the bus will cause bit errors due to reflections. These
reflections can be detected with an oscilloscope.

347
May 2018 MicroAutoBox Features
CAN Support

Where to go from here Information in this topic

Supported transceivers .......................................................................................................... 348


ISO11898 transceiver ............................................................................................................ 348
ISO11898‑6 transceiver ......................................................................................................... 349
RS485 transceiver ................................................................................................................. 350
C252 fault-tolerant transceiver ............................................................................................. 350
Custom transceivers .............................................................................................................. 350

Supported transceivers The following table lists dSPACE hardware and the supported transceivers:

dSPACE Hardware Transceiver Type


§ DS1103 ISO11898
§ DS2202
§ DS2210
§ DS2211
DS4302 The following transceiver types are supported:
§ ISO11898
§ RS485
§ C252
§ Piggyback1)

Note

The RTI CAN Blockset does not support transceiver


types with different modes, for example single-wire
and two-wire operation. Nevertheless, such
transceiver types can be applied to the DS4302, but
additional user-written S-functions are required to
implement the communication between the
piggyback module and the CAN controller.

MicroAutoBox The following transceiver types are supported:


§ ISO11898
§ ISO11898‑62), 3)
MicroLabBox The following transceiver types are supported:
§ ISO11898
§ ISO11898‑62)
1) If none of the above transceivers matches your application or if a TJA1041 transceiver
is used, “piggyback” must be selected as the transceiver type.
2) Selecting the ISO11898‑6 transceiver type is required to perform partial networking.
3) Supported only by MicroAutoBox with DS1513 I/O board

ISO11898 transceiver ISO11898 defines a high-speed CAN bus that supports baud rates of up to
1 MBd. This is the most commonly used transceiver, especially for the engine
management electronics in automobiles.

348
MicroAutoBox Features May 2018
Setting Up a CAN Controller

CAN‑H, CAN‑L ISO11898 defines two voltage levels:

Level Description
CAN-H High if the bit is dominant (3.5 V), floating (2.5 V) if the
bit is recessive.
CAN-L Low if the bit is dominant (1.0 V), floating (2.5 V) if the
bit is recessive.

Termination To terminate the CAN bus lines, ISO11898 requires a 120‑Ω


resistor at both ends of the bus.

ISO11898‑6 transceiver High-speed transceiver that supports partial networking.

Termination To terminate the CAN bus lines, ISO11898‑6 requires a 120‑Ω


resistor at both ends of the bus.

Note

There are some limitations when you use the optional ISO11898‑6
transceiver:
§ No wake-up interrupt is implemented.
§ Partial networking is supported only for the following baud rates:
§ 125 kbit/s
§ 250 kbit/s
§ 500 kbit/s
§ 1000 kbit/s
Other baud rates can be used for normal CAN operation, but detecting
wake-up messages for partial networking is supported only for the baud
rates listed above.
§ You have to enable Automatic Wake Up on the Parameters Page
(RTI<xxxx>_ISO11898_6_SST) before you build the model. You cannot
enable automatic wake‑up during run time.
§ If the transceiver is in power on / listen only mode, the CAN controller
does not send an acknowledge message to the transmitter. The
transmitter therefore continues to send the message until it receives the
acknowledge signal. This might result in a task overrun if an RX interrupt
is configured for the CAN controller.
§ If the transceiver is in power on / listen only mode, it is not able to send
CAN messages. Automatic wake‑up is not possible if the transceiver is in
power on / listen only mode. Because no message is sent on the CAN bus
by the transceiver in power on / listen only mode, CAN arbitration fails.
The CAN controller changes to the BUS OFF state. It is not possible to set
the BUS state automatically to BUS ON via an interrupt, because the
reason for the BUS OFF state still remains. You must set the CAN
controller to BUS ON after you have switched the transceiver state to
normal, standby, or sleep mode.

349
May 2018 MicroAutoBox Features
CAN Support

RS485 transceiver The RS485 transceiver supports baud rates of up to 500 kBd. It is often used in
the automotive industry. A CAN bus using this transceiver can connect up to 25
CAN nodes.

Termination To terminate the CAN bus lines, a 120-Ω resistor must be used
at both ends of the CAN bus.

C252 fault-tolerant The C252 fault-tolerant transceiver supports baud rates of up to 125 kBd. Its
transceiver main feature is on-chip error management, which allows the CAN bus to
continue operating even if errors such as short circuits between the bus lines
occur.

When this transceiver is used, the CAN bus can interconnect nodes that are
widely distributed. You can switch the C252 transceiver between sleep and
normal (awake) mode.

Termination There are two ways to terminate the CAN bus lines: Use a 10
kΩ resistor for many connected bus members, or a 1.6 kΩ resistor if the number
of bus members is equal to or less than five. The termination resistors are located
between CAN‑L and RTL and CAN‑H and RTH (refer also to the "PCA82C252
Fault-tolerant Transceiver Data Sheet" issued by Philips Semiconductors).

Note

The TJA1054 transceiver is pin and downward compatible with the C252
transceiver. If the TJA1054 transceiver is on board the DS4302 and you
want to use the fault‑tolerant transceiver functionality, select “C252” in the
RTI CAN CONTROLLER SETUP block. Refer to Unit Page (RTICAN
CONTROLLER SETUP) ( RTI CAN Blockset Reference).

Custom transceivers The DS4302 allows you to mount up to four customization modules to use
transceivers that are not on the DS4302.

Connecting customization modules For instructions on connecting


customization modules, refer to Customization Modules ( PHS Bus System
Hardware Reference).

Optional TJA1041 transceiver dSPACE provides the optional TJA1041 that


you can use as a custom transceiver for the DS4302. For a detailed description of
the transceiver and the available transceiver modes, refer to the data sheet of the
TJA1041 transceiver.

350
MicroAutoBox Features May 2018
Setting Up a CAN Controller

For details on the RTI support for the TJA1041 transceiver, refer to TJA1041
Support Blocks ( RTI CAN Blockset Reference).

Note

There are some limitations when you use the optional TJA1041 transceiver:
§ No wake-up interrupt is implemented.
§ You have to enable Automatic Wake Up in the DS4302_TJA1041_SST
( RTI CAN Blockset Reference) block before you build the model. You
cannot enable automatic wake‑up during run time.
§ If the transceiver is in power on / listen only mode, the CAN controller
does not send an acknowledge message to the transmitter. The
transmitter therefore continues to send the message until it receives the
acknowledge signal. This might cause a task overrun if an RX interrupt is
configured for the CAN controller.
§ If the transceiver is in power on / listen only mode, it is not able to send
CAN messages. Automatic wake‑up is not possible if the transceiver is in
power on / listen only mode. Because no message is sent on the CAN bus
by the transceiver in power on / listen only mode, CAN arbitration fails.
The CAN controller changes to the BUS OFF state. It is not possible to set
the BUS state automatically to BUS ON via an interrupt, because the
reason for the BUS OFF state still remains. You must set the CAN
controller to BUS ON after you have switched the transceiver state to
normal, standby, or sleep mode.

MicroAutoBox: Selecting the CAN Controller Frequency

Introduction Depending on the CAN module version of your MicroAutoBox, MicroAutoBox


supports the following maximum CAN controller clock frequency:

Module Version Frequency


Up to 2.0 24 MHz
2.0 and higher 36 MHz
2.1 and higher 64 MHz

To get the CAN module version of your MicroAutoBox, use the dSPACE
experiment software.

Highest possible frequency The real‑time application built with RTI CAN Blockset is compatible with both
automatically selected module versions and frequencies: During board initialization, the highest
frequency that is available for the controller is automatically selected, together
with the corresponding bit timing values. This applies regardless of the frequency
you select in the Advanced Configuration dialog. Refer to Advanced

351
May 2018 MicroAutoBox Features
CAN Support

Configuration Dialog (RTICAN CONTROLLER SETUP) ( RTI CAN Blockset


Reference).

Note

If your real‑time application was built with RTI CAN Blockset from dSPACE
Release 4.0 or before, the CAN controller will always run at 24 MHz, that
means, even if the controller supports 36 MHz.

Defining CAN Messages

Introduction The dSPACE CAN software lets you easily define CAN messages to be
transmitted or received.

Message types You can define a message as a TX, RX, RQ, or RM message:

Message Type Description


Transmit (TX) This message is transmitted with a specific identifier. A TX message contains up to 8 bytes of data.
Receive (RX) This message is not transmitted over the bus. An RX message is used only to define how the CAN
controller processes a received message. An RX message transfers the incoming data from the CAN
controller to the master processor.
Request (RQ) First part of a remote transmission request1). An RQ message is transmitted with a specific identifier
to request data. An RQ message does not contain data.
Remote (RM) Second part of a remote transmission request1). An RM message is a TX message that is sent only if
the CAN controller has received a corresponding RQ message. The RM message contains the data
requested by the RQ message.
1) With RTI CAN Blockset, the remote transmission request is divided into an RQ message and an RM message. The meanings of
the words “remote” and “request” used in this document do not correspond to those used in CAN specifications.

Message configuration With RTI CAN Blockset, you have to implement one message block for each
message. To define a message to be transmitted, for example, you must
implement an RTICAN Transmit (TX) block.

Message configuration by hand You can perform message configuration


by hand. In this case, you must specify the message identifier and identifier
format (STD, XTD), the length of the data field, and the signals for each
message. You also have to specify the start bit and length of each signal.

Message configuration from data file (data file support) You can load a
data file containing the configuration of one or more messages. Then you can
assign a message defined in the data file to a message block. Refer to
Configuring CAN Messages via Data Files ( RTI CAN Blockset Reference).

352
MicroAutoBox Features May 2018
Setting Up a CAN Controller

Multiple message access Multiple message access allows you to place several RX or TX blocks with the
same identifier and identifier format in one model. You can decode the signals of
an RX message in several ways, or place TX blocks in several enabled subsystems
to send data in various ways.

Delay time for message To distribute messages over time and avoid message bursts, you can specify delay
transmission times. A message is sent after the delay time. The delay time is a multiple of the
time needed to send a CAN message at a given baud rate and identifier format.
You can only enter a factor to increase or decrease the delay time.

RTI support With RTI CAN Blockset, you have to implement one message block for each
message. Refer to:

Message Type RTI Block


Transmit (TX) RTICAN Transmit (TX) ( RTI CAN Blockset Reference)
Receive (RX) RTICAN Receive (RX) ( RTI CAN Blockset Reference)
Request (RQ) RTICAN Request (RQ) ( RTI CAN Blockset Reference)
Remote (RM) RTICAN Remote (RM) ( RTI CAN Blockset Reference)

Related topics Basics

Configuring CAN Messages via Data Files ( RTI CAN Blockset Reference)

Implementing a CAN Interrupt

Introduction The CAN controller transmits and receives messages and handles error
management. It is also responsible for generating interrupts to the master
processor. You can specify the events on which these interrupts are generated.

A special Bus Failure interrupt and a wake-up interrupt are available for the
DS4302.

RTI support You can implement a CAN interrupt with the RTICAN Interrupt block. Refer to
RTICAN Interrupt ( RTI CAN Blockset Reference).

353
May 2018 MicroAutoBox Features
CAN Support

Related topics References

RTICAN Interrupt ( RTI CAN Blockset Reference)

Using RX Service Support

Concepts for receiving CAN When CAN messages are received, RX blocks access the DPMEM between the
messages master processor and the slave processor.

RTI CAN Blockset provides two concepts for receiving CAN messages:
§ Common receive concept
§ RX service receive concept

Common receive concept According to the common receive concept, one data object is created in the
DPMEM for each received CAN message. Due to the limited DPMEM size, the
number of RX blocks you can use in a model is limited to 100 (200 for the
DS4302).

RX service receive concept When you enable RX service support, one data object is created in the DPMEM
for all received CAN messages, and memory on the master processor is used to
receive CAN messages. The RX service fills this memory with new CAN data. This
concept improves run‑time performance.

Tip

In contrast to the common receive concept, the number of RX blocks for


which RX service support is enabled is unlimited.

Specifying a message filter When you use RX service, you have to specify a
filter to select the messages to receive via RX service. To define the filter, you
have to set up a bitmap that represents the message. Each bit position can be
assigned 0 (must be matched), 1 (must be matched), or X (don't care). A
message is received via RX service only if it matches the bitmap.
You can define the message filter on the RX Service Page (RTICAN
CONTROLLER SETUP) ( RTI CAN Blockset Reference).

Specifying the queue size When you use RX service, you have to specify the
maximum number of CAN messages that you expect to receive in a sample step.
The memory allocated on the master processor used to queue CAN messages is
calculated from the specified maximum number of CAN messages.

354
MicroAutoBox Features May 2018
Setting Up a CAN Controller

Note

If more CAN messages than the specified Queue size are received in a
sample step, the oldest CAN messages are lost. You should therefore specify
the queue size so that no CAN messages are lost.
Example:
A CAN controller is configured to use the baud rate 500 kBd. The slowest
RX block assigned to this CAN controller is sampled every 10 ms. At the
specified baud rate, a maximum of about 46 CAN messages (STD format)
might be received during two consecutive sample steps. To ensure that no
CAN message is lost, set the queue size to 46.

Triggering an interrupt when a message is received via RX service You


can let an interrupt be triggered when a message is received via RX service.

Note

You cannot let an interrupt be triggered when a message with a specific ID


is received. An interrupt is triggered each time a message is received via
RX service.

You can define the interrupt on the Unit Page (RTI CAN Interrupt) ( RTI
CAN Blockset Reference).

Precondition for gatewaying messages Enabling the RX service is a


precondition for gatewaying messages between CAN controllers.
Refer to Gatewaying Messages Between CAN Buses ( RTI CAN Blockset
Reference).

Precondition for the TX loop back feature RX service allows you to use
the TX loop back feature. The feature lets you observe whether message transfer
over the bus was successful.
You can enable TX loop back on the Options Page (RTICAN Transmit (TX))
( RTI CAN Blockset Reference).

Enabling RX service support You have to enable RX service support for each CAN controller and for each RX
block.

RTI support § For a CAN controller, you enable the RX service on the RX Service page of the
RTICAN CONTROLLER SETUP block. Refer to RX Service Page (RTICAN
CONTROLLER SETUP) ( RTI CAN Blockset Reference).
§ For an RX block, you enable the RX service on the Options page of the
RTICAN Receive (RX) block of the RTICAN CONTROLLER. Refer to Options
Page (RTICAN Receive (RX)) ( RTI CAN Blockset Reference).

355
May 2018 MicroAutoBox Features
CAN Support

Related topics Basics

Gatewaying Messages Between CAN Buses ( RTI CAN Blockset Reference)

Removing a CAN Controller (Go Bus Off)

Introduction If you use several CAN controllers, you can remove the one currently in use from
the bus. Data transfer from the master to the slave processor is then stopped.
You can select the CAN controller you want to remove from the bus via the
RTICAN Go Bus Off block.

You can restart data transfer with another CAN controller or the same one with
the RTICAN Bus Off Recovery block.

RTI support § To remove a CAN controller from the bus, use the RTICAN Go Bus Off block.
Refer to RTICAN Go Bus Off ( RTI CAN Blockset Reference).
§ To restart data transfer, use the RTICAN Bus Off Recovery block. Refer to
RTICAN Bus Off Recovery ( RTI CAN Blockset Reference).

Related topics References

RTICAN Bus Off Recovery ( RTI CAN Blockset Reference)


RTICAN Go Bus Off ( RTI CAN Blockset Reference)

Getting CAN Status Information

Introduction You can use the Error Management Logic (EML) of a CAN controller to get error
and status information on the CAN bus and the controller. Errors occur, for
example, if a CAN controller fails to transmit a message successfully.

CAN controller status The controller’s EML has two counters: the Receive Error counter and the
information Transmit Error counter. According to their values, the EML can set the CAN
controller to one of the following states:

356
MicroAutoBox Features May 2018
Setting Up a CAN Controller

Counter Value Error State Description


Each counter value < 128 Error active The CAN controller is active. Before turning to the error passive state, the
controller sets an error warn (EWRN) bit if one of the counter values is ≥
96.
At least one counter Error passive The CAN controller is still active. The CAN controller can recover from this
value ≥ 128 state itself.
Transmit Error counter Bus off The CAN controller disconnects itself from the bus. To recover, an external
value ≥ 256 action is required (bus off recovery).

CAN bus status information You can get the following CAN bus status information:

Number of … Description
Stuff bit errors Each time more than 5 equal bits in a sequence occurred in a part of a received message
where this is not allowed, the appropriate counter is incremented.
Form errors Each time the format of a received message deviates from the fixed format, the
appropriate counter is incremented.
Acknowledge errors Each time a message sent by the CAN controller is not acknowledged, the appropriate
counter is incremented.
Bit 0 errors Each time the CAN controller tries to send a dominant bit level and a recessive bus level
is detected instead, the appropriate counter is incremented. During bus off recovery, the
counter is incremented each time a sequence of 11 recessive bits is detected. This
enables the controller to monitor the bus off recovery sequence, indicating that the bus
is not permanently disturbed.
Bit 1 errors Each time the CAN controller tries to send a recessive bit level and a dominant bus level
is detected instead, the appropriate counter is incremented.
Cyclic redundancy check Each time the CRC checksum of the received message is incorrect, the appropriate
(CRC) errors counter is incremented. The EML also checks the CRC checksum of each message (see
Message fields ( RTI CAN Blockset Reference)).
Lost RX messages Each time a message cannot be stored in the buffer of the CAN controller, the message
is lost and an RX lost error is detected.
Successfully received RX Each time an RX message is received successfully, the appropriate counter is
messages incremented.
Successfully sent TX Each time a TX message is sent successfully, the appropriate counter is incremented.
messages
(DS4302 only) Status of The error state of the fault tolerant receiver is reported.
fault tolerant receiver
(DS4302 only) Fault The value of the output is increased if a CAN bus events occurs.
tolerant transceiver

RTI support To get status information, use the RTICAN Status block. Refer to RTICAN Status
( RTI CAN Blockset Reference).

357
May 2018 MicroAutoBox Features
CAN Support

Related topics References

CAN Service Functions ( MicroAutoBox RTLib Reference)


RTICAN Status ( RTI CAN Blockset Reference)

CAN Partial Networking

Introduction Principle of partial networking With CAN partial networking, selected


ECUs in a network can be set to sleep mode or shut down if they do not have to
run continuously. Wake‑up messages then activate specific ECUs as and when
required, and for as long as required.

Supported dSPACE real-time hardware Partial networking is possible for


the following dSPACE real-time hardware only:
§ MicroAutoBox equipped with the DS1513 I/O board
§ MicroLabBox

Specifying wake‑up messages The RTI CAN Blockset lets you specify the
CAN partial networking wake‑up messages by filtering message IDs and message
data:
§ Filtering message IDs: You can define a message filter to select the messages
to use as wake‑up messages. The filter uses a bitmask which represents the
message. A message passes the filter and is used as wake‑up message only if it
matches the bitmask.
§ Filtering message data: You can mask the data bytes of incoming wake‑up
messages to determine whether they are valid wake‑up messages.

Switching the CAN transceiver to sleep mode The CAN transceiver of the
dSPACE real-time hardware is switched to sleep mode via the real‑time
application.

Tip

(MicroAutoBox only) You can stop and power down the MicroAutoBox with
the DS1401_POWER_DOWN block from the DS1401 MicroAutoBox Base
Board II library. To set MicroAutoBox to sleep mode, KL15 must be
disconnected from the power supply. For further information, refer to
DS1401_POWER_DOWN ( MicroAutoBox RTI Reference).
This is not possible for MicroLabBox.

Waking up dSPACE real-time hardware You can use partial networking


messages to wake up dSPACE real-time hardware after its CAN transceiver is
switched to sleep mode.

358
MicroAutoBox Features May 2018
Setting Up a CAN Controller

§ (Relevant for MicroAutoBox only) If MicroAutoBox's CAN transceiver is woken


up via a partial networking message, MicroAutoBox behaves as if it was
powered up manually. Depending on where the real‑time application is loaded
(flash memory or RAM), MicroAutoBox starts the application or waits for
further input.
§ (Relevant for MicroLabBox only) Unlike MicroAutoBox, MicroLabBox cannot be
powered down and then woken up via partial networking messages. However,
the CAN transceiver of MicroLabBox can be set to sleep mode, and then
woken up via partial networking messages later on.

RTI support Refer to Partial Networking Page (RTICAN CONTROLLER SETUP)


( RTI CAN Blockset Reference).

359
May 2018 MicroAutoBox Features
CAN Support

Using the RTI CAN MultiMessage Blockset


Introduction The RTI CAN MultiMessage Blockset is a Simulink blockset for efficient and
dynamic handling of complex CAN setups in hardware-in-the-loop (HIL)
applications.

Where to go from here Information in this section

Basics on the RTI CAN MultiMessage Blockset ..................................... 360


Gives you an overview of the features of the RTI CAN MultiMessage
Blockset.

Basics on Working with CAN FD .......................................................... 365


Using the CAN FD protocol allows data rates higher than 1 Mbit/s and
payloads longer than 8 bytes per message.

Basics on Working with a J1939-Compliant DBC File ........................... 370


J1939 is a vehicle CAN bus standard defined by the Society of
Automotive Engineers (SAE). It is used for communication in heavy-duty
vehicles, for example, for communication between a tractor and its
trailer.

Transmitting and Receiving CAN Messages .......................................... 376


Large CAN message bundles can be managed by a single Simulink block
provided by the RTI CAN MultiMessage Blockset.

Manipulating Signals to be Transmitted ............................................... 379


You can analyze signals of RX messages or change the values of signals
of TX messages in the experiment software.

Basics on the RTI CAN MultiMessage Blockset

Introduction The RTI CAN MultiMessage Blockset is a Simulink blockset for efficient and
dynamic handling of complex CAN setups in hardware-in-the-loop (HIL)
applications. All the incoming RX messages and outgoing TX messages of an
entire CAN controller can be controlled by a single Simulink block. CAN
communication is configured via database files (DBC file format, FIBEX file
format, MAT file format, or AUTOSAR XML file format).

Where to go from here Information in this topic

Supporting dSPACE platforms ............................................................................................... 361


Managing large CAN message bundles ................................................................................. 361

360
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Support of CAN FD protocol ................................................................................................. 361


Manipulating signals to be transmitted ................................................................................. 362
Updating a model ................................................................................................................. 362
Modifying model parameters during run time ....................................................................... 362
User‑defined variables ........................................................................................................... 362
Working with variants of CAN communication ..................................................................... 362
Gatewaying messages between CAN buses .......................................................................... 363
Online modification of gateway exclude list .......................................................................... 363
Dynamic message triggering ................................................................................................. 363
Defining free raw messages .................................................................................................. 363
Capturing messages ............................................................................................................. 363
CAN partial networking ........................................................................................................ 363
TRC file entries with initial data ............................................................................................. 364
Visualization with the Bus Navigator ..................................................................................... 364
RTI CAN Blockset and RTI CAN MultiMessage Blockset ......................................................... 364
Further information on the RTI CAN MultiMessage Blockset .................................................. 365

Supporting dSPACE platforms The RTI CAN MultiMessage Blockset is supported by the following dSPACE
platforms:
§ SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus Module, DS6301
CAN/LIN Board, and/or DS6341 CAN Board
§ DS1103 PPC Controller Board
§ MicroAutoBox
§ MicroLabBox
§ PHS-bus-based systems (DS1005, DS1006, or DS1007 modular systems)
containing one of the following I/O boards:
§ DS2202 HIL I/O Board
§ DS2210 HIL I/O Board
§ DS2211 HIL I/O Board
§ DS4302 CAN Interface Board
§ DS4505 Interface Board, if the DS4505 is equipped with DS4342 CAN FD
Interface Modules

The dSPACE platforms provide 1 ... 4 CAN controllers. A CAN controller performs
serial communication according to the CAN protocol. To use a dSPACE board
with CAN bus interface, you must configure the CAN controller – called the CAN
channel – according to the application.

Managing large CAN message With the RTI CAN MultiMessage Blockset, you can configure and control a large
bundles number of CAN messages (more than 200) from a single Simulink block. This
reduces the size of model files and the time required for the build process.

Support of CAN FD protocol The RTI CAN MultiMessage Blockset supports the classic CAN protocol, the
non‑ISO CAN FD protocol (which is the original CAN FD protocol from Bosch)
and the ISO CAN FD protocol (according to the ISO 11898‑1:2015 standard). The
CAN FD protocols allow data rates higher than 1 Mbit/s and payloads of up to
64 bytes per message.

361
May 2018 MicroAutoBox Features
CAN Support

Keep in mind that the CAN FD protocols are supported only by


dSPACE platforms equipped with a CAN FD-capable CAN controller.

For further information, refer to Basics on Working with CAN FD on page 365.

Manipulating signals to be The RTI CAN MultiMessage Blockset provides several options to manipulate the
transmitted values of signals before they are transmitted. You can switch between them with
the Bus Navigator in ControlDesk via entries in the generated TRC file. In
addition, you can calculate checksum, parity, toggle, counter, and mode counter
values.

Updating a model The RTI CAN MultiMessage Blockset creates an S-function for the specified
database file. You can easily update the CAN configuration of a model by
replacing the database file and updating the S‑function.

Tip

You do not have to recreate the S-function for the RTI CAN MultiMessage
Blockset if you switch from one processor board to another, e.g., from a
DS1005 to a DS1007, and vice versa.

When you switch to or from a DS1103, MicroAutoBox, or MicroLabBox, you


only have to recreate the ControllerSetup block. You also have to recreate
the ControllerSetup block if you change the controller name.

Modifying model parameters Model parameters such as messages or signal values can be modified during run
during run time time either via model input or via the Bus Navigator in ControlDesk. For
modifying model parameters via ControlDesk, a variable description file (TRC) is
automatically generated each time you create an S-function for the RTICANMM
MainBlock. The entries of the TRC file let you analyze received signals, change
the values of signals to be transmitted, etc. In ControlDesk, you can access the
settings specified in the TRC file via the model's system description file (SDF). The
SDF file bundles all the TRC files and additional information for the application.

(Relevant only for SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus
Module, DS6301 CAN/LIN Board, and/or DS6341 CAN Board) For information on
where to find the signals of the CAN bus in the TRC file, refer to Available TRC
File Variable Entries and Their Locations in the TRC File ( ConfigurationDesk
Real-Time Implementation Guide).

User‑defined variables You can include user‑defined variables in a TRC file in addition to the parameters
of the RTI CAN MultiMessage Blockset.

Working with variants of CAN You can work with different CAN communication variants on one CAN
communication controller, and switch between them during run time. Only one variant for each

362
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

CAN controller can be active at a time. In the Bus Navigator, the active variant
is labeled when an application is running on the real-time hardware. An
inactive variant is labeled . If you open layouts of an inactive variant, the
headers of all the RX and TX layouts are red.

Gatewaying messages You can easily exchange messages between different CAN buses. In addition,
between CAN buses you can use the gatewaying feature to modify messages in gateway mode
during run time.

Online modification of You can modify the exclude list of RTICANMM Gateways during run time, i.e.,
gateway exclude list specify messages not to be gatewayed.

Dynamic message triggering You can modify the cycle times and initiate a spontaneous transmission
(interactive or model-based) during run time.

Defining free raw messages You can define free raw messages as additional messages that are independent
of the database file. Once they are defined, you can use them like standard
database messages and specify various options, for example:
§ Trigger options
§ Ports and displays
§ Message ID and length adjustable during run time

The following features are not supported:


§ Checksum generation
§ Custom signal manipulation

Capturing messages You can process the raw data of messages whose IDs match a given filter via the
capture messages feature. This can be a specific ID, a range of IDs, or even all
IDs. Optionally, you can exclude the messages contained in the database file.

The captured messages can be made available as outports of the MainBlock or in


the TRC file.

CAN partial networking With CAN partial networking, you can set selected ECUs in a network to sleep
mode or shut them down if they do not have to run continuously. Wake‑up
messages then activate specific ECUs as and when required, and for as long as
required.

363
May 2018 MicroAutoBox Features
CAN Support

Note

Partial networking is possible for the following dSPACE real-time hardware:


§ MicroAutoBox II equipped with the DS1513 I/O Board
§ MicroLabBox
§ dSPACE hardware that supports working with CAN FD messages and that
is equipped with DS4342 CAN FD Interface Modules, such as:
§ PHS-bus-based systems (DS1005, DS1006, or DS1007 modular systems)
with DS4505 Interface Board
§ MicroAutoBox II variants with DS1507
§ MicroAutoBox II variants with DS1512
§ MicroAutoBox II variants with DS1514

The RTI CAN MultiMessage Blockset lets you specify the CAN partial networking
wake‑up messages by filtering message IDs and message data.

The CAN transceiver of the dSPACE real-time hardware is switched to sleep


mode via the real‑time application. You can use partial networking messages to
wake up dSPACE real-time hardware after its CAN transceiver is switched to
sleep mode.

(Relevant for MicroAutoBox only) If MicroAutoBox's CAN transceiver is woken up


via a partial networking message, MicroAutoBox behaves as if it was powered up
manually. Depending on where the real‑time application is loaded (flash memory
or RAM), MicroAutoBox starts the application or waits for further input.

For further information, refer to Partial Networking Page (RTICANMM


ControllerSetup) ( RTI CAN MultiMessage Blockset Reference).

TRC file entries with initial TRC/SDF files generated for Simulink models including blocks from the RTI CAN
data MultiMessage Blockset contain initial data. The RTI CAN MultiMessage Blockset
supplies all variables with initial values when they are included in the TRC file.
TRC files with initial data lets you to perform offline calibration with
ControlDesk.

Visualization with the Bus The RTI CAN MultiMessage Blockset supports visualization with the Bus
Navigator Navigator. Layouts/instruments are generated on demand and provide access to
all CAN signals and all switches required to configure CAN communication
during run time. You do not have to preconfigure layouts by hand.

RTI CAN Blockset and RTI CAN (Not relevant for SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus
MultiMessage Blockset Module, DS6301 CAN/LIN Board, and/or DS6341 CAN Board) You can use the
RTI CAN Blockset and the RTI CAN MultiMessage Blockset in parallel for different
CAN controllers. However, you cannot use the RTI CAN MultiMessage Blockset
and the RTI CAN Blockset for the same CAN controller.

364
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Further information on the The following documents provide further information on the RTI CAN
RTI CAN MultiMessage MultiMessage Blockset:
Blockset § RTI CAN MultiMessage Blockset Reference
This RTI reference provides a full description of the RTI CAN MultiMessage
Blockset.
§ RTI CAN MultiMessage Blockset Tutorial
This tutorial guides you through your first steps with the RTI CAN
MultiMessage Blockset.

Basics on Working with CAN FD

Introduction Using the CAN FD protocol allows data rates higher than 1 Mbit/s and payloads
longer than 8 bytes per message.

Where to go from here Information in this topic

Basics on CAN FD ................................................................................................................. 365


CAN FD protocols ................................................................................................................. 366
CAN FD message characteristics ............................................................................................ 366
Activating CAN FD mode in the RTI CAN MultiMessage Blockset .......................................... 369
Supported database file types ............................................................................................... 369
Supported dSPACE platforms ................................................................................................ 369
Working with CAN messages and CAN FD messages ............................................................ 370

Basics on CAN FD CAN FD stands for CAN with Flexible Data Rate. The CAN FD protocol is based
on the CAN protocol as specified in ISO 11898‑1. Compared with the classic
CAN protocol, CAN FD comes with an increased bandwidth for the serial
communication. The improvement is based on two factors:
§ The CAN FD protocol allows you to use CAN messages with longer data fields
(up to 64 bytes).
§ The CAN FD protocol allows you to use a higher bit rate (typically higher by a
factor of 8). It is possible to switch inside the message to the faster bit rate.

Arbitration phase and data phase CAN FD messages consist of two


phases: a data phase and an arbitration phase. The data phase spans the phase
where the data bits, CRC and length information are transferred. The rest of the
frame, outside the data phase, is the arbitration phase. The data phase can be
configured to have a higher bit rate than the arbitration phase.
CAN FD still uses the CAN bus arbitration method. During the arbitration
process, the standard data rate is used. After CAN bus arbitration is decided, the
data rate can be increased. The data bits are transferred with the preconfigured
higher bit rate. At the end of the data phase, CAN FD returns to the standard
data rate.

365
May 2018 MicroAutoBox Features
CAN Support

The following illustration shows a classic CAN message, a CAN FD message using
a higher bit rate during the data phase, and a CAN FD message with longer
payload using a higher bit rate. You can see the implications of the CAN FD
features: The arbitration phases are identical in all cases, because the standard
bit rate is always used. The lengths of the data phases differ depending on the
payload length and bit rate used.

Classic CAN message

Arbitration Data phase Arbitration


phase phase

CAN FD message using a higher bit rate

Arbitration Arbitration
phase Data phase phase

CAN FD message with longer payload using a higher bit rate

Arbitration Data phase .................... Arbitration


phase phase

CAN FD protocols Currently, there are two CAN FD protocols on the market, which are not
compatible with each other.
§ The non‑ISO CAN FD protocol represents the original CAN FD protocol from
Bosch.
§ The ISO CAN FD protocol represents the CAN FD protocol according to the
ISO 11898‑1:2015 standard.

Compared to the non‑ISO CAN FD protocol, the ISO CAN FD protocol comes
with an improved failure detection capability.

The RTI CAN MultiMessage Blockset supports both CAN FD protocols.

CAN FD message In principle, CAN FD messages and CAN messages consist of the same elements
characteristics and have the same message structure.

366
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

For an overview of the fields of a CAN FD message and the message


components for each of the two CAN FD protocols, refer to the following
illustration:

§ Non‑ISO CAN FD protocol:


End of
Frame
Start of Interframe
Frame Arbitration Control Data CRC ACK Space
Field Field Field Field Field

ACK delimiter
CRC delimiter
SOF Identifier r1 IDE EDL r0 BRS ESI DLC Data CRC ACK EOF IFS

Arbitration phase Data phase Arbitration phase


(standard bit rate) (optional high bit rate) (standard bit rate)

§ ISO CAN FD protocol:


End of
Frame
Start of Interframe
Frame Arbitration Control Data CRC ACK Space
Field Field Field Field Field

ACK delimiter
CRC delimiter
SOF Identifier RRS IDE FDF res BRS ESI DLC Data Stuff CRC ACK EOF IFS
count

Arbitration phase Data phase Arbitration phase


(standard bit rate) (optional high bit rate) (standard bit rate)

There are some differences between CAN FD messages and CAN messages:
§ The Data field and the CRC field of CAN FD messages can be longer. The
maximum payload length of a CAN FD message is 64 bytes.
§ The Control fields are different:
§ A classic CAN message always has a dominant (= 0) reserved bit
immediately before the data length code.
In a CAN FD message, this bit is always transmitted with a recessive level
(= 1) and is called EDL (Extended Data Length) or FDF (FD Format),
depending on the CAN FD protocol you are working with. So CAN
messages and CAN FD messages are always distinguishable by looking at
the EDL/FDF bit. A recessive EDL/FDF bit indicates a CAN FD message, a
dominant EDL/FDF bit indicates a CAN message.

367
May 2018 MicroAutoBox Features
CAN Support

In CAN FD messages, the EDL/FDF bit is always followed by a dominant


reserved bit (r0/res), which is reserved for future use.
§ A CAN FD message has the additional BRS (Bit Rate Switching) bit, which
allows you to switch the bit rate for the data phase. A recessive BRS bit
switches from the standard bit rate to the preconfigured alternate bit rate. A
dominant BRS bit means that the bit rate is not switched and the standard
bit rate is used.
§ A CAN FD message has the additional ESI (Error State Indicator) bit. The ESI
bit is used to identify the error status of a CAN FD node. A recessive ESI bit
indicates a transmitting node in the 'error active' state. A dominant ESI bit
indicates a transmitting node in the 'error passive' state.
§ Since CAN FD messages can contain up to 64 data bytes, the coding of the
DLC (data length code) has been expanded. The following table shows the
possible data field lengths of CAN FD messages and the corresponding DLC
values.

DLC Number of Data Bytes


0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 12
1010 16
1011 20
1100 24
1101 32
1110 48
1111 64
If necessary, padding bytes are used to fill the data field of a CAN FD message
to the next greater possible DLC value.
For classic CAN messages, the DLC values 1000 ... 1111 are interpreted as
8 data bytes.
§ (Valid for the ISO CAN FD protocol only) The CRC fields are different:
§ The CRC field of a CAN FD message was extended by a stuff count before
the actual CRC sequence. The stuff count consists of a 3‑bit stuff bit counter
(reflects the number of the data‑dependent dynamic stuff bits (modulo 8)),
and an additional parity bit to secure the counter.
§ The start value for the CRC calculation was changed from '0...0' to '10...0'.

368
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Activating CAN FD mode in To ensure that CAN FD messages are properly transmitted and received during
the RTI CAN MultiMessage run time, the CAN FD mode must be enabled at two places in the RTI CAN
Blockset MultiMessage Blockset: in the MainBlock and at the CAN controller selected in
the MainBlock. To do so, perform the following steps:
§ In the ControllerSetup block, select the CAN FD protocol to be used. Refer to
Setup Page (RTICANMM ControllerSetup) ( RTI CAN MultiMessage Blockset
Reference).
§ In the MainBlock, select the CAN FD support checkbox. Refer to General
Settings Page (RTICANMM MainBlock) ( RTI CAN MultiMessage Blockset
Reference).

To monitor CAN FD messages, it is sufficient to enable CAN FD support in the


ControllerSetup block.

Supported database file types To work with CAN FD messages, you need a suitable database file containing
descriptions in the CAN FD format. The RTI CAN MultiMessage Blockset supports
CAN FD for the following database file types:
§ DBC file
§ AUTOSAR system description file

Supported dSPACE platforms The RTI CAN MultiMessage Blockset supports working with CAN FD messages
for the following dSPACE hardware:
§ SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus Module, DS6301
CAN/LIN Board, or DS6341 CAN Board
§ The following dSPACE platforms if they are equipped with DS4342 CAN FD
Interface Modules:
§ DS1005 modular system with DS4505 Interface Board
§ DS1006 modular system with DS4505 Interface Board
§ DS1007 modular system with DS4505 Interface Board
§ MicroAutoBox II in the following variants:
§ 1401/1505/1507
§ 1401/1507
§ 1401/1511/1512
§ 1401/1511/1514
§ 1401/1512/1513
§ 1401/1513/1514

When you connect a DS4342 CAN FD Module to a CAN bus, you must note
some specific aspects (such as bus termination and using feed‑through bus lines).
For further information, refer to:
§ PHS-bus-based system with DS4505: DS4342 Connections in Different
Topologies ( PHS Bus System Hardware Reference)
§ MicroAutoBox: DS4342 Connections in Different Topologies ( MicroAutoBox
II Hardware Installation and Configuration)

369
May 2018 MicroAutoBox Features
CAN Support

Working with CAN messages Both messages in CAN format and in CAN FD format can be transmitted and
and CAN FD messages received via the same network.

Related topics References

Setup Page (RTICANMM ControllerSetup) ( RTI CAN MultiMessage Blockset


Reference)

Basics on Working with a J1939-Compliant DBC File

Introduction J1939 is a vehicle CAN bus standard defined by the Society of Automotive
Engineers (SAE). It is used for communication in heavy-duty vehicles, for
example, for communication between a tractor and its trailer.

The RTI CAN MultiMessage Blockset supports you in working with J1939-
compliant DBC files.

Broadcast and peer‑to‑peer CAN message identifier for J1939 Standard CAN messages use an 11-bit
communication message identifier (CAN 2.0 A). J1939 messages use an extended 29-bit
message identifier (CAN 2.0 B).
The 29-bit message identifier is split into different parts (according to SAE
J1939/21 Data Link Layer):

Reserved Data page


1 bit 1 bit

Priority PGN Source address


PDU_F PDU_S
3 bits 8 bits 8 bits 8 bits

29-bit CAN message ID

§ The 3-bit priority is used during the arbitration process. A value of 0 represents
the highest priority, a value of 7 represents the lowest priority.
§ The 1-bit reserved is reserved for future purposes.
§ The 1-bit data page is a selector for the PDU_F in the PGN. It can be taken as
an extension of the PGN. The RTI CAN MultiMessage Blockset uses the data
page bit in this way.
§ The 16-bit PGN is the parameter group number. It is described in this section.
§ The 8-bit source address is the address of the transmitting network node.

Parameter group number (PGN) A 16-bit number in the 29-bit message


identifier of a CAN message defined in a J1939-compliant DBC file. Each PGN
references a parameter group that groups parameters and assigns them to the 8-

370
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

byte data field of the message. A parameter group can be the engine
temperature including the engine coolant temperature, the fuel temperature,
etc. PGNs and parameter groups are defined by the SAE (see SAE J1939/71
Vehicle Application Layer).
The first 8 bits of the PGN represent the PDU_F (Protocol Data Unit format). The
PDU_F value specifies the communication mode of the message (peer-to-peer or
broadcast). The interpretation of the PDU_S value (PDU-specific) depends on the
PDU_F value. For messages with a PDU_F < 240 (peer-to-peer communication,
also called PDU1 messages), PDU_S is not relevant for the PGN, but contains the
destination address of the network node that receives the message. For
messages with a PDU_F ≥ 240 (broadcast messages, also called PDU2 messages),
PDU_S specifies the second 8 bits of the PGN and represents the group
extension. A group extension is used to increase the number of messages that
can be broadcast in the network.

PDU_F (first 8 bits) PDU_S (second 8 bits) Communication Mode


< 240 Destination address Peer-to-peer (message is transmitted to one destination network
node)
≥ 240 Group extension Broadcast (message is transmitted to any network node connected
to the network)

Message attributes in J1939- A message described in a J1939-compliant DBC file is described by the ID
compliant DBC files attribute and others.

DBC files created with CANalyzer 5.1 or earlier In a DBC file created with
CANalyzer 5.1 or earlier, the ID attribute describing a message actually is the
message PGN. Thus, the ID provides no information on the source and
destination of the message. The source and destination can be specified by the
J1939PGSrc and J1939PGDest attributes.

DBC files created with CANalyzer 5.2 or later In a DBC file created with
CANalyzer 5.2 or later, the ID attribute describing a message actually is the CAN
message ID, which consists of the priority, PGN, and source address. Thus, the ID
provides information on the source and destination of the message. Further
senders can be specified for a message in Vector Informatik’s CANdb++ Editor
(_BO_TX_BU attribute). When a DBC file is read in, RTICANMM automatically
creates new instances of the message for its other senders.

Source/destination mapping Messages in a J1939-compliant DBC file that are described only by the PGN have
no source/destination mapping. Messages that are described by the CAN
message ID (consisting of the priority, PGN, and source address) have
source/destination mapping.

371
May 2018 MicroAutoBox Features
CAN Support

Tip

The RTI CAN MultiMessage Blockset lets you specify source/destination


mapping for messages that are described only by the PGN. The mapping
can be specified in the RTICANMM MainBlock or in the DBC file using the
J1939Mapping attribute.

Container and instance The RTI CAN MultiMessage Blockset distinguishes between container and
messages instance messages when you work with a J1939-compliant DBC file:

Container message A J1939 message defined by its PGN (and Data Page
bit). A container can receive all the messages with its PGN in general. If several
messages are received in one sampling step, only the last received message is
held in the container. Container messages can be useful, for example, when you
configure a gateway with message manipulation.

Instance message A J1939 message defined by its PGN (and Data Page bit),
for which the source (transmitting) network node and the destination (receiving)
network node (only for peer-to-peer communication) are defined.

Note

The RTI CAN MultiMessage Blockset only imports instances for which valid
source node and destination node specifications are defined in the DBC file.
In contrast to instances, containers are imported regardless of whether or
not valid source node and destination node specifications are known for
them during the import. This lets you configure instances in the RTI CAN
MultiMessage Blockset.

There is one container for each PGN (except for proprietary PGNs). If you work
with DBC files created with CANalyzer 5.1 or earlier, the container can be clearly
derived from the DBC file according to its name. With DBC files created with
CANalyzer 5.2 or later, several messages with the same PGN might be defined. In
this case, either the message with the shortest name or an additionally created
message (named CONT_<shortest_message_name>) is used as the container
for the PGN. The RTI CAN MultiMessage Blockset lets you specify the container
type in the RTICANMM MainBlock. If several messages fulfill the condition of the
shortest name, the one that is listed first in the DBC file is used. For messages
with proprietary PGNs, each message is its own container (because proprietary
PGNs can have different contents according to their source and destination
nodes).

Network management The J1939 CAN standard defines a multimaster communication system with
decentralized network management. J1939 network management defines the
automatic assignment of network node addresses via address claiming, and
provides identification for each network node and its primary function.

Each network node must hold exactly one 64‑bit name and one associated
address for identification.

372
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Address The 8-bit network node address defines the source or destination
for J1939 messages in the network. The address of a network node must be
unique. If there is an address conflict, the network nodes try to perform dynamic
network node addressing (address claiming) to ensure unique addresses, if this is
enabled for the network nodes.
The J1939 standard reserves the following addresses:
§ Address 0xFE (254) is reserved as the 'null address' that is used as the source
address by network nodes that have not yet claimed an address or have failed
to claim an address.
§ Address 0xFF (255) is reserved as the 'global address' and is exclusively used as
a destination address in order to support message broadcasting (for example,
for address claims).
The RTI CAN MultiMessage Blockset does not allow J1939 messages to be sent
from the null or global addresses.

Note

The RTI CAN MultiMessage Blockset interprets attributes in the DBC file like
this:
§ In a DBC file created with CANalyzer 5.1 or earlier, the name network
node attributes and the J1939PGSrc and J1939PGDest message attributes
are read in. The J1939PGSrc attribute is interpreted as the address of the
node that sends the message, the J1939PGDest attribute is interpreted as
the address of the node that receives the message.
§ In a DBC file created with CANalyzer 5.2 or later, the name and
NMStationAddress network node attributes are read in. The
NMStationAddress attribute is interpreted as the network node address.

Name The J1939 standard defines a 64-bit name to identify each network
node. The name indicates the main function of the network node with the
associated address and provides information on the manufacturer.

Arbitrary Industry Vehicle Vehicle Reserved Function Function ECU Manufacturer Identity
Address Group System System Instance Instance Code Number
Capable Instance

1 bit 3 bit 4 bit 7 bit 1 bit 8 bit 5 bit 3 bit 11 bit 21 bit

Address claiming The J1939 standard defines an address claiming process in


which addresses are autonomously assigned to network nodes during network
initialization. The process ensures that each address is unique.
Each network node sends an address claim to the CAN bus. The nodes receiving
an address claim verify the claimed address. If there is an address conflict, the
network node with the lowest 64‑bit name value (highest priority) gets the
claimed address. The other network nodes must claim different addresses.
The following illustration shows the address claiming process with two network
nodes claiming the same address. Network node A has a 64‑bit name of higher
priority.

373
May 2018 MicroAutoBox Features
CAN Support

Network node A Network node B (self-configurable)

Initialization
(POST)

Addr
Sour ess c
ce addr laim
ess = Initialization
X, Na (POST)
me =A

laim
ess c me =
B
Addr
s = X, Na
e s
addr
S ource

Addr
Sour ess c
ce ad laim
dress
= X,
Nam
e =A

laim
ess c e=B
Addr , Nam
= Y
ess
addr
S ource

t t
The following steps are performed in the address claiming procedure:
§ Node A starts initialization and the power‑on self‑test (POST).
§ While node B performs initialization and POST, node A sends its address claim
message.
§ After performing initialization and POST, node B sends its address claim
message, trying to claim the same source address as node A.
§ In response to the address claim message of node B, the 64‑bit names of the
network nodes are compared. Because the name of network node A has a
higher priority, network node A succeeds and can use the claimed address.
Node A sends its address claim message again.
§ Network node B receives the address claim message and determines that node
A’s name has higher priority. Node B claims a different address by sending
another address claim message.

The RTI CAN MultiMessage Blockset supports J1939 network management


including address claiming for self‑configurable address network nodes. This
allows network nodes simulated by the RTI CAN MultiMessage Blockset to
change their addresses, if necessary, and to update their internal address
assignments if addresses of external network nodes are changed.

374
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Note

The RTI CAN MultiMessage Blockset supports network management only


for network nodes for which network addresses are contained in the DBC
file and that have unique 64‑bit name identifiers. The node configuration is
taken directly from the DBC file and can be adapted on the RTI CAN
MultiMessage Blockset dialog pages.

Messages > 8 bytes (message Standard CAN messages have a data field of variable length (0 ... 8 bytes). The
packaging) J1939 protocol defines transport protocol functions which allow the transfer of
up to 1785 bytes in one message.

A multipacket message contains up to 255 data fields, each of which has a


length of 8 bytes. Each data field is addressed by the 1-byte sequence number,
and contains 7 bytes of data. This yields a maximum of 1785 (= 255 · 7) bytes in
one message.

Sequence Data Sequence Data Sequence Data


number 1 number 2 ... number n
Byte 1 Byte 2 ... 8 Byte 1 Byte 2 ... 8 Byte 1 Byte 2 ... 8

Data field 1 Data field 2 Data field n

Broadcasting multipacket messages via BAM To broadcast a multipacket


message, the sending network node first sends a Broadcast Announce Message
(BAM). It contains the PGN and size of the multipacket message, and the
number of packages. The BAM allows all receiving network nodes to prepare for
the reception. The sender then starts the actual data transfer.

Peer-to-peer communication of multipacket messages via RTS/CTS To


transfer a multipacket message to a specific destination in the network, the
sending network node sends a request to send (RTS). The receiving network
node responds with either a clear to send (CTS) message or a connection abort
message if the connection cannot be established. When the sending network
node receives the CTS message, it starts the actual data transfer.

The RTI CAN MultiMessage Blockset supports J1939 message packaging via BAM
and RTS/CTS.

Related topics Basics

Lesson 13 (Advanced): Working with a J1939-Compliant DBC File ( RTI CAN


MultiMessage Blockset Tutorial)

375
May 2018 MicroAutoBox Features
CAN Support

Transmitting and Receiving CAN Messages

Introduction Large CAN message bundles (> 200 messages) can be managed by a single
Simulink block provided by the RTI CAN MultiMessage Blockset.

Defining CAN communication To define the CAN communication of a CAN controller, you can specify a DBC,
MAT, FIBEX, or AUTOSAR system description file as the database file on the
General Settings Page (RTICANMM MainBlock) ( RTI CAN MultiMessage
Blockset Reference). You can also define CAN communication without using a
database file.

DBC file as the database The Data Base Container (DBC) file format was
developed by Vector Informatik GmbH, Stuttgart, Germany. For the RTI CAN
MultiMessage Blockset, you can use all the DBC files that pass the consistency
check of Vector Informatik’s CANdb++ Editor.

FIBEX file as the database The Field Bus Exchange (FIBEX) format is an XML
exchange file format. It is used for data exchange between different tools that
work with message-oriented bus communication. A FIBEX file usually describes
more than one bus system. You therefore have to select one of the available bus
systems if you work with a FIBEX file as the database.

AUTOSAR system description file as the database You can use an


AUTOSAR system description file as the database for CAN communication.
AUTOSAR (AUTomotive Open System ARchitecture) is an industry partnership
that aims to develop and establish an open standard for automotive
electric/electronic (E/E) architectures.
AUTOSAR system description files are files of AUTOSAR XML file type that
describe a system according to AUTOSAR. A system is a combination of a
hardware topology, a software architecture, a network communication, and
information on the mappings between these elements. AUTOSAR system
description files are instances of the AUTOSAR System Template.
An AUTOSAR system description file usually describes more than one bus system.
You therefore have to select one of the available bus systems if you work with an
AUTOSAR XML file as the database.

MAT file as the database You can also use the MAT file format as the
database for CAN communication, or specify other database file formats as the
database. You must convert your specific database files into the MAT file format
for this purpose. Because the MAT file requires a particular structure, it must be
generated by M‑script.

Working without a database file If you want to work without a database


file, you can use free raw messages and/or capture messages. These messages
are independent of DBC and MAT files.

376
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Changing database defaults When you work with a database file, you can
change its default settings via the following dialog pages of the RTICANMM
MainBlock:
§ Cycle Time Defaults Page (RTICANMM MainBlock)
§ Base/Update Time Page (RTICANMM MainBlock)
§ TX Message Length Page (RTICANMM MainBlock)
§ Message Defaults Page (RTICANMM MainBlock)
§ Signal Defaults Page (RTICANMM MainBlock)
§ Signal Ranges Page (RTICANMM MainBlock)
§ Signal Errors Page (RTICANMM MainBlock)

Defining RX messages and TX You can receive and/or transmit each message defined in the database file that
messages you specify for CAN communication.

Defining RX messages You can define RX messages on the RX Messages


Page (RTICANMM MainBlock).

Defining TX messages You can define TX messages on the TX Messages


Page (RTICANMM MainBlock).

Triggering TX message You can specify different options to trigger the transmission of TX messages. For
transmission example, message transmission can be triggered cyclically or by an event.

For details, refer to Triggering Options Page (RTICANMM MainBlock) ( RTI


CAN MultiMessage Blockset Reference).

Triggering reactions to the You can specify the reactions to receiving a specific RX message. One example of
reception of RX messages a reaction is the immediate transmission of a TX message.

For details, refer to Raw Data Page (RTICANMM MainBlock) ( RTI CAN
MultiMessage Blockset Reference).

Working with raw data The RTI CAN MultiMessage Blockset lets you to work with the raw data of
messages. You have to select the messages for this purpose. The RTICANMM
MainBlock then provides the raw data of these messages to the model byte‑wise
for further manipulation. You can easily access the raw data of RX messages via
a Simulink Bus Selector block.

For details, refer to Raw Data Page (RTICANMM MainBlock) ( RTI CAN
MultiMessage Blockset Reference).

Implementing checksum You can implement checksum algorithms for the checksum calculation of
algorithms TX messages and checksum verification of RX messages.

377
May 2018 MicroAutoBox Features
CAN Support

Checksum header file You have to specify the checksum algorithms in a


checksum header file. This needs to have a C-coded switch-case directive to
switch between algorithms.

Checksum calculation for TX messages You can assign a checksum


algorithm to each TX message. A checksum is calculated according to the
algorithm and assigned to the TX message. Then the message is transmitted
together with the calculated checksum.

Checksum check for RX messages You can assign a checksum algorithm to


each RX message. A checksum is calculated for the message and compared to
the checksum in the received message. If they differ, this is indicated at the error
ports for RX messages if these ports are enabled.

Checksum algorithms based on end‑to‑end communication


protection The RTI CAN MultiMessage Blockset supports run‑time access to
E2E protection parameters from AUTOSAR communication matrices and DBC
files. This means that you can implement checksum algorithms based on
end‑to‑end communication (E2E protection) parameters. E2E protection
checksum algorithms are implemented in the same checksum header file as the
checksum algorithms without E2E protection data.

For details, refer to Checksum Definition Page (RTICANMM MainBlock) ( RTI


CAN MultiMessage Blockset Reference).

Gatewaying messages Gatewaying means exchanging CAN messages between two CAN buses.
Gatewaying also applies to messages that are not specified in the database file.
You can also exclude individual messages specified in the database file from
being exchanged.

You can gateway CAN messages in two ways:

Controller gateway This is a gateway between two CAN controllers. The


gateway is between two RTICANMM ControllerSetup blocks and is
independent of the active CAN controller variant.

MainBlocks gateway This is a gateway between different variants of two


CAN controllers. The gateway is between two RTICANMM MainBlocks. The
MainBlocks gateway is active only if the variants of both CAN controllers are
active at the same time.
For details, refer to RTICANMM Gateway ( RTI CAN MultiMessage Blockset
Reference).

Related topics References

General Settings Page (RTICANMM MainBlock) ( RTI CAN MultiMessage


Blockset Reference)

378
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

Manipulating Signals to be Transmitted

Introduction All the signals of all the RX and TX messages (see Defining RX messages and TX
messages on page 377) automatically get corresponding entries in the generated
TRC file. This allows you to analyze them (signals of RX messages) or change
their values (signals of TX messages) with the Bus Navigator in ControlDesk.

Manipulating signals to be The RTI CAN MultiMessage Blockset provides several options to manipulate the
transmitted values of signals before they are transmitted. You can switch between the
options you have specified via entries in the generated TRC file.

The illustration below visualizes the options.

HF
2
HF
Gateway Gateway
Gateway signal switch
switch AND

HF
1
Model Switch
signal 0
NOT
1
Constant
Cyclic 2

5
Parity
6
NOT
7
Error value
8
Dynamic value
9

You can switch between these options in ControlDesk.

TX model signal A signal of a TX message whose value can be changed


from within the model. By default, the values of TX model signals cannot be
changed in ControlDesk. If you also want to manipulate TX model signals from
ControlDesk, you have to select them on the Input Manipulation Page
(RTICANMM MainBlock) ( RTI CAN MultiMessage Blockset Reference).
Because additional code has to be generated, TX model signals reduce
performance. For optimum performance, you should specify as few TX model
signals as possible.
You can specify TX model signals on the Model Signals (TX) Page (RTICANMM
MainBlock) ( RTI CAN MultiMessage Blockset Reference).

Gateway signal A signal to be manipulated before it is exchanged between


two CAN buses. Gateway signals have to be gatewayed via two RTICANMM
MainBlocks. You have to specify gateway signals for the receiving MainBlock.

379
May 2018 MicroAutoBox Features
CAN Support

Triggering
Triggering
to RTICANMM
MainBlock 1 RX Data MainBlock 2
TX Data Gateway

Gatewaying Main Block (CAN bus 1) Receiving Main Block (CAN bus 2)
MainBlock1 gateways messages and their signals to MainBlock2. Specifying
gateway signals for MainBlock2 adds a TX Data Gateway inport to it. The
specified gateway signals are transmitted via CAN bus 2 with the signal values
received from MainBlock1 when triggered by the messages received from
MainBlock1. You therefore have to specify triggered message transmission for
the messages of the gateway signals on the Message Cyclic Page (RTICANMM
MainBlock) ( RTI CAN MultiMessage Blockset Reference). In addition, you can
enable signal value switching for gateway signals during run time, for example,
to transmit the signal constant value instead of the gateway value.

Note

Implementing gateway signals at least doubles the number of block inports


and therefore reduces performance. If you want to exchange messages
between CAN controllers and do not want to perform signal manipulation,
you should use the RTICANMM Gateway block instead.

You can specify gateway signals on the pages located in the Gateway Page
(RTICANMM MainBlock) ( RTI CAN MultiMessage Blockset Reference).

Toggle signal A 1-bit signal that can be used, for example, to indicate
whether CAN messages are transmitted. If a CAN message is transmitted, the
toggle signal value alternates between 0 and 1. Otherwise, the toggle signal
value remains constant.
You can specify toggle signals on the Toggle Page (RTICANMM MainBlock)
( RTI CAN MultiMessage Blockset Reference).

Parity signal A signal that a parity bit is appended to. You can specify one or
more signals of a TX message as parity signals. A parity bit is calculated for the
specified signals according to whether even or odd parity is selected. The bit is
appended to the signal and the TX message is transmitted with the parity signal.
You can specify parity signals on the Parity Page (RTICANMM MainBlock) ( RTI
CAN MultiMessage Blockset Reference).

Counter signal A signal of a TX message that is used to check for correct


message transmission or to trigger the transmission of signals in a message.
§ Behavior of counter signals
The value of a counter signal changes with every message transmission. You
can specify the counter start, step, and stop values, etc. Each time the counter
reaches the stop value, it turns around to the counter start value.
§ Use of counter signals
You can specify counter signals to check for correct transmission of a message
or trigger the transmission of signals in a message.
§ Checking correct message transmission: The receiver of a message expects a
certain counter signal value. For example, if the transmission of a message

380
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset

was stopped for two transmissions, the expected counter signal value and
the real counter signal value can differ, which indicates an error. Counter
signals used in this way are often called alive counters.
§ Triggering the transmission of signals: You can trigger the transmission of
signals if you specify a mode signal as a counter signal. The signal value of
the mode signal triggers the transmission of mode-dependent signals.
Because the counter signal value changes with every message transmission,
this triggers the transmission of the mode-dependent signals. By using
counter signals in this way, you can work with signals which use the same
bytes of a message. Counter signals used in this way are often called mode
counters.
§ Using counter signals in ControlDesk
In ControlDesk, you can transmit the signal's constant, counter, or increment
counter value. The increment counter value is the counter value incremented
by the signal's constant value.
You can specify counter signals on the Counter Page (RTICANMM MainBlock)
( RTI CAN MultiMessage Blockset Reference).

Error value A static signal value that indicates an error. You can specify an
error value for each signal to be transmitted. Alternatively, error values can be
defined in a database file. In ControlDesk, you can switch to transmit the signal's
error value, constant value, etc. However, you cannot change the error value
during run time. In ControlDesk, you can use a Variable Array (MultiState LED
value cell type) to indicate if the error value is transmitted.
You can specify error values on the Signal Errors Page (RTICANMM MainBlock)
( RTI CAN MultiMessage Blockset Reference).

Dynamic value A signal value that is transmitted for a defined number of


times.
§ Behavior of dynamic values: You can specify to use a dynamic value for each
signal to be transmitted. In ControlDesk, you can specify to transmit the
signal's constant value or dynamic value. If you switch to the dynamic value, it
is transmitted for a defined number of times (countdown value). Then signal
manipulation automatically switches back to the signal manipulation option
used before the dynamic value.
§ Example of using dynamic values: Suppose you specify a dynamic value of 8
and a countdown value of 3. If you switch to the dynamic value of the signal,
the signal value 8 is sent the next 3 times the TX message is transmitted. Then
the signal manipulation option is reset.
You can specify dynamic values on the pages located in the Dynamic Signal Page
(RTICANMM MainBlock) ( RTI CAN MultiMessage Blockset Reference).

381
May 2018 MicroAutoBox Features
CAN Support

CAN Signal Mapping


Introduction Lists the CAN signals of the dSPACE real-time hardware and the mapping of
these signals to RTI blocks and RTLib functions.

CAN Signal Mapping

Introduction The CAN subsystem of MicroAutoBox provides CAN interfaces that meet the
ISO/DIS 11898 specifications.

I/O mapping The following tables show the mappings of the logical interface numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector.

§ MicroAutoBox II 1401/1501

CAN_TP1 Module Channel/ Signal I/O Connector Pin


Controller (ZIF Connector)
1 1 CAN 1 low in/out (CAN-L) V5
CAN 1 high in/out (CAN-H) V6
GND F3, F4, G3, G4, G5, H3, H4
2 CAN 2 low in/out (CAN-L) X5
CAN 2 high in/out (CAN-H) X6
GND F3, F4, G3, G4, G5, H3, H4
§ MicroAutoBox II 1401/1504

CAN_TP1 Module Channel/ Signal I/O Connector Pin


Controller (ZIF Connector)
1 1 CAN 1 low in/out (CAN-L) V5
CAN 1 high in/out (CAN-H) V6
GND F3, F4, G3, G4, G5, H3, H4
2 CAN 2 low in/out (CAN-L) X5
CAN 2 high in/out (CAN-H) X6
GND F3, F4, G3, G4, G5, H3, H4
2 1 CAN 3 low in/out (CAN-L) Z5
CAN 3 high in/out (CAN-H) Y5
GND F3, F4, G3, G4, G5, H3, H4
2 CAN 4 low in/out (CAN-L) a5
CAN 4 high in/out (CAN-H) b5
GND F3, F4, G3, G4, G5, H3, H4

382
MicroAutoBox Features May 2018
CAN Signal Mapping

§ MicroAutoBox II 1401/1505/1507, MicroAutoBox II 1401/1507

CAN_TP1 Module Channel/ Signal I/O Connector Pin


Controller (Sub-D Connector)
1 1 CAN 1 low in/out (CAN-L) 2
CAN 1 high in/out (CAN-H) 1
GND 3
2 CAN 2 low in/out (CAN-L) 5
CAN 2 high in/out (CAN-H) 4
GND 6
2 1 CAN 3 low in/out (CAN-L) 41
CAN 3 high in/out (CAN-H) 40
GND 42
2 CAN 4 low in/out (CAN-L) 44
CAN 4 high in/out (CAN-H) 43
GND 45

DS4342 CAN FD Channel Signal I/O Connector Pin


Module (Sub-D Connector)
1 – UBAT 35
1 GND 1 15
CAN 1 high in/out (CAN-H) 16
CAN 1 low in/out (CAN-L) 17
Feed-through line CAN 1 high 38
Feed-through line CAN 1 low 39
2 GND 2 18
CAN 2 high in/out (CAN-H) 19
CAN 2 low in/out (CAN-L) 20
Feed-through line CAN 2 high 36
Feed-through line CAN 2 low 37
2 – UBAT 74
1 GND 1 54
CAN 1 high in/out (CAN-H) 55
CAN 1 low in/out (CAN-L) 56
Feed-through line CAN 1 high 77
Feed-through line CAN 1 low 78
2 GND 2 57
CAN 2 high in/out (CAN-H) 58
CAN 2 low in/out (CAN-L) 59
Feed-through line CAN 2 high 75
Feed-through line CAN 2 low 76

383
May 2018 MicroAutoBox Features
CAN Support

§ MicroAutoBox II 1401/1511, MicroAutoBox II 1401/1511/1512, MicroAutoBox


II 1401/1511/1514

CAN_TP1 Module Channel/ Signal I/O Connector Pin


Controller (DS1511 ZIF Connector)
1 1 CAN 1 low in/out (CAN-L) c3
CAN 1 high in/out (CAN-H) c2
GND c1
2 CAN 2 low in/out (CAN-L) b3
CAN 2 high in/out (CAN-H) b2
GND b1
2 1 CAN 3 low in/out (CAN-L) B3
CAN 3 high in/out (CAN-H) B2
GND B1
2 CAN 4 low in/out (CAN-L) A3
CAN 4 high in/out (CAN-H) A2
GND A1

DS4342 CAN FD Channel Signal I/O Connector Pin


Module1) (DS1512/DS1514 ZIF
Connector)
1 – UBAT (H5)
1 GND 1 L3
CAN 1 high in/out (CAN-H) M3
CAN 1 low in/out (CAN-L) M4
Feed-through line CAN 1 high (K6)
Feed-through line CAN 1 low (K5)
2 GND 2 J3
CAN 2 high in/out (CAN-H) K3
CAN 2 low in/out (CAN-L) K4
Feed-through line CAN 2 high (J6)
Feed-through line CAN 2 low (J5)
2 – UBAT (X5)
1 GND 1 a3
CAN 1 high in/out (CAN-H) b3
CAN 1 low in/out (CAN-L) b4
Feed-through line CAN 1 high (Z6)
Feed-through line CAN 1 low (Z5)
2 GND 2 Y3
CAN 2 high in/out (CAN-H) Z3
CAN 2 low in/out (CAN-L) Z4
Feed-through line CAN 2 high (Y6)
Feed-through line CAN 2 low (Y5)
1) Not supported by MicroAutoBox II 1401/1511

384
MicroAutoBox Features May 2018
CAN Signal Mapping

§ MicroAutoBox II 1401/1512/1513, MicroAutoBox II 1401/1513, MicroAutoBox


II 1401/1513/1514

CAN_TP1 Module Channel/ Signal I/O Connector Pin


Controller (DS1513 ZIF Connector)
1 1 CAN 1 low in/out (CAN-L) c3
CAN 1 high in/out (CAN-H) c2
GND c1
2 CAN 2 low in/out (CAN-L) b3
CAN 2 high in/out (CAN-H) b2
GND b1
2 1 CAN 3 low in/out (CAN-L) B3
CAN 3 high in/out (CAN-H) B2
GND B1
2 CAN 4 low in/out (CAN-L) A3
CAN 4 high in/out (CAN-H) A2
GND A1
3 1 CAN 5 low in/out (CAN-L) P3
CAN 5 high in/out (CAN-H) P2
GND P4
2 CAN 6 low in/out (CAN-L) N3
CAN 6 high in/out (CAN-H) N2
GND N4

DS4342 CAN FD Channel Signal I/O Connector Pin


Module1) (DS1512/DS1514 ZIF
Connector)
1 – UBAT (H5)
1 GND 1 L3
CAN 1 high in/out (CAN-H) M3
CAN 1 low in/out (CAN-L) M4
Feed-through line CAN 1 high (K6)
Feed-through line CAN 1 low (K5)
2 GND 2 J3
CAN 2 high in/out (CAN-H) K3
CAN 2 low in/out (CAN-L) K4
Feed-through line CAN 2 high (J6)
Feed-through line CAN 2 low (J5)

385
May 2018 MicroAutoBox Features
CAN Support

DS4342 CAN FD Channel Signal I/O Connector Pin


Module1) (DS1512/DS1514 ZIF
Connector)
2 – UBAT (X5)
1 GND 1 a3
CAN 1 high in/out (CAN-H) b3
CAN 1 low in/out (CAN-L) b4
Feed-through line CAN 1 high (Z6)
Feed-through line CAN 1 low (Z5)
2 GND 2 Y3
CAN 2 high in/out (CAN-H) Z3
CAN 2 low in/out (CAN-L) Z4
Feed-through line CAN 2 high (Y6)
Feed-through line CAN 2 low (Y5)
1) Not supported by MicroAutoBox II 1401/1513

Related RTI blocks


§ RTICAN CONTROLLER SETUP
§ RTICANMM ControllerSetup

Related RTLib functions Slave CAN Access Functions

386
MicroAutoBox Features May 2018
LIN Support

LIN Support

Introduction The following chapter contains information on the LIN support for
MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ – ✓ ✓ – ✓ –

Supported I/O board boot modes: not relevant

Characteristics Depending on the variant you use, MicroAutoBox is equipped with a different
number of CAN_TP1 modules.

MicroAutoBox Variant Number of CAN_TP1


Modules
MicroAutoBox II 1401/1501 1
MicroAutoBox II 1401/1504 1
MicroAutoBox II 1401/1505/1507 2
MicroAutoBox II 1401/1507 2
MicroAutoBox II 1401/1511 2
MicroAutoBox II 1401/1511/1512 2
MicroAutoBox II 1401/1511/1514 2
MicroAutoBox II 1401/1512/1513 3
MicroAutoBox II 1401/1513 3
MicroAutoBox II 1401/1513/1514 3

387
May 2018 MicroAutoBox Features
LIN Support

Each CAN_TP1 module provides two channels. The module(s) is/are shared
between LIN and serial communication. One channel can be used only for LIN or
for serial communication. The channels provide serial communication or LIN as
follows:

Channel Interface Max. Baudrate


Channel 0 RS232 115.2 kBaud
Channel 1 LIN (K line) 20 kBaud

I/O mapping The following tables show the mappings of converter and channel numbers, as
used in RTI and RTLib, to the I/O pins of the related I/O connector.

§ MicroAutoBox II 1401/1501, MicroAutoBox II 1401/1504

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(ZIF Connector)
CAN_TP1 Module 1 0 Serial 1 TXD out U5
Serial 1 RXD in U6
2 1 LIN (K line) U3
Not used (L line) U4
§ MicroAutoBox II 1401/1505/1507

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(Sub-D Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out 7
Serial 1 RX in 8
2 1 Serial 2 LIN (K line) 10
Serial 2 Not used (L line) 11
CAN_TP1 Module2 1 0 Serial 3 TX out 46
Serial 3 RX in 47
2 1 Serial 4 LIN (K line) 49
Serial 4 Not used (L line) 50
§ MicroAutoBox II 1401/1511, MicroAutoBox II 1401/1511/1512, MicroAutoBox
II 1401/1511/1514

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(DS1511 ZIF Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out c5
Serial 1 RX in c6
2 1 Serial 2 LIN (K line) b5
Serial 2 Not used (L line) b6
CAN_TP1 Module2 1 0 Serial 3 TX out B5
Serial 3 RX in B6
2 1 Serial 4 LIN (K line) A5
Serial 4 Not used (L line) A6

388
MicroAutoBox Features May 2018
LIN Support

§ MicroAutoBox II 1401/1512/1513, MicroAutoBox II 1401/1513, MicroAutoBox


II 1401/1513/1514

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(DS1513 ZIF Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out c5
Serial 1 RX in c6
2 1 Serial 2 LIN (K line) b5
Serial 2 Not used (L line) b6
CAN_TP1 Module2 1 0 Serial 3 TX out B5
Serial 3 RX in B6
2 1 Serial 4 LIN (K line) A5
Serial 4 Not used (L line) A6
CAN_TP1 Module3 1 0 Serial 5 TX out P5
Serial 5 RX in P6
2 1 Serial 6 LIN (K line) N5
Serial 6 Not used (L line) N6

RTLib user For information on the RTLib functions available for LIN, see LIN Access Functions
( MicroAutoBox RTLib Reference).

Note

When using LIN, RTLib users have to use special firmware modes. For
detailed information, refer to CAN_TP1 Firmware Modes ( MicroAutoBox
RTLib Reference).

389
May 2018 MicroAutoBox Features
LIN Support

LIN Basics
Where to go from here Information in this section

LIN Basics ............................................................................................ 390


LIN (local interconnect network) is a low-cost serial communication
system for distributed electronic systems in cars.

Master/Slave Concept .......................................................................... 391


A LIN bus must have one master (called the LIN master) and may have
several slaves (called LIN slaves).

Example of a LIN Bus ........................................................................... 392


Example of a typical network in a car.

Information in other sections

LIN Support ......................................................................................... 387

LIN Basics

Basics LIN (local interconnect network) is a low-cost serial communication system for
distributed electronic systems in cars. LIN is an open standard. It was developed
to get a standard protocol to reduce the great variety of different low-end
multiplex solutions, and cuts the cost of development, production, service, and
logistics in car electronics. It is designed to connect electronic systems with low
communication requirements, where the bandwidth and versatility of CAN are
not required.

Supported LIN specifications § LIN specifications 1.2 and 1.3


and SAE standards § LIN specifications 2.0, 2.1 and 2.2
§ SAE J2602 standard (protocol version: J2602_1_1.0, language version:
J2602_3_1.0)
SAE J2602 is a vehicle LIN bus standard based on LIN 2.0 and defined by the
Society of Automotive Engineers (SAE).

Required firmware Before using the RTI LIN MultiMessage Blockset, make sure the boot firmware
and CAN firmware versions coming with the same dSPACE installation as the
blockset are installed on your MicroAutoBox. For information on how to update
the firmware, refer to How to Update Firmware ( Firmware Manager Manual).

390
MicroAutoBox Features May 2018
LIN Basics

Master/Slave Concept

Introduction A LIN bus consists of different nodes. It must have one master (called the LIN
master) and may have several slaves (called LIN slaves). Each LIN master features
one LIN master task and one LIN slave task. A LIN slave only features the LIN
slave task.

LIN master The LIN master task is responsible for schedules (lists of contiguous frames
including their characteristics) and sends the respective LIN headers. The LIN slave
tasks are responsible for transmitting or receiving the LIN response, see the
following illustration.

Master control unit Slave control unit Slave control unit

Master task

Slave task Slave task Slave task

LIN messages LIN messages are set up in a frame format. A frame is composed of a header,
which is sent by the LIN master, and a response, which is sent by the LIN slave
task, see the following illustration.

Message frame Inter-frame


space or
Header Response
break

Sync Sync Ident Data Data Data Data Checksum


break field field field field field field field

In-frame Inter-byte
response space space

Detailed information For more information on the LIN bus protocol and the frame format, refer to the
LIN Protocol Specification.

391
May 2018 MicroAutoBox Features
LIN Support

Example of a LIN Bus

Example The following illustration shows a typical network in a car.

Central body
Climate

control
Light
Instruments

Mirror CAN
Mirror

LIN
Seat Roof Seat

Lock Lock

Lock Heating Heating Lock

Heating Heating

Seat

Wiper
Universal Panel

Universal Motor Universal Light


Trunk W-Heating

The CAN bus (dotted line) connects ECUs throughout the whole car. The LIN
buses (solid lines) connect ECUs in local areas.

392
MicroAutoBox Features May 2018
Fields of Application

Fields of Application
Introduction Using MicroAutoBox, you can test the LIN network features of an electronic
control unit (ECU). Several test scenarios are possible.

Where to go from here Information in this section

Remaining Bus Simulation ................................................................... 393


Testing the transmission of message frames from the LIN master to
simulated and real LIN slaves.

Testing Communication Timing Constraints ......................................... 394


Testing the time interval when the message frames are transmitted.

Testing Against Specification Limits ...................................................... 394


Testing whether the ECU fulfills the requirements at the specification
limits.

Detecting the Baud Rate of a LIN Bus ................................................... 395


Measuring the baud rate of a LIN bus.

Testing Diagnostic and Failure Conditions ............................................ 396


Testing the ECU in the case of failures.

Testing Energy-Saving Modes ............................................................... 397


Testing the ECU in energy-saving modes.

Remaining Bus Simulation

Introduction An ECU with LIN master functionality can be tested using a dSPACE system with
MicroAutoBox. The dSPACE system simulates the LIN nodes, which are
connected to the LIN bus. The simulated bus members behave exactly the same
way as real bus members. This functionality is called “remaining bus simulation”.

Real and simulated bus For specific test purposes it is useful to replace a simulated bus member by the
members real bus member. Either a bus member is simulated by a dSPACE system or the
real controller is connected to the bus. In order to minimize the number of real-
time applications required for the simulation, it is possible to switch off a
simulated bus member without compiling the real-time application again.
Otherwise a dSPACE simulator used to test the complete car body electronics
would require hundreds of different real-time applications.

393
May 2018 MicroAutoBox Features
LIN Support

Related topics Basics

Testing Against Specification Limits ....................................................................................... 394


Testing Communication Timing Constraints .......................................................................... 394
Testing Diagnostic and Failure Conditions ............................................................................. 396
Testing Energy-Saving Modes ................................................................................................ 397

Testing Communication Timing Constraints

Testing communication timing For control algorithms it is important that an ECU sends its message frame within
constraints a given time interval. During simulation the simulator can observe the
transmitted message frames and thus check the timing constraints.

Related topics Basics

Remaining Bus Simulation ..................................................................................................... 393


Testing Against Specification Limits ....................................................................................... 394
Testing Diagnostic and Failure Conditions ............................................................................. 396
Testing Energy-Saving Modes ................................................................................................ 397

Testing Against Specification Limits

Introduction An ECU has to work under a wide range of conditions. Suppose you specified
your ECU to work correctly in a LIN network at 9.6 kBd ±10%. In this case, the
dSPACE simulator has to run the LIN bus at 8.64 kBd to 10.56 kBd.

In-frame response time A second important specification of the LIN network is the in-frame response
time. This specifies the time between the end of the LIN header transmitted by
the LIN master and the beginning of the LIN response transmitted by the LIN
slave. Each LIN slave receiving the corresponding message frame and the LIN
master must check whether the complete frame is completed within a given time
interval. The RTI LIN MultiMessage Blockset can vary the in-frame response time
in order to check whether the ECU behaves correctly under all conditions.

Baud rate detection The actual available baud rate for a LIN bus can be detected by the RTI LIN
MultiMessage Blockset and RTLib functions. This is useful if a model is designed
for various master nodes using different baud rates. If you specify the baud rate

394
MicroAutoBox Features May 2018
Fields of Application

in a LDF file, this baud rate is fixed. A detailed description of the baud rate
detection used follows.

Related topics Basics

Remaining Bus Simulation ..................................................................................................... 393


Testing Diagnostic and Failure Conditions ............................................................................. 396
Testing Energy-Saving Modes ................................................................................................ 397

Detecting the Baud Rate of a LIN Bus

Introduction Baud rate detection for MicroAutoBox is performed by hardware units on the
available channel.

Detected signal The detected signal must contain a synchronization field consisting of the
pattern '0x55' (hex). The hardware measures the 5 falling edges of the bit
pattern (1010 1010).

Adjusted baud rate For the channel on which the baud rate is measured the highest baud rate that is
expected to occur must be adjusted.

Baud rate too small If the baud rates are too small in relation to the adjusted baud rate they cannot
be measured. Baud rate measurement is started when a synchronization break
signal is detected. The break signal has a length of at least 10 low bit times. It is
followed by a synchronization field. Depending on the baud rate, each low bit of
a message is evaluated as a break signal, so measurement is started again and
again.

Used algorithm The measurement uses the following algorithm:

baudrate_config/8 ≤ baudrate_config ≤ baudrate_config + 15%

The algorithm describes the actual value range the hardware is able to measure.
If the specified baud rate is too small the baud rate cannot be measured
correctly. For example, if you configure 9600 baud as the baud rate, but you
want to work alternatively with 19,200 baud, this would not be possible. The
algorithm first uses the configured value to detect the break signal. A break
signal sent with 19,200 baud is too small to be detected with 9600 baud
configured hardware. Thus, you must enter the highest available baud rate in the
LDF file to start the baud rate measurement with the highest baud rate.

395
May 2018 MicroAutoBox Features
LIN Support

Related topics Basics

Testing Against Specification Limits ....................................................................................... 394

Testing Diagnostic and Failure Conditions

Testing diagnostic and failure Diagnostic and failure procedures are becoming more and more important within
conditions modern ECUs. To check the failure handling of an ECU, dSPACE Simulator can
generate errors on the LIN bus.

The following illustration shows the format of a LIN message frame to show the
errors which can be simulated.

Message frame Inter-frame


space or
Header Response
break

Sync Sync Ident Data Data Data Data Checksum


break field field field field field field field

In-frame Inter-byte
response space space

The second illustration shows the format of the identifier field contained in the
LIN message frame.
Identifier field

Identifier bits ID parity bits

ID0 ID1 ID2 ID3 ID4 ID5 P0 P1

Start Stop
bit bit
Length control

The following errors can be generated for test purposes.

Inconsistent-synch-byte error The synch byte is used by the ECUs to


synchronize themselves to the LIN bus speed. The synch byte is transmitted as
pattern 0x55 via the LIN bus. For error simulation a different pattern can be
transmitted.

Identifier-parity error The identifier field consists of 6 bits plus 2 identifier


parity bits. LIN slaves must not respond to incorrect identifiers or identifiers which
are not of interest.

396
MicroAutoBox Features May 2018
Fields of Application

Slave-not-responding error After a LIN header is sent, the LIN slave must
complete the frame within a given time interval. If this time interval is too long,
the other LIN nodes must ignore the message. Bus collisions may occur if the LIN
master starts the next LIN header before the LIN slave has finished its response.

Checksum error The response from the LIN slave is protected by a checksum
field. If the checksum value is invalid, the LIN nodes ignore the message.

Related topics Basics

Remaining Bus Simulation ..................................................................................................... 393


Testing Against Specification Limits ....................................................................................... 394
Testing Communication Timing Constraints .......................................................................... 394
Testing Energy-Saving Modes ................................................................................................ 397

Testing Energy-Saving Modes

Introduction Body electronic control units are often connected to an unswitched power
supply, because they must be operable even if the engine is not running: for
example, a door lock unit. Therefore, these ECUs consume power even if the car
is parked for days. Modern top‑of‑the‑range cars may have more than 100 ECUs.
To avoid discharging the battery, the ECUs must switch to low-power sleep
mode when they are not in operation.

Low-power sleep mode It is an important test scenario to check whether an ECU is correctly changing to
low-power sleep mode and can be woken up again by several events. The
dSPACE simulator can simulate and analyze these sleep and wake-up events.
ECUs connected via buses can often be woken up and put into sleep mode by
bus events.

In the case of LIN, the dSPACE simulator can react to the following events:

Event Reaction
Sleep command Put the LIN transceiver into sleep mode
received via the LIN bus and inform the application that a sleep
command has been received.
Wake-up command Wake up the LIN transceiver and inform
received via the LIN bus the application that a wake-up command
has been received via the LIN bus.
Application wants to Wake up the LIN transceiver and send the
wake up the LIN bus wake-up command via the LIN bus.
Application wants to Send the goto sleep command over the
set the LIN bus asleep LIN bus and put the LIN transceiver into
sleep mode.

397
May 2018 MicroAutoBox Features
LIN Support

Related topics Basics

Remaining Bus Simulation ..................................................................................................... 393


Testing Against Specification Limits ....................................................................................... 394
Testing Communication Timing Constraints .......................................................................... 394
Testing Diagnostic and Failure Conditions ............................................................................. 396

398
MicroAutoBox Features May 2018
LIN Bus Handling

LIN Bus Handling


Introduction The RTLib provides the C functions for implementing a LIN bus communication.

Where to go from here Information in this section

Setting Up a LIN Bus ............................................................................ 399


To transmit and receive frames you have to set up the LIN bus.

Handling Frames .................................................................................. 403


During simulation you can handle frames that are interchanged between
the LIN nodes.

Controlling a LIN Bus ........................................................................... 404


The LIN bus can be controlled by the real-time application. You can
switch between simulated and real nodes, or simulate energy‑saving
modes.

Handling Schedules ............................................................................. 407


Schedules can be used to send frames according to predefined lists.
Interrupts can be triggered for different schedule events.

Using Interrupts ................................................................................... 408


Interrupts can be generated by bus events from a node, frame or
schedule. The interrupts can be used to trigger interrupt-driven
subsystems.

Setting Up a LIN Bus

Introduction To transmit and receive frames you have to set up the LIN bus.

Where to go from here Information in this section

Basics on LIN Bus Handling .................................................................. 400


Provides basic information on how to simulate LIN master and LIN slaves.

Specifying the LIN Bus Parameters ........................................................ 401


As the first step you must set up the LIN bus in your model or
application.

399
May 2018 MicroAutoBox Features
LIN Support

Database Files ...................................................................................... 401


Bus communication is specified in databases, which specify the
information transmitted by an ECU, how it is coded and how often it is
sent via the bus.

Defining LIN Nodes .............................................................................. 402


After the LIN bus is set up, you can define all simulated LIN nodes.

Basics on LIN Bus Handling

Number of LIN buses MicroAutoBox provides 1 (1401/1501 and 1401/1504) or 2 (1401/1505/1506


and 1401/1506) LIN channels. Therefore, you can simulate 1 or 2 LIN buses with
LIN master and LIN slaves. LIN data from within a real-time model or application
can be transmitted and received. LIN frames and LIN bus events as well as
energy-saving scenarios such as wake-up and sleep mode are supported.

Simulating a LIN master If you want to simulate a LIN master you have to wire a 1 kΩ pull-up resistance
in parallel to the slave‘s 30 kΩ pull-up resistance. For detailed information, refer
to How to Configure MicroAutoBox as the LIN Master ( MicroAutoBox II
Hardware Installation and Configuration).

Connection to the LIN bus The pinout depends on the MicroAutoBox II variant. Refer to:
§ MicroAutoBox II 1401/1501: ZIF I/O Connector ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: ZIF I/O Connector ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: ZIF I/O Connector ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1507: Sub-D I/O Connector ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511: ZIF I/O Connector ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: DS1511 ZIF I/O Connector
( MicroAutoBox II Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: DS1511 ZIF I/O Connector
( MicroAutoBox II Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1512/1513: DS1513 ZIF I/O Connector
( MicroAutoBox II Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: ZIF I/O Connector ( MicroAutoBox II Hardware
Installation and Configuration)

400
MicroAutoBox Features May 2018
LIN Bus Handling

§ MicroAutoBox II 1401/1513/1514: DS1513 ZIF I/O Connector


( MicroAutoBox II Hardware Installation and Configuration)

Specifying the LIN Bus Parameters

Introduction As the first step you must set up the LIN bus in your model or application.

Configuration steps If you want to set up the LIN bus, you have to perform some configuration steps.
1. Set the parameters to select the LIN Interface Board, the LIN channel, the
transceiver type the LIN bus is connected to and the termination resistance.
For information on setting the termination resistance for a LIN master, refer to
How to Configure MicroAutoBox as the LIN Master ( MicroAutoBox II
Hardware Installation and Configuration).
2. Use a database file in the LDF, DBC, FIBEX or AUTOSAR XML file format. One
database file can be used for several LIN buses. For more information on
these file formats, refer to Database Files on page 401.
3. Define a name for the LIN bus. This name must be unique in the model or
application.
4. If the baud rate is not specified in the database file, define the baud rate.

RTLib user Use the dslin_tp1_board_init, dslin_channel_init and


dslin_channel_create functions. Define the necessary parameters in them.
For detailed information on the functions, refer to LIN Channel Handling
( MicroAutoBox RTLib Reference).

Database Files

Introduction Specifying communication via buses in a car is a complex activity, because a bus
consists of a lot of different ECUs, which may be developed by several
departments. Therefore, bus communication is specified in databases, which
specify the information transmitted by an ECU, how it is coded and how often it
is sent via the bus.

Supported database file types LDF file The LDF file format describes a complete LIN network and contains
all the information necessary to configure it. The file format was specially
developed for LIN networks, so it can describe all the features of a LIN network.
For more information on the LDF file format, refer to the LIN Configuration
Language Specification.

401
May 2018 MicroAutoBox Features
LIN Support

DBC file The DBC file format is designed by Vector Informatik GmbH for the
CANalyzer database files. Although it was developed for CAN buses, it can also
be used for LIN buses with some limitations:
§ As the CAN protocol has no standard definitions for master nodes and
schedules, such definitions are not supported by the DBC files.
§ According to the LIN specification only byte layouts in the Intel format are
supported. Byte layouts in Motorola format are not supported.

FIBEX file The Field Bus Exchange (FIBEX) format is an XML exchange file
format. It is used for data exchange between different tools that work with
message-oriented bus communication. A FIBEX file usually describes more than
one bus system. You therefore have to select one of the available bus systems if
you work with a FIBEX file as the database.

AUTOSAR system description file AUTOSAR system description files are


XML files that describe a system according to AUTOSAR. A system is a
combination of a hardware topology, a software architecture, a network
communication, and information on the mappings between these elements.
AUTOSAR system description files are instances of the AUTOSAR System
Template. The AUTOSAR System Template contains a description of the network
communication and hardware topology according to the FIBEX standard defined
by ASAM e.V.
AUTOSAR system description files are files of AUTOSAR XML file type that can be
used to export or exchange information on system descriptions.
For information on which AUTOSAR Releases are supported, refer to Features of
the RTI LIN MultiMessage Blockset ( RTI LIN MultiMessage Blockset Reference).

Defining LIN Nodes

Introduction After the LIN bus is set up, you can define all simulated LIN nodes.

LIN node types Two types of LIN nodes are available:


§ The master node controls the LIN bus and protocol and controls which
message has to be sent over the LIN bus at a specified time.
§ The slave nodes receive frame headers from the master and send the
corresponding frame over the LIN bus.

Setting up a LIN node The following steps have to be taken to setup a LIN node. You must define at
least one LIN node for a LIN bus.
1. Specify the LIN bus to which the LIN node is connected.
2. Select the LIN node from the database file or define a user-defined node (only
slave type possible). The name must be unique in the LIN bus.
3. Repeat the above steps for all simulated LIN nodes of the LIN bus.

402
MicroAutoBox Features May 2018
LIN Bus Handling

4. Define the TX and RX error counters available for detecting errors that occur
during the sending or receiving of frames.

RTLib user Use the dslin_node_create and dslin_node_init functions. For detailed
information on these, refer to LIN Node Handling ( MicroAutoBox RTLib
Reference).

Handling Frames

Database file The signals to be transferred via a LIN bus are composed as frames. The frame
composition is described by the database file, which is selected during bus setup
(see Specifying the LIN Bus Parameters on page 401).

Where to go from here Information in this section

Transmitting and Receiving Frames ...................................................... 403


After you have set up the LIN node, frames can be transmitted or
received in the model or application.

Manipulating Frames ........................................................................... 404


In some application fields it is necessary to access the frames before they
are transmitted or decoded. For this purpose you can manipulate the
frame data.

Transmitting and Receiving Frames

Introduction The signals are transmitted in frames. Therefore, the signals must be encoded
before they are transmitted via the LIN bus. The rules for encoding are defined in
the database file. In the same way, a received frame must be decoded first to get
the signals.

RTLib user The RTLib for the DS4330 provides functions for transmitting and receiving
frames. Functions to encode messages to frames or to decode frames to
messages are not provided by RTLib. You have to program them yourself. For
information on the transfer functions, refer to LIN Frame Handling
( MicroAutoBox RTLib Reference).

403
May 2018 MicroAutoBox Features
LIN Support

Manipulating Frames

Introduction In some application fields it is necessary to access the frames before they are
transmitted or decoded. For this purpose you can manipulate the frame data, for
example, to simulate a transmission error.

RTLib user The RTLib for the DS4330 provides functions for transmitting and receiving
frames. Functions to encode messages to frames or to decode frames to
messages are not provided by RTLib. You have to program them yourself.
Additionally, you also have to program the function for manipulating the frames.
For information on the transfer functions, refer to LIN Frame Handling
( MicroAutoBox RTLib Reference).

Controlling a LIN Bus

Introduction The LIN bus can be controlled by the real-time application. You can switch
between simulated and real nodes, or simulate energy‑saving modes.

Where to go from here Information in this section

Switching LIN Nodes ............................................................................ 405


The LIN nodes connected to a LIN bus can be real or simulated in the
model or application. You can enable and disable the simulation of a LIN
node while the application is running.

Setting a LIN Bus to Sleep Mode .......................................................... 405


Only LIN buses in sleep mode (energy saving mode) can be woken up.

Waking Up a LIN Bus ........................................................................... 405


An important feature of a LIN bus is the support of energy-saving modes.
This means that it can be put to sleep and woken up after receiving a
specific signal.

Changing LIN Bus Parameters .............................................................. 406


To test the LIN bus under different operating conditions, some
parameters must be changed during simulation.

Reading Status Information ................................................................. 406


During simulation you can read the status information of LIN nodes.

404
MicroAutoBox Features May 2018
LIN Bus Handling

Switching LIN Nodes

Introduction If you want to replace a simulated LIN node by a real controller you have to
disable the LIN node in the model or application. RTLib contains functions to
disable or enable simulated LIN nodes during simulation. Therefore, it is not
necessary to recompile the model or application even if the LIN bus structure
changes.

Note

Do not enable a simulated LIN node if the corresponding real LIN node is
also connected to the LIN bus. Otherwise two LIN slaves would answer to
the same header and cause errors.

RTLib user Use dslin_node_enable to enable a LIN slave and dslin_node_disable to


disable a LIN slave. For detailed information on these functions, refer to the LIN
Node Handling ( MicroAutoBox RTLib Reference).

Setting a LIN Bus to Sleep Mode

Introduction For testing the energy-saving mode, the whole LIN bus can be set to sleep mode.
The corresponding signal has to be sent by the LIN master node. For waking up
the LIN bus, see Waking Up a LIN Bus on page 405.

RTLib user Use dslin_node_command_sleep to set a LIN bus to sleep mode. For detailed
information on this function, refer to dslin_node_command_sleep
( MicroAutoBox RTLib Reference).

Waking Up a LIN Bus

Introduction An important feature of a LIN bus is the support of energy-saving modes (see
Testing Energy-Saving Modes on page 397). This means that it can be put to
sleep (see Setting a LIN Bus to Sleep Mode on page 405) and woken up after
receiving a specific signal. This frame can be generated by an RTLib function.

405
May 2018 MicroAutoBox Features
LIN Support

RTLib user Use dslin_node_command_wakeup to wake up a LIN bus. For detailed


information on this function, refer to the dslin_node_command_wakeup
( MicroAutoBox RTLib Reference).

Changing LIN Bus Parameters

Introduction To test if the ECU fulfills the requirements of the specification, you have to
change some bus and frame parameters during the simulation (see Testing
Energy-Saving Modes on page 397).

RTLib user Use dslin_channel_baudrate_set, dslin_channel_breaklength_set,


dslin_channel_breakdelimiter_set, dslin_channel_synchfield_set
to change the parameters and dslin_channel_apply_settings to activate
the new settings.

Related topics References

dslin_channel_apply_settings ( MicroAutoBox RTLib Reference)


dslin_channel_baudrate_set ( MicroAutoBox RTLib Reference)
dslin_channel_breakdelimiter_set ( MicroAutoBox RTLib Reference)
dslin_channel_breaklength_set ( MicroAutoBox RTLib Reference)
dslin_channel_synchfield_set ( MicroAutoBox RTLib Reference)

Reading Status Information

Introduction Five different message error types are specified in the LIN specification (see LIN
Protocol Specification 1.2). While the LIN nodes are running, the errors are
counted. You can read the counters for each node type (master and slave) with
RTLib functions.

RTLib user Several functions are provided to get status information for both node types. For
detailed information on this function, refer to LIN Frame Handling
( MicroAutoBox RTLib Reference).

406
MicroAutoBox Features May 2018
LIN Bus Handling

Handling Schedules

Introduction Schedules can be used to send frames according to predefined lists. Interrupts
can be triggered for different schedule events.

Where to go from here Information in this section

Setting Up a LIN Schedule .................................................................... 407


Currently executed LIN schedules can be interrupted and restarted or
resumed. The behavior can be defined.

Setting the Priority of LIN Schedules ..................................................... 408


If you have defined several schedules in an LDF file, you can implement a
decision logic to rank the schedules according to their priority. With
RTLib you can start and stop a schedule with the corresponding
functions. No ranking is required.

Setting Up a LIN Schedule

Basics on LIN schedules LIN schedules have to be predefined in LDF files. The master node sends the
listed headers and the corresponding nodes answer by sending the
corresponding frame. Running schedules can be interrupted to start another
schedule. After completing this schedule, the interrupted schedule can be
restarted from the beginning or resumed where it was interrupted.

If you want to send several frames over the LIN bus in a specified time, you must
use LIN schedules. RTLib provides functions to set up, start and stop LIN
schedules. The following illustration shows a schedule with several frames. The
frame time specifies the time to send the header and to get the response
including a delay time.
Frame time Frame time Frame time
t1 t2 t3

Header Response

H1 R1 H2 R2 H3 R3

The schedule timing is calculated by the CAN_TP1 module of MicroAutoBox. The


times of the CAN_TP1 module and the DS1401 base Board are synchronized to
ensure that time stamps and the simulation time are consistent.

407
May 2018 MicroAutoBox Features
LIN Support

RTLib user Several functions are provided to specify and handle LIN schedules. For detailed
information on these functions, refer to the LIN Schedule Handling
( MicroAutoBox RTLib Reference).

Setting the Priority of LIN Schedules

Introduction If you use several schedules you can define the priority of LIN schedules.
Schedules with higher priority can interrupt schedules with lower priority.

RTLib user With RTLib you can start and stop a schedule with the corresponding functions.
Schedules cannot be ranked.

Using Interrupts

Defining Interrupts

Introduction To trigger a subsystem, nodes or frames can generate interrupts when different
events occur.

The following events are defined for a node:

Node events § Bus wake-up


§ Bus sleep request
§ No bus activity
§ RX error counter threshold exceeded
§ TX error counter threshold exceeded
§ Identifier-parity error
§ Inconsistent-synch-field error

Events for a received frame The following events are defined for a received frame:
§ Message received
§ Checksum error
§ Slave-not-responding error

408
MicroAutoBox Features May 2018
LIN Bus Handling

Events for a transmitted The following events are defined for a transmitted frame:
frame § Header received
§ Frame received
§ Message transmitted
§ Bit error

Schedule events The following events are defined for schedules:


§ Schedule started
§ Schedule terminated
§ Schedule aborted
§ Schedule restarted

For a description of the events, refer to the documentation of the interrupt


features.

RTLib user Several functions are provided to implement node, frame and schedule
interrupts. For detailed information on these functions, refer to LIN Interrupt
Handling ( MicroAutoBox RTLib Reference).

409
May 2018 MicroAutoBox Features
LIN Support

Using the RTI LIN MultiMessage Blockset


Introduction The RTI LIN MultiMessage Blockset is a Simulink blockset for efficient and
dynamic handling of complex LIN setups in hardware-in-the-loop (HIL)
applications.

Where to go from here Information in this section

Basics on the RTI LIN MultiMessage Blockset ........................................ 410


Provides an overview of the features of the RTI LIN MultiMessage
Blockset.

Transmitting and Receiving LIN Frames ................................................. 412


Large LIN frame bundles can be managed from a single Simulink block
provided by the RTI LIN MultiMessage Blockset.

How to Define a Checksum Algorithm ................................................. 415


You can specify your own checksum algorithm for frames.

Manipulating Signals to be Transmitted ............................................... 416


You can analyze signals of RX frames or change the values of signals of
TX frames in the experiment software.

Basics on the RTI LIN MultiMessage Blockset

Introduction The RTI LIN MultiMessage Blockset is a Simulink blockset for efficient and
dynamic handling of complex LIN setups in hardware-in-the-loop (HIL)
applications. All the incoming RX frames and outgoing TX frames of an entire
LIN controller can be controlled by a single Simulink block. LIN communication is
configured via database files (DBC file format, LDF file format, FIBEX file format,
MAT file format, or AUTOSAR XML file format).

Supported dSPACE platforms The RTI LIN MultiMessage Blockset is supported by the following platforms:
§ SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus Module, DS6301
CAN/LIN Board, and/or DS6351 LIN Board
§ PHS-bus-based systems (DS1005, DS1006, or DS1007 modular systems) with a
DS4330 LIN Interface Board
§ MicroAutoBox with LIN interface

You have to recreate all the RTI LIN MultiMessage blocks if you switch platform
(for example, from SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus
Module, DS6301 CAN/LIN Board, and/or DS6351 LIN Board to a DS1005 or from
a DS1005 to MicroAutoBox). To recreate all the RTILINMM blocks at once, select

410
MicroAutoBox Features May 2018
Using the RTI LIN MultiMessage Blockset

Create S-function for All LIN Blocks from the options menu of the
GeneralSetup block (refer to Options Menu (RTILINMM GeneralSetup) ( RTI
LIN MultiMessage Blockset Reference)).

Managing large LIN frame With the RTI LIN MultiMessage Blockset, you can configure and control a large
bundles number of LIN frames from a single Simulink block. This reduces the size of
model files and the time required for code generation and the build process.

Manipulating signals to be The RTI LIN MultiMessage Blockset can manipulate the counter values of signals
transmitted before they are transmitted.

When simulating with signal manipulation, you can specify whether to use the
signal from the model or the TRC file. This is useful for simulating error values.

Specifying signal saturation You can use the signal limits specified in the database file or specify other limits.
If the input signal is outside of the specified range, it is set to the minimum or
maximum limit. For details, refer to Saturation Page (RTILINMM MainSetup)
( RTI LIN MultiMessage Blockset Reference).

Updating a model The RTI LIN MultiMessage Blockset creates an S-function for the specified
database file. You can easily update the LIN configuration of a model by
replacing the database file and updating the S-function.

Modifying model parameters Model parameters such as frames or signal values can be modified during run
during run time time either via model input or via the Bus Navigator in ControlDesk. For
modifying model parameters via the Bus Navigator a variable description file
(TRC) is automatically generated each time you create an S-function for the
RTILINMM MainSetup block. The entries of the TRC file let you analyze received
signals, change the values of signals to be transmitted, etc. In ControlDesk, you
can access the settings specified in the TRC file via the model's system
description file (SDF). The SDF file bundles all the TRC files and additional
information for the application.

(Relevant only for SCALEXIO systems with a DS2671 Bus Board, DS2672 Bus
Module, DS6301 CAN/LIN Board, and/or DS6351 LIN Board) For information on
where to find the signals of the LIN bus in the TRC file, refer to Details on the
Variable Groups of the Behavior Model ( ConfigurationDesk Real-Time
Implementation Guide).

Variables of custom code You can include variables of custom code in a USR.TRC file in addition to the
parameters of the RTI LIN MultiMessage Blockset.

411
May 2018 MicroAutoBox Features
LIN Support

TRC file entries with initial TRC/SDF files generated for Simulink models including blocks from the RTI LIN
data MultiMessage Blockset contain initial data. The RTI LIN MultiMessage Blockset
supplies all variables with initial values when they are included in the TRC file.
TRC files with initial data allow you to perform offline calibration with
ControlDesk.

Visualization with the Bus The RTI LIN MultiMessage Blockset supports visualization with the Bus Navigator.
Navigator Layouts/instruments are generated on demand and provide access to all the LIN
signals and all the switches required to configure LIN communication during run
time. You do not have to preconfigure layouts by hand.

Monitoring and logging LIN The RTI LIN MultiMessage Blockset supports filtered and unfiltered monitoring
bus communication and logging of LIN bus communication with the Bus Navigator. You can observe
the raw and physical data of LIN frames on a LIN bus, and log the raw data of
LIN frames. You can monitor and log LIN bus events.

Transmitting and Receiving LIN Frames

Introduction Large LIN frame bundles (up to 63 frames) can be managed from a single
Simulink block provided by the RTI LIN MultiMessage Blockset.

Defining LIN communication To define the LIN communication of a LIN controller, you must provide a
database file.

LDF file as the database You can use the LDF file format as the database for
LIN communication. The LDF file format describes a complete LIN network and
contains all the information necessary to configure it. The file format was
specially developed for LIN networks, so it can describe all the features of a LIN
network. For more information on the LDF file format, refer to the LIN
Configuration Language Specification.

DBC file as the database You can also use the DBC file format as the
database for LIN communication. The DBC file format was developed by Vector
Informatik GmbH, Stuttgart, Germany. For the RTI LIN MultiMessage Blockset,
you can use all the DBC files that pass the consistency check of Vector
Informatik’s CANdb++ Editor.
The DBC file format was developed for CAN buses, but it can also be used for
LIN buses with some limitations:
§ As the CAN protocol has no standard definitions for master nodes and
schedules, such definitions are not supported by the DBC file formats.
§ The LIN specification supports only byte layouts in the Intel format. Byte
layouts in Motorola format are not supported.

412
MicroAutoBox Features May 2018
Using the RTI LIN MultiMessage Blockset

FIBEX file as the database The Field Bus Exchange (FIBEX) format is an XML
exchange file format. It is used for data exchange between different tools that
work with message-oriented bus communication. A FIBEX file usually describes
more than one bus system. You therefore have to select one of the available bus
systems if you work with a FIBEX file as the database.

MAT file as the database You can also use the MAT file format as the
database for LIN communication, or specify other database file formats as the
database. You must convert your database files into the MAT file format for this
purpose.

AUTOSAR system description file as the database You can also use
AUTOSAR system description files as the database for LIN communication.
AUTOSAR (AUTomotive Open System ARchitecture) is an industry partnership
that aims to develop and establish an open standard for automotive
electric/electronic (E/E) architectures.
AUTOSAR system description files are files of AUTOSAR XML file type that
describe a system according to AUTOSAR. A system is a combination of a
hardware topology, a software architecture, a network communication, and
information on the mappings between these elements. AUTOSAR system
description files are instances of the AUTOSAR System Template. The AUTOSAR
System Template contains a description of the network communication and
hardware topology according to the FIBEX standard defined by ASAM e.V.

Defining RX frames and TX You can receive and/or transmit each frame defined in the database file that you
frames specify for LIN communication.

Defining RX frames You can define RX frames on the RX Frames Page


(RTILINMM MainSetup).

Defining TX frames You can define TX frames on the TX Frames Page


(RTILINMM MainSetup).

Working with event-triggered The RTI LIN MultiMessage Blockset allows you to work with event-triggered
frames frames. In contrast to a standard LIN frame, the frame header of an event-
triggered frame is assigned to several frame responses of different LIN nodes.
This allows you to transmit the frames of different nodes via the same frame slot.
If you work with LIN 2.1 or later, you can specify collision resolver schedules to
resolve collisions which might occur if two or more event-triggered frames are
sent at the same time via the same frame slot. For details, refer to Eventtriggered
Frames Page (RTILINMM MainSetup) ( RTI LIN MultiMessage Blockset
Reference).

Working with raw data The RTI LIN MultiMessage Blockset allows you to work with the raw data of
frames. You have to select the frames for this purpose. The RTILINMM
MainSetup block then provides the raw data of these frames to the model
byte‑wise for further manipulation. You can easily access the raw data of RX
frames via a Simulink Bus Selector block. For details, refer to Raw Data Page
(RTILINMM MainSetup) ( RTI LIN MultiMessage Blockset Reference).

413
May 2018 MicroAutoBox Features
LIN Support

Implementing checksum In addition to the checksums of the LIN frames, you can use a signal to transmit
algorithms a user-defined checksum. You can implement checksum algorithms for the
checksum calculation of TX frames and checksum verification of RX frames.

Checksum header file You have to specify the checksum algorithms in a


checksum header file. This needs to have a C-coded switch-case directive to
switch between algorithms.

Checksum calculation for TX frames You can assign a checksum algorithm


to each TX frame. A checksum is calculated according to the algorithm and
assigned to the TX frame. Then the frame is transmitted together with the
calculated checksum.

Checksum check for RX frames You can assign a checksum algorithm to


each RX frame. A checksum is calculated for the frame and compared to the
checksum in the received frame. If they differ, this is indicated at the error ports
for RX frames if these ports are enabled. For details, refer to User Checksum
Definition Page (RTILINMM MainSetup) ( RTI LIN MultiMessage Blockset
Reference).

LIN frame checksum manipulation You can manipulate the checksums of


LIN frames. The checksum is increased by a specified fixed offset value for a
defined number of times.

Receiving frames with a If the length of a received frame is different than that specified in the database
different frame length than file, how the frame is handled depends on its length.
specified in database file
Received frame shorter than expected If a frame is shorter than specified
in the database file, it is not decoded. The error port is set to Slave not
responding (RX_Error = 16). The frame status remains 0. The RX_Time is
updated. The received data is output at the RX Raw Data port. Raw data bytes
which are not received are set to 0. You can read the frame length at the Frame
Length port.

Received frame longer than expected If a frame is longer than specified in


the database file, only the specified frame length is read. The next byte is
interpreted as a checksum. A checksum error is therefore displayed in most
cases. The raw data, RX_Time and RX_DeltaTime are updated. The error port is
set to Checksum Error (RX_Error = 8). If the last byte is the correct
checksum, the frame is decoded as usual.

414
MicroAutoBox Features May 2018
Using the RTI LIN MultiMessage Blockset

How to Define a Checksum Algorithm

Objective You can specify your own checksum algorithm for frames.

Basics You can implement checksum algorithms for frames via a checksum header file.
Each algorithm must have a C-coded switch-case directive in the header file.

Method To define a checksum algorithm


1 Open the User Checksum Definition page.
2 Click to specify an existing checksum header file, or enter a checksum
header file name in the Header file edit field.
3 Name the checksum algorithms in the Identifier for cases field.

4 In the checksum header file, sort the algorithms.


The order you specify for the algorithms corresponds to the crctype index of
the switch‑case directives in the header file.
5 Click to create the header file if you entered its file name in the
Header file edit field in step 1.
6 Click to edit the file in MATLAB’s M-File Editor.

7 In the checksum header file, edit your checksum algorithms. Note that the
header file must contain at least one switch-case directive.
You have access to the following input parameters of the header file:

Input Parameter Description


crcoption § '0' if applied to a TX frame
§ '1' if applied to an RX frame
See User Checksum Frames Page (RTILINMM MainSetup) ( RTI LIN MultiMessage
Blockset Reference).
UInt8* FrameRAW_DATA Pointer to 8 bytes of raw data
crctype Index of the switch‑case directives for the checksum algorithms. Corresponds to the
order you specify in step 3 (see above).
CsBitPos Start position of the checksum signal
CsLength Length of the checksum signal
MsgLength Frame length (in range 1 ... 8)
MsgId Frame ID (1 ... 59)

Result Your checksum algorithm is used.

415
May 2018 MicroAutoBox Features
LIN Support

Related topics References

RTILINMM MainSetup ( RTI LIN MultiMessage Blockset Reference)


User Checksum Definition Page (RTILINMM MainSetup) ( RTI LIN MultiMessage
Blockset Reference)

Manipulating Signals to be Transmitted

Introduction All the signals of all the RX and TX frames (see Transmitting and Receiving LIN
Frames on page 412) automatically get corresponding entries in the generated
TRC file. This allows you to analyze them (signals of RX frames) or change their
values (signals of TX frames) in the experiment software.

Manipulating signals to be The RTI LIN MultiMessage Blockset provides several options to manipulate the
transmitted values of signals before they are transmitted. You can switch between the
options you have specified via entries in the generated TRC file.

You can switch between these options in the experiment software.

TX signals The RTILINMM MainSetup block allows you to get the value of
TX signals either from the Simulink model or from a variable in ControlDesk. The
values of these TX signals can be changed from within the model. Their values
cannot be changed in ControlDesk if the Input Manipulation option is cleared.
For details, refer to Input Manipulation Page (RTILINMM MainSetup) ( RTI LIN
MultiMessage Blockset Reference).

Counter signals You can specify a counter signal that provides the number
of frame transmissions. You can specify the counter start value, the increment,
and the counter stop value. Each time the counter reaches the stop value, it
turns around to the counter start value. For details, refer to Counter Page
(RTILINMM MainSetup) ( RTI LIN MultiMessage Blockset Reference).

416
MicroAutoBox Features May 2018
FlexRay Support

FlexRay Support

Purpose To connect MicroAutoBox to a FlexRay bus.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – ✓ – ✓ – ✓

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on FlexRay Support .................................................................... 418

Information in other sections

Basics of the FlexRay Configuration Tool ( FlexRay


Configuration Tool Guide)
Provides a short introduction to FlexRay networks and the FlexRay
Configuration Tool

Setting up a FlexRay Network ( FlexRay Configuration


Features)
Shows how you can work with the RTI FlexRay Configuration Blockset.

417
May 2018 MicroAutoBox Features
FlexRay Support

Real-Time Simulation with FlexRay Networks ( FlexRay


Configuration Features)
When the Simulink model is finished, you can build the real-time
application, download the code to the real-time system, and start the
simulation.

Basics on FlexRay Support

Characteristics The following MicroAutoBox variants provide up to 2 IP modules to connect to


FlexRay networks:
§ MicroAutoBox II 1401/1505/1507
§ MicroAutoBox II 1401/1507
§ MicroAutoBox II 1401/1511/1512
§ MicroAutoBox II 1401/1511/1514
§ MicroAutoBox II 1401/1512/1513
§ MicroAutoBox II 1401/1513/1514

For further information, refer to Basics on IP Module Support on page 421.

I/O mapping The following tables show the mappings of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the related I/O connector.

§ MicroAutoBox II 1401/1505/1507, MicroAutoBox II 1401/1507

Unit Channel Signal I/O Connector Pin


(Sub-D Connector)
IP Module 1 - Wake-up 11) 13
INH 11) 33
INH 21) 34
UBAT1) 35
FlexRay 1 I1_GND 1 15
FlexRay 1 high in/out (FlexRay-H) 16
FlexRay 1 low in/out (FlexRay-L) 17
Feed-through line positive 11) 38
Feed-through line negative 11) 39
FlexRay 2 I1_GND 2 18
FlexRay 2 high in/out (FlexRay-H) 19
FlexRay 2 low in/out (FlexRay-L) 20
Feed-through line positive 21) 36
Feed-through line negative 21) 37

418
MicroAutoBox Features May 2018
Basics on FlexRay Support

Unit Channel Signal I/O Connector Pin


(Sub-D Connector)
IP Module 2 - Wake-up 21) 52
INH 11) 72
INH 21) 73
UBAT1) 74
FlexRay 1 I2_GND 1 54
FlexRay 1 high in/out (FlexRay-H) 55
FlexRay 1 low in/out (FlexRay-L) 56
Feed-through line positive 11) 77
Feed-through line negative 11) 78
FlexRay 2 I2_GND 2 57
FlexRay 2 high in/out (FlexRay-H) 58
FlexRay 2 low in/out (FlexRay-L) 59
Feed-through line positive 21) 75
Feed-through line negative 21) 76
1) Available with DS1507-02-003
§ MicroAutoBox II 1401/1511/1512, MicroAutoBox II 1401/1511/1514,
MicroAutoBox II 1401/1512/1513, MicroAutoBox II 1401/1513/1514

Unit Channel Signal I/O Connector Pin


(DS1512 or DS1514
ZIF Connector)
IP Module 1 - Wake-up 1 C6
INH 11) (G5)
INH 21) (H6)
UBAT1) (H5)
FlexRay 1 I1_GND 1 L3
FlexRay 1 high in/out (FlexRay-H) M3
FlexRay 1 low in/out (FlexRay-L) M4
Feed-through line positive 11) (K6)
Feed-through line negative 11) (K5)
FlexRay 2 I1_GND 2 J3
FlexRay 2 high in/out (FlexRay-H) K3
FlexRay 2 low in/out (FlexRay-L) K4
Feed-through line positive 21) (J6)
Feed-through line negative 21) (J5)

419
May 2018 MicroAutoBox Features
FlexRay Support

Unit Channel Signal I/O Connector Pin


(DS1512 or DS1514
ZIF Connector)
IP Module 2 - Wake-up 2 S6
INH 11) (W5)
INH 21) (X6)
UBAT1) (X5)
FlexRay 1 I2_GND 1 a3
FlexRay 1 high in/out (FlexRay-H) b3
FlexRay 1 low in/out (FlexRay-L) b4
Feed-through line positive 11) (Z6)
Feed-through line negative 11) (Z5)
FlexRay 2 I2_GND 2 Y3
FlexRay 2 high in/out (FlexRay-H) Z3
FlexRay 2 low in/out (FlexRay-L) Z4
Feed-through line positive 21) (Y6)
Feed-through line negative 21) (Y5)
1) Do not connect, refer to Connecting to a FlexRay Bus ( MicroAutoBox II Hardware Installation and
Configuration).

Related topics References

Data Sheet MicroAutoBox II 1401/1505/1507 ( MicroAutoBox II Hardware


Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1507 ( MicroAutoBox II Hardware Installation
and Configuration)
Data Sheet MicroAutoBox II 1401/1511/1512 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1512/1513 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1513/1514 ( MicroAutoBox II Hardware
Installation and Configuration)

420
MicroAutoBox Features May 2018
IP Module Support

IP Module Support

Purpose MicroAutoBox equipped with FlexRay or CAN FD modules can be connected to a


FlexRay or CAN bus.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – ✓ – ✓ – ✓

Supported I/O board boot modes: not relevant

Basics on IP Module Support

Introduction The following MicroAutoBox variants provide up to 2 IP modules to connect


modules that support FlexRay or CAN FD:
§ MicroAutoBox II 1401/1505/1507
§ MicroAutoBox II 1401/1507
§ MicroAutoBox II 1401/1511/1512
§ MicroAutoBox II 1401/1511/1514
§ MicroAutoBox II 1401/1512/1513
§ MicroAutoBox II 1401/1513/1514

Various IP modules are supported, such as the DS4340 FlexRay Interface Modules
and the DS4342 CAN FD Interface Modules. Refer to FlexRay Support
on page 417 and CAN Signal Mapping on page 382. For information on how to

421
May 2018 MicroAutoBox Features
IP Module Support

connect the IP modules, refer to the MicroAutoBox Installation and


Configuration guide.

Note

Because the IP module connector is designed to run FlexRay or CAN FD, not
all of the IP modules‘ signals are available. The IP module hardware is
adapted to MicroAutoBox.

Note

Support of DS4340 FlexRay Interface Module:


§ MicroAutoBox II 1401/1505/1507 with board revision DS1507-02-003
and higher is prepared to be used with the DS4340 FlexRay Interface
Module. The enlarged signal mapping is described at FlexRay Support
on page 417.
§ If you want to use MicroAutoBox II 1401/1505/1507 with lower I/O board
revision number as stated above together with the DS4340 FlexRay
Interface Module, the hardware must be adapted by dSPACE.

Characteristics IP modules can be used as I/O devices to connect different carrier boards to the
outside world. The MicroAutoBox variants provide two IP modules.

MicroAutoBox Variant Number of IP Modules I/O Board to be Connected


MicroAutoBox II 1401/1505/1507 2 1507
MicroAutoBox II 1401/1507 2 1507
MicroAutoBox II 1401/1511/1512 2 1512
MicroAutoBox II 1401/1511/1514 2 1514
MicroAutoBox II 1401/1512/1513 2 1512
MicroAutoBox II 1401/1513/1514 2 1514

Up to 8 MB memory is available via byte or word addressing. Two clock rates, 8


and 32 MHz, allow a data rate of up to 64 MByte/s. Each module connected to
DS1507, DS1512 or DS1514 supports one interrupt.

RTLib user You have access to the IP modules via RTLib1401. For details, see IP Module
Access Functions ( MicroAutoBox RTLib Reference).

I/O mapping The complete pin description is available in the data sheet of your MicroAutoBox
variant in MicroAutoBox II Hardware Installation and Configuration.

422
MicroAutoBox Features May 2018
Basics on IP Module Support

Related topics Basics

FlexRay Support .................................................................................................................... 417

423
May 2018 MicroAutoBox Features
IP Module Support

424
MicroAutoBox Features May 2018
FPGA Support

FPGA Support

Introductione The FPGA Type 1 unit of the DS1512 or DS1514 I/O board provides an FPGA
module that can be used for implementing FPGA applications and integrating
them to your MicroAutoBox real-time application.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – – ✓ – ✓

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

General Information on the FPGA Support ........................................... 426


Provides information on hardware and software components relevant for
FPGA support.

Accessing the FPGA Type 1 Unit ........................................................... 427


There are some general FPGA access functions to be mentioned which
are independent from the implemented FPGA application.

425
May 2018 MicroAutoBox Features
FPGA Support

General Information on the FPGA Support

Hardware components The DS1512 or DS1514 I/O board of MicroAutoBox provides the FPGA Type 1
unit, that can be equipped with an I/O module (piggyback board).

The FPGA Type 1 unit is directly connected to the MicroAutoBox processor unit
via intermodule bus. For internal data exchange, there are up to 512 kB buffer
memory directly addressable on the FPGA Type 1 unit. For external data
exchange, there are up to 130 I/O pins mapped to the DS1512 or DS1514 ZIF I/O
connector of MicroAutoBox.

For a graphical overview on the DS1552 Multi‑I/O Module, refer to


MicroAutoBox with DS1552 Multi-I/O Module on page 37.

The FPGA Type 1 unit of the DS1512 and the DS1514 I/O boards have different
FPGA modules:
§ MicroAutoBox variants with DS1512: Xilinx® Spartan®-6 FPGA XC6SLX150
§ MicroAutoBox variants with DS1514: Xilinx® Kintex®-7 FPGA XC7K325T

Software components RTLib1401 includes C functions (fpga_tp1_xxx) to implement the


communication on the processor side and program the FPGA. For further
information, refer to Accessing the FPGA Type 1 Unit on page 427.

Using DS1552 Multi‑I/O Module You can use the RTI DS1552 I/O
Extension Blockset as a preconfigured FPGA application for the DS1552 Multi-
I/O Module. It provides further I/O channels for DS1511-like I/O features.
Alternatively, you can use the RTI FPGA Progamming Blockset with a
MicroAutoBox‑specific framework specified to implement custom FPGA
applications.
§ MicroAutoBox variant with DS1512 I/O board:
Use the FPGA1401Tp1 (LX150) with Multi‑I/O Module (DS1552)
framework.
§ MicroAutoBox variant with DS1514 I/O board:
Use the FPGA1401Tp1 (7K325) with Multi‑I/O Module (DS1552)
framework.

Using DS1554 Engine Control I/O Module You can use the RTI FPGA
Progamming Blockset with a MicroAutoBox‑specific framework specified to
implement custom FPGA applications.
§ MicroAutoBox variant with DS1514 I/O board:
Use the FPGA1401Tp1 (7K325) with Engine Control I/O Module (DS1554)
framework.

Note

You cannot use blocks from the RTI FPGA Programming Blockset configured
with one of the FPGA1401Tp1 frameworks and the RTI DS1552 I/O
Extension Blockset in the same model.

426
MicroAutoBox Features May 2018
Accessing the FPGA Type 1 Unit

Notes on DS1512 I/O Board's You can model custom FPGA applications for the DS1512 I/O Board
FPGA support (MicroAutoBox II 1401/1511/1512 and MicroAutoBox II 1401/1512/1513) only
with the XILINX® ISE Design SuiteTM.

Xilinx ISE software support discontinued Due to the introduction of


Vivado, Xilinx no longer supports the Xilinx System Generator for DSP in
combination with the ISE Design Suite after MATLAB Release R2013b. First, the
RTI FPGA Programming Blockset as of version 3.0 supports MATLAB R2014a and
higher, so it supports only Vivado. Second, Vivado does not support the FPGA of
the DS1512 I/O Board.
Therefore, only the RTI FPGA Programming Blockset up to version 2.9 supports
FPGA modeling for the DS1512 I/O Board.

Implementing existing custom FPGA applications The RTI FPGA


Programming Blockset let you use existing FPGA model INI files to build the
processor interface.
The blockset support is limited to the Processor-Build model mode. You cannot
simulate the processor interface.

Supported MicroAutoBox variants for custom FPGA modeling For


details on the dSPACE platforms supported by the RTI FPGA Programming
Blockset, refer to Hardware Supported by the RTI FPGA Programming Blockset
( RTI FPGA Programming Blockset Guide).

Related topics Basics

RTI FPGA Programming Blockset Guide

References

RTI DS1552 I/O Extension Blockset ( MicroAutoBox RTI Reference)

Accessing the FPGA Type 1 Unit

Introduction There are some general FPGA access functions to be mentioned which are
independent from the implemented FPGA application.

General information on the Module initialization Before the initialization of the FPGA Type 1 module,
access functions the processor board must be initialized and an FPGA application must be
running. Because the module initialization is terminated if there is no FPGA
application running, one must be programmed beforehand or loaded to the flash
memory of the FPGA module. Module initialization succeeds only if the FPGA
application is compatible with the processor application.

427
May 2018 MicroAutoBox Features
FPGA Support

Identification To avoid hardware damage, the components used (processor


application, FPGA application, FPGA framework, piggyback module) must be
compatible with each other. To check their compatibility, their identifiers can be
read and compared using the identification functions.

Interrupt handling The FPGA Type 1 module provides 8 interrupt channels


which you can handle using the RTLib interrupt functions, refer to Interrupt
Functions ( MicroAutoBox RTLib Reference).

Data exchange With the RTLib, you can implement the processor's read and
write access to the data storage that is defined in the FPGA framework. Data
exchange with the FPGA application requires data type conversion, which is
configured by the scaling and mode parameters.
The FPGA Type 1 module provides the following channel types and channel
numbers:
§ 32 Buffer In channels
§ 32 Buffer Out channels
§ 128 Register In channels
§ 128 Register Out channels
The maximum number of elements in a buffer is specified in the FPGA
framework. The configuration of a buffer is valid for all its elements. Buffers are
accessed sequentially from the FPGA.
A register has a data width of 32 bits. You can specify groups of registers, which
can be accessed synchronously by the FPGA. Each register in a group is
configured separately.

Programming The FPGA application that you build, must be programmed to


the FPGA. You can do this by loading it into the flash memory of the FPGA
module or into the RAM of the FPGA. While the RAM of the FPGA must be
programmed on each power up, the flash application is automatically loaded to
the FPGA when you power up the board. Autobooting from flash can be
disabled.

Note

You can choose the autoboot state on the FPGA Type 1 page of the
MicroAutoBox II Configuration Tool.
Note, that you can set the autoboot state only, if you have exclusive access
to the connected board.
For further information on the tool, refer to How to Change the IP Address
of MicroAutoBox ( MicroAutoBox II Hardware Installation and
Configuration).

The FPGA application is represented by a programming data structure that


contains the bitstream and further relevant information. For further information,
refer to FPGA Programming Functions ( MicroAutoBox RTLib Reference)

RTLib and RTI FPGA These access functions are available via RTLib, refer to FPGA Module Access
Programming Blockset Functions ( MicroAutoBox RTLib Reference).

428
MicroAutoBox Features May 2018
Accessing the FPGA Type 1 Unit

If you have installed the RTI FPGA Programming Blockset, you can also use its
Processor Interface sublibrary to implement the FPGA access functions, for
example, the data access between the processor model and the FPGA model.
With the PROC_SETUP_BL block, you can manage your FPGA applications.
Internally, these RTI blocks are using the RTLib functions for the FPGA Type 1
unit.

429
May 2018 MicroAutoBox Features
FPGA Support

430
MicroAutoBox Features May 2018
Serial Interface

Serial Interface

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

– ✓ ✓ – ✓ ✓ – ✓ DS1514

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics on Serial Interface ...................................................................... 431

Specifying the Baud Rate of the Serial Interface ................................... 434


Provides information on the baud rate that you can specify for the
board's serial interface.

Basics on Serial Interface

Characteristics MicroAutoBox is equipped with a serial interface with two channels. These
channels are fixed to interface types that have different maximum baudrates, see
the following table:

431
May 2018 MicroAutoBox Features
Serial Interface

Channel Interface Max. Baudrate


Channel 0 (Serial 1) RS232 115.2 kBaud
Channel 1 (Serial 2) K line 50 kBaud

For details, see Specifying the Baud Rate of the Serial Interface on page 434.

The MicroAutoBox variants provide one, two or three CAN_TP1 modules. If there
are two or three modules, they can be used either for serial communication or
for LIN.

MicroAutoBox Variant Number of CAN_TP1


Modules
MicroAutoBox II 1401/1501 1
MicroAutoBox II 1401/1504 1
MicroAutoBox II 1401/1505/1507 2
MicroAutoBox II 1401/1507 2
MicroAutoBox II 1401/1511 2
MicroAutoBox II 1401/1511/1512 2
MicroAutoBox II 1401/1511/1514 2
MicroAutoBox II 1401/1512/1513 3
MicroAutoBox II 1401/1513 3
MicroAutoBox II 1401/1513/1514 3

I/O mapping The following tables show the mappings of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the related I/O connector.

§ MicroAutoBox II 1401/1501, MicroAutoBox II 1401/1504

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(ZIF Connector)
CAN_TP1 Module 1 0 Serial 1 TXD out U5
Serial 1 RXD in U6
2 1 Serial 2 K U3
Serial 2 L U4
§ MicroAutoBox II 1401/1507, MicroAutoBox II 1401/1505/1507

Unit RTI Channel RTLib Channel Signal I/O Connector Pin


(Sub-D Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out 7
Serial 1 RX in 8
2 1 Serial 2 K 10
Serial 2 L 11
CAN_TP1 Module2 1 0 Serial 3 TX out 46
Serial 3 RX in 47
2 1 Serial 4 K 49
Serial 4 L 50

432
MicroAutoBox Features May 2018
Basics on Serial Interface

§ MicroAutoBox II 1401/1511, MicroAutoBox II 1401/1511/1512,


MicroAutoBox II 1401/1511/1514

Unit RTI Channel RTLib Signal I/O Connector Pin


Channel (DS1511 ZIF Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out c5
Serial 1 RX in c6
2 1 Serial 2 K b5
Serial 2 L b6
CAN_TP1 Module2 1 0 Serial 3 TX out B5
Serial 3 RX in B6
2 1 Serial 4 K A5
Serial 4 L A6
§ MicroAutoBox II 1401/1512/1513, MicroAutoBox II 1401/1513,
MicroAutoBox II 1401/1513/1514

Unit RTI Channel RTLib Signal I/O Connector Pin


Channel (DS1513 ZIF Connector)
CAN_TP1 Module1 1 0 Serial 1 TX out c5
Serial 1 RX in c6
2 1 Serial 2 K b5
Serial 2 L b6
CAN_TP1 Module2 1 0 Serial 3 TX out B5
Serial 3 RX in B6
2 1 Serial 4 K A5
Serial 4 L A6
CAN_TP1 Module3 1 0 Serial 5 TX out P5
Serial 5 RX in P6
2 1 Serial 6 K N5
Serial 6 L N6

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

433
May 2018 MicroAutoBox Features
Serial Interface

§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware


Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Specifying the Baud Rate of the Serial Interface

Oscillator frequency The serial interface of MicroAutoBox is driven by an oscillator with a frequency
fosc = 3.6864 MHz.

Baud rate range Depending on the selected transceiver mode, you can specify the baud rate for
serial communication with MicroAutoBox in the following range:

Mode Baud Rate Range


RS232 5 … 115,200 baud
K-line 5 … 38,400 baud

Available baud rates Using RTI and RTLib, you can specify any baud rate in the range listed above.
However, the baud rate used by MicroAutoBox depends on the oscillator
frequency fosc since the baud rate is a fraction of fosc. The available baud rates
can be calculated according to

f = fosc / (16 · n),

where n is a positive integer.

When you specify a baud rate in RTI or RTLib, the closest available baud rate is
actually used for serial communication. For example, if you specify 20,000 baud
as the baud rate, the baud rate used is 19,200 baud.

434
MicroAutoBox Features May 2018
Single Edge Nibble Transmission (SENT) Support

Single Edge Nibble Transmission (SENT) Support

Introduction You can implement the SENT protocol on MicroAutoBox using RTI blocks or
RTLib functions.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – ✓ –

Supported I/O board boot modes: not relevant

Where to go from here Information in this section

Basics of the SENT Protocol .................................................................. 436


Provides basic information on the SENT (single edge nibble transmission)
protocol.

Basics on SENT Diagnostic Information ................................................ 439


Provides information on the diagnostic information of a received
message.

Using the SENT Protocol on MicroAutoBox .......................................... 440


Provides general information on implementing the SENT protocol.

Implementing SENT Receivers in Simulink ............................................ 444


Provides information on how you can implement a SENT receiver in a
Simulink model.

435
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Implementing SENT Receivers Using RTLib Functions ............................ 447


Provides information on the parameters for a SENT receiver and explains
how you can implement it in a handcoded model.

Basics of the SENT Protocol

Basics SENT (Single Edge Nibble Transmission) is a protocol used between sensors and
ECUs. It is defined in the SAE J2716 standard defined by the Society of
Automotive Engineers (SAE). It is used to transmit data of high-resolution (10 bits
or more) sensors as an alternative to an analog interface. The sensor signal is
transmitted as a series of pulses with data encoded as the distance between two
consecutive falling edges.

SENT connection The following illustration shows the connection of a sensor to an ECU for using
the SENT protocol. Usually, three lines (VDD, Data, GND) are used to connect ECU
and sensor. VDD and GND is the power supply for the sensor (usually 5 V), the
Data line is used to transmit the SENT messages.
ECU Sensor

VD D VD D

Data in Data out

GND GND

Signal of a SENT message Every SENT message consists of a sync (synchronization) pulse followed by one or
more nibble pulses. A nibble represents 4 bit. For regular SENT specification, the
first nibble is a status nibble and the last nibble is a CRC nibble. All other nibbles
contain data information.

An optional pause pulse (transmitted at the end of the SENT message) can be
used, for example, to create SENT messages with a constant length.

The number of nibbles (nibble count), including the status and CRC nibble
pulses, is constant for one specific SENT sensor but can vary between different
sensors.

436
MicroAutoBox Features May 2018
Basics of the SENT Protocol

Data information is transmitted via the length of nibble pulses. One SENT nibble
pulse consists of one low pulse and one high pulse. The value of a nibble is
encoded by the length of a nibble pulse.

The following illustration shows a SENT message with relevant timings and
nibble pulses transferring the values 0, 7 and 15 and a pause pulse with a value
of 100.

Zero nibble high pulse


+ 100 x tick period
Zero nibble Zero nibble high pulse Zero nibble high pulse
high pulse + 7 x tick period + 15 x tick period
Low pulse Low pulse Low pulse

Sync high pulse

Sync pulse

Nibble pulse Nibble pulse Pause pulse


Nibble pulse (value 7) (value 15) (value 100)
(value 0) (optional)

Tick period The lengths of the pulses are based on a clock rate, the tick period. Every SENT
pulse is a multiple of this pulse duration. The standard value is 3 μs.

At the beginning of each message, the SENT transmitter sends a sync pulse of a
defined number of tick periods. The SENT receiver measures the length of the
sync pulse and calculates the current length of the transmitter tick period.

Tick period tolerance (clock drift) A percentage that defines the maximum
possible clock drift of a SENT transmitter. The standard value is up to ±20%.

Pulses of a SENT message A SENT message provides the following pulses.

SENT pulse A digital signal pulse consisting of a low pulse and a high pulse.
There are three different types of SENT pulses, a sync pulse, a nibble pulse and a
pause pulse. The meaning of a SENT pulse is detected by its pulse duration and
its position in the message. The pulse length is measured between two
consecutive falling edges.

Low pulse A pulse that marks the beginning of every SENT pulse. Its length is
defined by the number of tick periods. The standard value is 5 tick periods.

High pulse The active part of a SENT pulse. It has two different purposes
(zero nibble high pulse, sync high pulse). Its length is defined by the number of
tick periods.

Sync high pulse The high part of a SENT synchronization pulse. Its length is
defined by the number of tick periods. The standard value is 51 tick periods.

437
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Zero nibble high pulse The high part of a SENT nibble pulse with a value of
0. Its length is defined by the number of tick periods. The standard value is 7 tick
periods.

Sync pulse The beginning of every SENT message. It consists of a low pulse
followed by a sync high pulse. Its length is defined by the number of tick periods.
The pulse length must be longer than the maximum possible duration of a nibble
pulse.

Nibble pulse A SENT pulse consisting of a low pulse and a specific high pulse
with a minimum length of zero nibble high pulse. The nibble pulse length is
defined by the number of tick periods. Every nibble pulse transmits the
information of four bits. The pulse length is measured between two consecutive
falling edges.

Pause pulse An optional fill pulse consisting of one low pulse and one high
pulse with the variable length of n tick periods. It is transmitted at the end of a
SENT message after the CRC nibble pulse. The pause pulse can be used, for
example, to create SENT messages with a constant number of tick periods.

Maximum time between two If data is lost, the reason might be that the time between two read operations,
read operations i.e., executions of the DIO_TYPE3_SENT_RX_BLx block, is too long. The
maximum time between two read operations without data loss can be calculated
as follows:

TRead, max = Expected number of messages · TMessage, min


TMessage, min = [(LowTics + SyncHighTics) + NibbleCount · (LowTics +
(without pause pulse) ZeroNibbleHighTics)] · [(1 - CD) · TicPeriod]
TMessage, min = [(LowTics + SyncHighTics) + (NibbleCount + 1) · (LowTics +
(with pause pulse) ZeroNibbleHighTics)] · [(1 - CD) · TicPeriod]
TRead, max: Maximum time between two consecutive read operations without loss of data.
TMessage, min: Minimum possible message duration
LowTics: Number of ticks for a low pulse
SyncHighTics: Number of ticks for a synchronization high pulse
NibbleCount: Number of nibbles included in every SENT message
ZeroNibbleHighTics: Number of ticks for the high part of a SENT nibble pulse with a value of 0.
CD: Clock drift (tick period tolerance)
TicPeriod: Tick period

Example:

The following table shows some values of TRead,max. for different SENT message
data if Expected number of messages = 20 and pause pulse mode is disabled:

TicPeriod Tics NibbleCount CD TRead, max.


SyncHigh ZeroNibbleHigh Low
1 μs 51 7 5 6 0.2 2.0 ms
3 μs 51 7 5 6 0.2 6.1 ms
3 μs 51 7 5 10 0.2 8.4 ms
3 μs 51 7 5 6 0.3 5.3 ms

438
MicroAutoBox Features May 2018
Basics on SENT Diagnostic Information

If the time between the read operation is higher than TRead, max, the message
buffer might not be able to store all the received messages and the newest
messages get lost.

Tip

If pause mode is enabled, and a fixed message length > 0 has been
specified, TRead, max can be calculated as follows:

TRead, max = ExpectedMsgLen · TicPeriod · (1 - CD)

Basics on SENT Diagnostic Information

Introduction The Diagnostic parameter/outport provides a diagnostic word for each received
message. The diagnostic word consists of flags for different message-specific
status and diagnostic information.

Diagnostic flags The flags of the diagnostic word have the following meanings:

Bit Value Description


0 1 Too many nibbles in message.
This value is returned when too many nibbles are received in a message. Each message is stored with
the number of nibbles as specified by the Number of nibbles (incl. status, CRC) block parameter or
NibbleCount function parameter. The surplus nibbles are not stored in the message but used for
diagnostics. For example, the Nibble value is out of range flag is also set if one of the surplus nibbles
have a nibble value >15.
1 2 Too few nibbles in message.
This value is returned when a message with too few nibbles is received. The missing nibbles are marked
with a value of "-128" (RTLib: DIO_TP_SENT_RX_MISSING_NIBBLE). This ensures that each message is
stored with the number of nibbles as specified by the Number of nibbles (incl. status, CRC) block
parameter or NibbleCount function parameter.
2 4 Nibble value is out of range [0 … 15].
This value is returned when a nibble with a value <0 or >15 is received. The nibble is saved to the data
buffer anyway.
3 8 Synchronization pulse too long.
This value is returned when a synchronization pulse is larger than the upper limit of the expected tick
period specified by the Tick period and Tick period tolerance block parameters or the TickPeriod
and ClockDrift function parameters. The nibble values are evaluated despite this, but the result will be
erroneous.
4 16 Synchronization pulse too short.
This value is returned when a synchronization pulse is shorter than the lower limit of the expected tick
period specified by the Tick period and Tick period tolerance block parameters or the TickPeriod
and ClockDrift function parameters. The nibble values are evaluated despite this, but the result will be
erroneous.

439
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Bit Value Description


5 32 The current synchronization pulse differs from the last synchronization pulse by a factor of more than
1/64.
The last received message has to be ignored.
6 64 Message has not the expected length.
This value is returned when the pause pulse option is enabled and a fixed message length is specified.
The diagnostic information occurs if the length of the received message differs from the specified
expected message length.
7 128 Deviation of sync pulse to message length ratio too high.
This value is returned when the pause pulse option is enabled and a fixed message length is specified.
The diagnostic information occurs if the ratio from sync pulse and fixed message length differs by a
factor of more than 1/64.

Using the SENT Protocol on MicroAutoBox

Introduction You can implement the SENT (single edge nibble transmission) protocol on
MicroAutoBox using RTI blocks or RTLib functions.

Receiving SENT messages on There are four independent SENT receivers on MicroAutoBox. Each of the
MicroAutoBox available digital inputs on the DIO Type 3 or DIO Type 4 units can be specified as
a data channel for SENT receiver.

The CRC nibble and the status nibble of a SENT message are not evaluated by
the receiver. You must evaluate them in your model.

Electrical connection A SENT receiver is connected to the SENT transmitter


via three lines:
§ VDD line:
The VDD line provides the power supply for the sensor, usually 5 V.
§ GND line:
The GND line must be connected to the ground of the power supply used and
the GND of MicroAutoBox.
§ Data line:
The data line must be connected to the channel which is used for receiving.
To use the electrical connection, some configuration must be done via software,
see Implementing SENT Receivers in Simulink on page 444 or Implementing SENT
Receivers Using RTLib Functions on page 447.

Range of pulse length MicroAutoBox can measure low pulses and high pulses in the range
300 ns … 209 ms divided into eight subranges. The connected transmitter has to
match the selected range, otherwise data gets lost or pulses cannot be decoded
correctly.

440
MicroAutoBox Features May 2018
Using the SENT Protocol on MicroAutoBox

Range Number Pulse Length Range Resolution


1 300 ns … 1.63 ms 50 ns
2 600 ns … 3.27 ms 100 ns
3 1.2 µs … 6.55 ms 200 ns
4 2.4 µs … 13.1 ms 400 ns
5 4.8 µs … 26.2 ms 800 ns
6 9.6 µs … 52.4 ms 1.6 µs
7 19.2 µs … 104 ms 3.2 µs
8 38.4 µs … 209 ms 6.4 µs

Note

The measurement resolution depends on the selected pulse length range.

To get the best possible resolution of the measured pulses, you should select
the range with the best possible resolution (the pulse length range with the
lowest possible range number). For example, if your desired pulse length is
3 µs, you should use pulse length range 1 (300 ns … 1.63 ms) rather than
pulse length range 2 (600 ns … 3.27 ms).

I/O mapping For MicroAutoBox variants with DS1511 I/O board The following table
shows the mapping of the channel numbers, as used in RTI and RTLib, to the
related I/O pins of the MicroAutoBox I/O connector (DS1511 ZIF connector):

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3

441
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

For MicroAutoBox variants with DS1513 I/O board The following table
shows the mapping of the channel numbers, as used in RTI and RTLib, to the
related I/O pins of the MicroAutoBox I/O connector (DS1513 ZIF connector):

442
MicroAutoBox Features May 2018
Using the SENT Protocol on MicroAutoBox

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5
2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Note

Concurrent access to the same digital input channel by other DIO Type 3 or
DIO Type 4 blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

443
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Implementing SENT Receivers in Simulink

Introduction RTI provides one block for implementing a SENT receiver in a Simulink model.
The DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block reads the
messages stored in the receive FIFO so that their nibbles are available in the
Simulink model.

Configuring the channels To configure channels for receiving SENT messages defined by the SENT
specification, you must perform some preparatory steps.
§ The channels must be connected to the SENT transmitters, see Using the SENT
Protocol on MicroAutoBox on page 440.
§ For each channel which is used as a SENT receiver, drag a
DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block into your
Simulink model and specify the module number, port and channel on the Unit
page.

Specifying the properties of a The properties of a SENT signal are specified on the RX Parameters page of the
SENT signal DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block.

Tick period The expected pulse length of the tick period and the tick period
tolerance can be specified on the RX Parameters page. This is the base clock
every SENT pulse is generated with. As MicroAutoBox calculates the current tick
period of the transmitter whenever a message is received, the block can set an
error flag if the tick period is outside the specified tolerance.

Low pulse, zero nibble high pulse, sync high pulse These SENT-specific
configurable parameters are defined by a number of tick periods on the RX
Parameters page.

Pause pulse If the messages to be received are containing pause pulses, you
can configure the SENT receiver block to treat the last pulse of a SENT message
as a pause pulse. Because SENT transmitters usually use pause pulses to achieve
a constant message length, you can specify the expected length of a message on
the RX Parameters page. However, a pause pulse can also be detected, if
checking the message length is disabled (message length is set to 0).

Receiving messages and Expected number of messages You have to specify the number of SENT
nibbles messages which can be stored in the receive FIFO. This number also defines the
size of the DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block's
receive FIFO. If the receive FIFO runs full, the newest messages are lost. The FIFO
will not be overwritten by new input data. In addition an appropriate error flag is
set. The number of messages which are currently stored in the receive FIFO is
indicated by the Count outport.

Number of nibbles The number of nibbles includes the status nibble and
CRC nibble which are treated as data nibbles. The DIO_TYPE3_SENT_RX_BLx or
DIO_TYPE4_SENT_RX_BLx block gets outports for each nibble. The Nibble n

444
MicroAutoBox Features May 2018
Implementing SENT Receivers in Simulink

outport gives a vector with the nibble values of all received messages at the n
position. The signal connected to the Nibble outports must be a vector with a
length of the specified expected number of messages. However, the number of
nibbles at a Nibble outport matches only the number of messages which are
actually received (and indicated by the Count outport).

Read mode The block supports different ways of reading messages:


§ The block reads all new complete received messages and diagnostic
information from the receive FIFO since the last read operation.
§ The block reads the most recent message and diagnostic information from the
receive FIFO. The receive FIFO is then cleared.

Example The following illustration shows an example of a SENT receiver.

In the example the messages have two nibbles. Three messages are read from
the receive FIFO. The first message has the nibble values 4 and 7, the second
message has 5 and 8. The third message has only one nibble with the value 6.
For the missing nibble, a value of '-128' is returned and the error flag in the
vector of the Diagnostic outport is set.

Reading received SENT During run time, your application can read the received messages stored in the
messages receive FIFO in two different ways:
§ Reading periodically triggered by a timer task
During run time the timer task calls the DIO_TYPE3_SENT_RX_BLx or
DIO_TYPE4_SENT_RX_BLx block. This has to be done periodically, for
example, every 1.5 ms. To avoid losing received messages, the model cycle
should not be longer than the maximum recommended time. For details, refer
to Avoiding data loss on page 446.
The block transfers the new data received since the last read operation to the
model. In addition a diagnostic word with diagnostic information is created for
each received SENT message. For details, refer to Basics on SENT Diagnostic
Information on page 439.
§ Reading asynchronously triggered by an interrupt
To use this method you have to enable interrupt generation by the Enable
Interrupt parameter of the block. You can specify this option on the
Interrupt page.

445
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

In this case, an interrupt is generated on MicroAutoBox after a certain number


of SENT messages were received, and stored in the receive FIFO. Inside the
interrupt service routine, the DIO_TYPE3_SENT_RX_BLx or
DIO_TYPE4_SENT_RX_BLx block can be called to transfer the received
message (including diagnostic information) to the model. You can specify the
transfer interval via the Number of messages to trigger interrupt
parameter.
For example, if Number of messages to trigger interrupt is set to 6, an
interrupt is triggered on MicroAutoBox after the reception of every 6th
message and these last 6 received SENT messages are transferred to the model
with the block call.

Avoiding data loss To avoid losing received messages due to a full receive FIFO, the
DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block must be
executed periodically.

If the receive FIFO runs full, the newest messages are lost. The FIFO will not be
overwritten by new input data. In addition an appropriate error flag is set. This
leads to loss of nibbles or messages. When the DIO_TYPE3_SENT_RX_BLx or
DIO_TYPE4_SENT_RX_BLx block is executed (for example, in a timer task), the
block's receive FIFO is read out and new messages can be received again. The
receive FIFO can store as many complete SENT messages as specified by the
Expected number of messages (FIFO size) parameter.

Maximal number of messages The number of messages that can be


maximally buffered between two read operations can be calculated as follows:

NMessagesMax = RoundDown(4096 / (NNibbles + 1 + PausePulseEnabled))

With
NMessagesMax Number of messages which can maximally be buffered
NNibbles Number of nibbles in each message
PausePulseEnabled § 0, if Pause mode is disabled
§ 1, if Pause mode is enabled

Maximum time between two read operations If data gets lost, the time
between two read operations is too long. The allowed maximum time between
two read operations without loss of messages can be calculated as described in
Basics of the SENT Protocol on page 436.

Getting diagnostic The DIO_TYPE3_SENT_RX_BLx or DIO_TYPE4_SENT_RX_BLx block has three


information outports which give you status or further information. The outports are optional
and must be enabled on the Advanced page.

Tick period The Tick Period outport provides the actual tick period which is
calculated from the last received valid synchronization pulse.

Diagnostic The Diagnostic outport provides a diagnostic word for each


received message. The diagnostic word consists of flags for different message-

446
MicroAutoBox Features May 2018
Implementing SENT Receivers Using RTLib Functions

specific status and diagnostic information. For details on the diagnostic flags,
refer to Basics on SENT Diagnostic Information on page 439.

Error The Error outport provides information on the current read operation.
The values have the following meanings:
§ 0: No data loss
§ 1: Data loss, more messages were received than expected
§ 2: Timeout, a SENT pulse was longer than the maximum measurable pulse
length
§ 3: Combination of data loss and timeout

Related topics References

DIO_TYPE3_SENT_RX_BLx ( MicroAutoBox RTI Reference)


DIO_TYPE4_SENT_RX_BLx ( MicroAutoBox RTI Reference)

Implementing SENT Receivers Using RTLib Functions

Channel configuration To configure channels for receiving SENT messages defined by the regular SENT
specification, you must perform some preparatory steps:
§ The channels must be connected to the SENT transmitters, see Using the SENT
Protocol on MicroAutoBox on page 440.
§ The following functions must be called beforehand when you use a
MicroAutoBox variant with DS1511 I/O board:
§ dio_tp3_init
§ Optional: dio_tp3_single_source_int_mode_set or
dio_tp3_multi_source_int_mode_set
The following functions must be called beforehand when you use a
MicroAutoBox variant with DS1513 I/O board:
§ dio_tp4_init
§ Optional: dio_tp4_single_source_int_mode_set or
dio_tp4_multi_source_int_mode_set

Configuration of a SENT Every SENT receiver must be configured with the following parameters before
receiver receiving messages:

Parameter Type Description


NibbleCount Initialization Defines the number of nibbles per SENT message. This number is constant
and is set during initialization of the SENT receiver in the range 1 … 64.
LowTickCount Initialization Defines the length of a low pulse in ticks in the range 1 … 15. The
standard value is 5 tick periods.

447
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

Parameter Type Description


SyncHighTickCount Initialization Defines the length of the high pulse of a synchronization pulse in ticks in
the range 1 … 255. The standard value is 51 tick periods.
ZeroNibbleHighTickCount Initialization Defines the high pulse length of a nibble with value 0 in ticks in the range
1 … 15. The standard value is 7 tick periods.
TickPeriod Initialization Defines the expected length of a tick period of a SENT pulse in seconds.
This is the base clock every SENT pulse is generated with in the range
300 ns … 200 µs, and a resolution of 50 ns up to 6.4 µs. The standard tick
period value is 3 μs.
ClockDrift Initialization Defines the tick period tolerance (clock drift) that the SENT receiver accepts
as valid drift. Synchronization pulses and nibble pulses are recognized as
valid pulses within this range. Pulses outside this specified range are
recognized as invalid synchronization pulses or as nibble pulses with an
unexpected value. When an invalid synchronization pulse is received, the
current message is not stored and the receiver waits for the next valid
synchronization pulse. The diagnostic port reports an invalid
synchronization pulse. The range of clockdrift is 0 … 0.5. The standard
value is 0.2 (±20%).
Range Initialization Defines the pulse range of the SENT receiver within the range
400 ns … 209 ms divided into eight subranges.
InterruptRate Initialization Defines the number of messages after an interrupt is generated. The value
is in the range 1 … 128 messages. The value must be less than the number
of expected messages.
PauseMode Initialization Defines whether pause pulses are to be considered in the received SENT
messages.
FixedMsgLength Initialization Defines the fixed message length of each message. The value is relevant
only, if pause mode is enabled. A pause pulse is detected even if you set
the fixed message length to 0. This means, that no fixed message length is
expected.

Continuous reception of The SENT specification requires continuous reception of messages. To avoid
messages losing received messages due to a full input buffer, regular execution of the
receive functions is required. If a receive buffer runs full, all further pulses are
ignored. This leads to loss of nibbles or messages. When a read operation is
executed, the receive buffer is read out and new messages can be received
again. The internal FIFO can store a maximum of 4096 pulses each with a high
part and a low part.

If data gets lost, the time between two read operations is too long. The allowed
maximum time between two read operations without loss of messages can be
calculated as described in Basics of the SENT Protocol on page 436.

Format of messages Messages are delivered to the model as a vector of Int8 rx_data[100].

Int8 rx_data[100];

448
MicroAutoBox Features May 2018
Implementing SENT Receivers Using RTLib Functions

The driver writes received nibbles to the data buffer one after the other from the
first nibble of the first message to the last nibble of the last message. The vector
looks like this (nibble_count is the number of nibbles per message):
rx_data[0] Message 1, nibble 1
rx_data[1] Message 1, nibble 2
... ...
rx_data[NibbleCount - 1] Message 1, nibble NibbleCount
rx_data[NibbleCount] Message 2, nibble 1
... ...
rx_data[2*NibbleCount - 1] Message 2, nibble NibbleCount
... ...
rx_data[(msg - 1) * NibbleCount + (nib - 1)] Message msg, nibble nib

The format for a 2-dimensional vector looks like this:

Int8 rx_data[NumMsg][NibbleCount];

The vector looks like this (NibbleCount is the number of nibbles per message):
rx_data[0][0] Message 1, nibble 1
rx_data[0][1] Message 1, nibble 2
... ...
rx_data[0][NibbleCount - 1] Message 1, nibble NibbleCount
rx_data[1][0] Message 2, nibble 1
... ...
rx_data[1][NibbleCount - 1] Message 2, nibble NibbleCount
... ...
rx_data[msg - 1][nib - 1] Message msg, nibble nib

Modes of receiving messages The SENT receivers support two different modes of reading messages:
§ Read All Mode:
If the ReadMode parameter of the dio_tp3_sent_rx_receive function is set
to DIO_TP3_SENT_RX_RECEIVE_ALL or the parameter of the
dio_tp4_sent_rx_receive function is set to
DIO_TP4_SENT_RX_RECEIVE_ALL, this function reads all new messages
received since the last read operation. When no complete new message is
available, nothing is returned and the ReceivedMsgCount parameter is 0.

449
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

To avoid writing more messages to the user data buffer than memory was
allocated, the ExpMsgCount parameter is used. This parameter indicates the
maximum number of messages that are written to the Data buffer. If the
number of received messages exceeds ExpMsgCount, writing data to user
buffer is aborted and the remaining messages are discarded to avoid an
overflow of the internal data buffer. This is reported by a return value of
DIO_TP3_SENT_RX_DATA_LOSS or DIO_TP4_SENT_RX_DATA_LOSS. If loss of
data is recognized, the model cycle of reading SENT messages is too long. The
model cycle should not be longer than the maximum recommended time (see
Continuous reception of messages on page 448).
§ Most Recent Mode:
If the ReadMode parameter of the dio_tp3_sent_rx_receive function is set
to DIO_TP3_SENT_RX_RECEIVE_MOST_RECENT or the parameter of the
dio_tp4_sent_rx_receive function is set to
DIO_TP4_SENT_RX_RECEIVE_MOST_RECENT, this function reads the
newest complete message. If no message was received at all, a message with
all nibbles marked as missing nibbles DIO_TP3_SENT_RX_MISSING_NIBBLE or
DIO_TP4_SENT_RX_MISSING_NIBBLE (-128) is returned and the
ReceivedMsgCount parameter is 0.

Reading of received SENT During run time, your application can read the received messages stored in the
messages data buffer in two different ways:
§ Reading triggered by a timer task
During run time the timer task calls a SENT receive function, for example, the
dio_tp3_sent_rx_receive function. This is done periodically. To avoid
losing received messages, the sample time should not be longer than the
maximum recommended cycle time. For details, refer to Continuous reception
of messages. The function transfers all new messages received since the last
read operation to the model. A diagnostic word is also created for each
received SENT message.
§ Reading triggered by an interrupt
To use this method, you have to enable interrupt generation by the IntMode
parameter during initialization. In this case, an interrupt is generated on
MicroAutoBox after the specified number of SENT messages is received and
stored in the receive FIFO. In the interrupt service routine, the
dio_tp3_sent_rx_receive or dio_tp4_sent_rx_receive function can
be called to transfer the received message including diagnostic information to
the model. You can implement downsampling by specifying the
InterruptRate parameter. The interrupt rate may not exceed the specified
value of the ExpMsgCount parameter.
For example, if InterruptRate is set to 6, an interrupt is triggered on
MicroAutoBox after every 6th message and these last 6 received SENT
messages are transferred to the model by the dio_tp3_sent_rx_receive or
dio_tp4_sent_rx_receive function call.

RTLib functions For information on the RTLib functions used for programming a SENT receiver,
refer to Single Edge Nibble Transmission (SENT) on the DIO Type 3

450
MicroAutoBox Features May 2018
Implementing SENT Receivers Using RTLib Functions

( MicroAutoBox RTLib Reference) or Single Edge Nibble Transmission (SENT) on


the DIO Type 4 ( MicroAutoBox RTLib Reference).

Related topics Basics

Using the SENT Protocol on MicroAutoBox ........................................................................... 440

References

dio_tp3_sent_rx_init ( MicroAutoBox RTLib Reference)


dio_tp3_sent_rx_receive ( MicroAutoBox RTLib Reference)

451
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support

452
MicroAutoBox Features May 2018
Serial Peripheral Interface

Serial Peripheral Interface

Introduction MicroAutoBox provides a serial peripheral interface (SPI) that can be used to
perform high‑speed synchronous communication with devices connected to the
MicroAutoBox Base board, such as an A/D converter.

Where to go from here Information in this section

Serial Peripheral Interface on the DIO Type 1 Unit ................................ 453

Serial Peripheral Interface on the DIO Type 3 Unit ................................ 456

Serial Peripheral Interface on the DIO Type 4 Unit ................................ 464

Serial Peripheral Interface on the DIO Type 1 Unit

Introduction Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

453
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

Characteristics The slave DIO MC of the DS1401 features a serial peripheral interface (SPI). The
SPI can be used to perform high‑speed synchronous communication with devices
connected to the DS1401, such as an A/D converter.

The SPI transfers serial bit streams of selectable length (8 … 16 bits per word)
and transfer rate (39.2 Kbaud … 100 Kbaud) from and to external devices. The
transfer rate for serial data transmission is defined via the SCK signal. This
triggers the data transfer between the SPI and a connected external device. Data
can be transferred on either the rising or falling edge, with or without delay (only
standard delay). The pins to be used are MOSI (master out - slave in) and MISO
(master in - slave out).

Note

§ The SPI can be processed only in master mode. It is unable to respond to


any externally initiated serial transfers.
§ SPI signals are normally TTL signals. Because of MicroAutoBox's output
stages, the signal voltage depends on the VDRIVE voltage, in cars, this is
normally VBat (12 V). In this case, the SPI signals of MicroAutoBox cannot
be directly connected to the external device.

The SPI supports the following features:


§ Peripheral chip selects (PCS); four peripheral chip-select pins allow to access up
to 16 independent peripherals by decoding the four peripheral chip-select
signals.
§ Wraparound transfer mode; allows you automatic cyclic data transfer via the
SPI. Wraparound simplifies interfacing, for example, with A/D converters.
§ Programmable transfer length; allows to specify the number of bits to be
transferred within the range 8 … 16 bits. For example, if you want to access a
10-bit A/D converter, you can use a 10-bit transfer length.

454
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 1 Unit

§ Programmable transfer delay; lets you program an inter-transfer delay within


the range 1.6 μs … 408 μs. For example, an A/D converter requires time
between two data transfers to complete a new conversion.

Master mode In the master mode, the SPI determines the transfer rate via the SCK signal. The
data to be transferred from the SPI to the external device is provided by the
MOSI signal. The PCS pins (up to 4) provide chip select signals that are used to
identify the different peripherals connected. The state of the PCS pins can be
reset after data transfer or remain in the state they had after the last data
transfer (continuous mode).

Data received from an external device (MISO signal) is stored intermediately on


the SPI and then requested by the Master PPC.

In wraparound mode, data is written to the communication buffer (queue) of the


Slave DIO MC and transmitted cyclically via the SPI. Received data is written to
the slave DIO MC‘s communication buffer and can be requested by the Master
PPC. A fast receive function allows direct access to the received data.

Transmission to the Master Data received by the SPI cannot be transferred directly to the Master PPC, but
PPC has to be stored temporarily in the communication buffer (command table) of
the Slave DIO MC. Buffer overflows are indicated by a status bit, and cause old
data to be overwritten.

RTLib user You have access to the slave DIO MC's serial peripheral interface via RTLib1401.
For details, see Serial Peripheral Interface (SPI) ( MicroAutoBox RTLib
Reference).

I/O mapping The following table shows the mapping of converter and channel numbers, as
used in RTI and RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

I/O Connector Signal RTLib Bit Shared with Bit I/O


Pin Number
N1 MISO in 0 Group 6 ch 1 in
E3 MOSI out 1 Group 6 ch 2 out
E4 SCK out 2 Group 6 ch 3 out
E5 PCS0 out 3 Group 6 ch 4 out
E6 PCS1 out 4 Group 6 ch 5 out
F1 PCS2 out 5 Group 6 ch 6 out
F2 PCS3 out 6 Group 6 ch 7 out

Note

The serial peripheral interface shares pins with the Bit I/O unit. The unused
channel 8 (input pin P2 and output F5) of the Bit I/O unit cannot be used for
Bit I/O in parallel to SPI.

455
May 2018 MicroAutoBox Features
Serial Peripheral Interface

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1501: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1504: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1505/1507: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

MicroAutoBox I/O Features ................................................................................................... 103

Serial Peripheral Interface on the DIO Type 3 Unit

Introduction The serial peripheral interface (SPI) of the DIO Type 3 module provides
high‑speed synchronous communication with devices connected to the
MicroAutoBox Base board, such as an A/D converter.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– – – – – ✓ – – –

Supported I/O board boot modes: not relevant

Characteristics The DIO Type 3 unit of the DS1511 I/O board provides up to two serial peripheral
interfaces (SPI).

The SPI transfers serial bit streams of selectable length and transfer rate from and
to external devices. The basic transfer rate for serial data transmission is defined
via the clock signal (CLK). This triggers the data transfer between the SPI and a
connected external device.

456
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 3 Unit

Note

§ The SPI can be processed only in master mode. It is unable to respond to


any externally initiated serial transfers.
§ SPI signals are usually TTL signals. Because of MicroAutoBox's output
stages, the signal voltage depends on the VDRIVE voltage, in cars, this is
usually VBAT (12 V). In this case, the SPI signals of MicroAutoBox cannot
be directly connected to the external device.

The SPI supports the following features:


§ Up to four chip select channels can be configured.
By using a multiplexer, you can access up to 15 independent peripherals.
§ Up to 64 chip select cycle configurations per SPI unit can be configured.
During run time you only have to reference the specified number of a cycle
configuration for transmitting or receiving SPI data.
A chip select cycle configuration is used to specify the following characteristics
of an SPI transmission:
§ Transfer length by specifying the number of words (1 … 64) and bits per
word (1 … 128). The transfer length must not exceed 2048 bits.
Data received by the SPI is stored temporarily in a FIFO buffer of the
DS1511. Buffer overflows are indicated by a status information, and cause
old data to be overwritten.
§ Bit direction in a word
§ Period of the clock signal defined by the specified baud rate in the range
306 Baud … 300 kBaud.
§ Polarity and phase of the clock signal (SPI mode)
§ Timing behavior of the transmission by specifying the time before and after
transfer, the minimum time between two chip select cycles and the time
between words. For detailed information on the timing parameters, see
below.
§ Optional, generation of an end of cycle interrupt.

Timing behavior The timing behavior mainly depends on the specified Time between data
words parameter (TimeBetweenWords parameter in RTLib). If an SPI cycle
consists of several words, you can specify the duration for which the CLK signal
is pausing between two subsequent words.
§ If you specify 0 for the time between data words, the transfer of each word of
an SPI cycle follows the same timing parameters.
§ If you specify a value in the range 25 ns … 793.6 µs for the time between data
words, the other timing parameters only affect the timing behavior of the
beginning and end of an entire SPI cycle. The chip select signal is not switched
to the inactive state to mark the end of a word in the SPI cycle.

The other timing parameters are (name of the parameters in RTI / RTLib):
§ Time before transfer / TimeBeforeTransfer
Specifies the time between the point where the CS signal is set to active
(beginning of a cycle or beginning of a word) and the first period of the

457
May 2018 MicroAutoBox Features
Serial Peripheral Interface

following CLK signal. The relevant edge of the CLK signal depends on the
specified clock polarity and clock phase.
§ Time after transfer / TimeAfterTransfer
Specifies the time between the last period of the CLK signal and the point
where the CS signal is set to inactive (end of a cycle or end of a word). The
relevant edge of the CLK signal depends on the specified clock polarity and
clock phase.
§ Time between chip select cycles / CSInactiveTime
Specifies the minimum time the chip select signal is set to inactive between
two cycles or two subsequent words.

For an illustration of the timing behavior, see below.

The timing parameters can be specified with a maximum value of 793.6 µs. The
value range is internally separated into 12 intervals that are automatically
assigned to the specified value. Each interval provides a different step size that is
used to saturate a specified value to its next available value.

Interval Number Lower Limit of Interval Step Size


1 0 ns 12.5 ns
2 400 ns 25 ns
3 800 ns 50 ns
4 1.6 µs 100 ns
5 3.2 µs 200 ns
6 6.4 µs 400 ns
7 12.8 µs 800 ns
8 25.6 µs 1.6 µs
9 51.2 µs 3.2 µs
10 102.4 µs 6.4 µs
11 204.8 µs 12.8 µs
12 409.6 µs 25.6 µs

Note

All four chip select signals of an SPI interface are synchronously switched.
But, if you decode them for more than four slave devices, the signals might
not arrive synchronously at the decoder inputs. The decoder therefore might
produce spikes at its outputs, which you should suppress by using an
appropriate filter circuit.

Examples of the timing The SPI cycle consists of two words with six bits each. The polarity of the chip
behavior select signal is low active.

The illustrations contain different signal shapes showing the possible


combinations of the SPI clock polarity and SPI clock phase. You can see how the
timing parameters are considered for the generated outputs.

458
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 3 Unit

The following abbreviations are used:

Abbreviation Meaning
T Period of the SPI clock signal
TBT Time before transfer
TAT Time after transfer
TCS Time chip select signal inactive
TBW Time between data words
CLK SPI clock
CPHA SPI clock phase
CPOL SPI clock polarity

Example with time between data words set to 0

MOSI 1 2 3 4 5 6 1 2 3 4 5 6

CPHA=0, CPOL=0

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=0, CPOL=1

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=1, CPOL=0

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=1, CPOL=1

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

459
May 2018 MicroAutoBox Features
Serial Peripheral Interface

The DIO Type 3 unit writes data to MOSI at the thin edges and reads data from
MISO at the bold edges. While no data is transmitted, the MOSI channel is set to
High-Z.

Example with time between data words set to >0

MOSI 1 2 3 4 5 6 1 2 3 4 5 6

CPHA=0, CPOL=0

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=0, CPOL=1

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=1, CPOL=0

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=1, CPOL=1

CS

CLK

≥TCS TBT T T TBW TAT

The DIO Type 3 unit writes data to MOSI at the thin edges and reads data from
MISO at the bold edges. Between the words the last data bit is put out on the
MOSI channel. While no data is transmitted, the MOSI channel is set to High-Z.

RTI/RTLib support You have access to the serial peripheral interface on the DIO Type 3 module via
RTI1401 and RTLib1401. For details, see:
§ Serial Peripheral Interface (SPI) ( MicroAutoBox RTLib Reference)
§ Serial Peripheral Interface ( MicroAutoBox RTI Reference)

460
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 3 Unit

I/O mapping The following table shows the order of the signals. You have to specify the
digital input channel (MISO) and the first digital output channel (CLK). The digital
input channel can be configured as trigger source for interrupt generation. For
the digital output channels, you can configure the electrical interface.

Signal Channel Description


MISO ChannelIn Master In, Slave Out (also known as Data Out)
CLK ChannelOut SPI clock (also known as Serial clock)
MOSI ChannelOut + 1 Master Out, Slave In (also known as Data In)
Automatically reserved related to the specified first
output channel for the CLK signal.
CS1 ChannelOut + 2 Chip Select 1 (also known as Slave Select)
A chip select channel is used to address a certain SPI
slave.
Automatically reserved related to the specified first
output channel for the CLK signal.
CS2 ChannelOut + 3 Chip Select 2 (optional)
CS3 ChannelOut + 4 Chip Select 3 (optional)
CS4 ChannelOut + 5 Chip Select 4 (optional)

You can use one of the following digital input channels available on the DS1511
I/O connector to connect to the MISO signal.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3

461
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5
3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

Note

Multiple access to the same digital input channel by other DIO_TYPE3


blocks or functions is not allowed.

You can use up to six subsequent digital output channels available on the
DS1511 I/O connector to connect to the CLK, MOSI, and CS1 … CS4 signals.

462
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 3 Unit

The number of required channels must not exceed the number of available
channels on the selected port.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3
2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5

463
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Port Channel Signal I/O Connector Pin


3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

Note

Multiple access to the same digital output channels by other DIO_TYPE 3


blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1511: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

MicroAutoBox I/O Features ................................................................................................... 103

Serial Peripheral Interface on the DIO Type 4 Unit

Introduction The serial peripheral interface (SPI) of the DIO Type 4 module provides
high‑speed synchronous communication with devices connected to the
MicroAutoBox Base board, such as an A/D converter.

464
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 4 Unit

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards

DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514
– – – – – – – ✓ –

Supported I/O board boot modes: not relevant

Characteristics The DIO Type 4 unit of the DS1513 I/O board provides up to two serial peripheral
interfaces (SPI).

The SPI transfers serial bit streams of selectable length and transfer rate from and
to external devices. The basic transfer rate for serial data transmission is defined
via the clock signal (CLK). This triggers the data transfer between the SPI and a
connected external device.

Note

§ The SPI can be processed only in master mode. It is unable to respond to


any externally initiated serial transfers.
§ SPI signals are usually TTL signals. Because of MicroAutoBox's output
stages, the signal voltage depends on the VDRIVE voltage, in cars, this is
usually VBAT (12 V). In this case, the SPI signals of MicroAutoBox cannot
be directly connected to the external device.

The SPI supports the following features:


§ Up to four chip select channels can be configured.
By using a multiplexer, you can access up to 15 independent peripherals.
§ Up to 64 chip select cycle configurations per SPI unit can be configured.
During run time you only have to reference the specified number of a cycle
configuration for transmitting or receiving SPI data.
A chip select cycle configuration is used to specify the following characteristics
of an SPI transmission:
§ Transfer length by specifying the number of words (1 … 64) and bits per
word (1 … 128). The transfer length must not exceed 2048 bits.

465
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Data received by the SPI is stored temporarily in a FIFO buffer of the


DS1513. Buffer overflows are indicated by a status information, and cause
old data to be overwritten.
§ Bit direction in a word
§ Period of the clock signal defined by the specified baud rate in the range
306 Baud … 300 kBaud.
§ Polarity and phase of the clock signal (SPI mode)
§ Timing behavior of the transmission by specifying the time before and after
transfer, the minimum time between two chip select cycles and the time
between words. For detailed information on the timing parameters, see
below.
§ Optional, generation of an end of cycle interrupt.

Timing behavior The timing behavior mainly depends on the specified Time between data
words parameter (TimeBetweenWords parameter in RTLib). If an SPI cycle
consists of several words, you can specify the duration for which the CLK signal
is pausing between two subsequent words.
§ If you specify 0 for the time between data words, the transfer of each word of
an SPI cycle follows the same timing parameters.
§ If you specify a value in the range 25 ns … 793.6 µs for the time between data
words, the other timing parameters only affect the timing behavior of the
beginning and end of an entire SPI cycle. The chip select signal is not switched
to the inactive state to mark the end of a word in the SPI cycle.

The other timing parameters are (name of the parameters in RTI / RTLib):
§ Time before transfer / TimeBeforeTransfer
Specifies the time between the point where the CS signal is set to active
(beginning of a cycle or beginning of a word) and the first period of the
following CLK signal. The relevant edge of the CLK signal depends on the
specified clock polarity and clock phase.
§ Time after transfer / TimeAfterTransfer
Specifies the time between the last period of the CLK signal and the point
where the CS signal is set to inactive (end of a cycle or end of a word). The
relevant edge of the CLK signal depends on the specified clock polarity and
clock phase.
§ Time between chip select cycles / CSInactiveTime
Specifies the minimum time the chip select signal is set to inactive between
two cycles or two subsequent words.

For an illustration of the timing behavior, see below.

The timing parameters can be specified with a maximum value of 793.6 µs. The
value range is internally separated into 12 intervals that are automatically
assigned to the specified value. Each interval provides a different step size that is
used to saturate a specified value to its next available value.

466
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 4 Unit

Interval Number Lower Limit of Interval Step Size


1 0 ns 12.5 ns
2 400 ns 25 ns
3 800 ns 50 ns
4 1.6 µs 100 ns
5 3.2 µs 200 ns
6 6.4 µs 400 ns
7 12.8 µs 800 ns
8 25.6 µs 1.6 µs
9 51.2 µs 3.2 µs
10 102.4 µs 6.4 µs
11 204.8 µs 12.8 µs
12 409.6 µs 25.6 µs

Note

All four chip select signals of an SPI interface are synchronously switched.
But, if you decode them for more than four slave devices, the signals might
not arrive synchronously at the decoder inputs. The decoder therefore might
produce spikes at its outputs, which you should suppress by using an
appropriate filter circuit.

Examples of the timing The SPI cycle consists of two words with six bits each. The polarity of the chip
behavior select signal is low active.

The illustrations contain different signal shapes showing the possible


combinations of the SPI clock polarity and SPI clock phase. You can see how the
timing parameters are considered for the generated outputs.

The following abbreviations are used:

Abbreviation Meaning
T Period of the SPI clock signal
TBT Time before transfer
TAT Time after transfer
TCS Time chip select signal inactive
TBW Time between data words
CLK SPI clock
CPHA SPI clock phase
CPOL SPI clock polarity

467
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Example with time between data words set to 0

MOSI 1 2 3 4 5 6 1 2 3 4 5 6

CPHA=0, CPOL=0

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=0, CPOL=1

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=1, CPOL=0

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

CPHA=1, CPOL=1

CS

CLK

≥TCS TBT T TAT TCS TBT TAT

The DIO Type 4 unit writes data to MOSI at the thin edges and reads data from
MISO at the bold edges. While no data is transmitted, the MOSI channel is set to
High-Z.

468
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 4 Unit

Example with time between data words set to >0

MOSI 1 2 3 4 5 6 1 2 3 4 5 6

CPHA=0, CPOL=0

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=0, CPOL=1

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=1, CPOL=0

CS

CLK

≥TCS TBT T T TBW TAT

CPHA=1, CPOL=1

CS

CLK

≥TCS TBT T T TBW TAT

The DIO Type 4 unit writes data to MOSI at the thin edges and reads data from
MISO at the bold edges. Between the words the last data bit is put out on the
MOSI channel. While no data is transmitted, the MOSI channel is set to High-Z.

RTI/RTLib support You have access to the serial peripheral interface on the DIO Type 4 module via
RTI1401 and RTLib1401. For details, see:
§ Serial Peripheral Interface (SPI) ( MicroAutoBox RTLib Reference)
§ Serial Peripheral Interface ( MicroAutoBox RTI Reference)

I/O mapping The following table shows the order of the signals. You have to specify the
digital input channel (MISO) and the first digital output channel (CLK). The digital

469
May 2018 MicroAutoBox Features
Serial Peripheral Interface

input channel can be configured as trigger source for interrupt generation. For
the digital output channels, you can configure the electrical interface.

Signal Channel Description


MISO ChannelIn Master In, Slave Out (also known as Data Out)
CLK ChannelOut SPI clock (also known as Serial clock)
MOSI ChannelOut + 1 Master Out, Slave In (also known as Data In)
Automatically reserved related to the specified first
output channel for the CLK signal.
CS1 ChannelOut + 2 Chip Select 1 (also known as Slave Select)
A chip select channel is used to address a certain SPI
slave.
Automatically reserved related to the specified first
output channel for the CLK signal.
CS2 ChannelOut + 3 Chip Select 2 (optional)
CS3 ChannelOut + 4 Chip Select 3 (optional)
CS4 ChannelOut + 5 Chip Select 4 (optional)

You can use one of the following digital input channels available on the DS1513
I/O connector to connect to the MISO signal.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5

470
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 4 Unit

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

Note

Multiple access to the same digital input channel by other DIO TYPE 4
blocks or functions is not allowed.

You can use up to six subsequent digital output channels available on the
DS1513 I/O connector to connect to the CLK, MOSI, and CS1 … CS4 signals.

The number of required channels must not exceed the number of available
channels on the selected port.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5

471
May 2018 MicroAutoBox Features
Serial Peripheral Interface

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

Note

Multiple access to the same digital output channels by other DIO TYPE 4
blocks or functions is not allowed.

For a complete overview on the pinout, refer to:


§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513: Connector Pinouts ( MicroAutoBox II Hardware
Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

Related topics Basics

MicroAutoBox I/O Features ................................................................................................... 103

472
MicroAutoBox Features May 2018
RapidPro Diagnostic

RapidPro Diagnostic

Purpose To monitor the status of RapidPro hardware, which is connected to the


MicroAutoBox.

Note

It is not possible to use functions from different modes (extended engine


control, drives control edge aligned, drives control center aligned or chassis
control) within the same model. Thus, you must apply the same boot mode
throughout the whole RTI model running on the MicroAutoBox.

Hardware and boot mode Supported MicroAutoBox hardware:


requirements
MicroAutoBox with I/O Boards
DS1401 Base Board

DS1501

DS1504

DS1505

DS1507

DS1511

DS1512

DS1513

DS1514

– ✓ ✓ ✓ – – – – –

Supported I/O board boot modes:

CC DCEA DCCA EEC


✓ ✓ ✓ ✓

For further information, refer to I/O Features and Boot Modes on page 105.

473
May 2018 MicroAutoBox Features
RapidPro Diagnostic

RapidPro Diagnostic with the MicroAutoBox

Information about RapidPro With the diagnostic feature of the MicroAutoBox, you can access the diagnostic
System information of power stage modules (PS modules) installed on a RapidPro Power
Unit used as single unit. You can monitor up to four RapidPro Power Units via
the serial peripheral interface (SPI). For information on the RapidPro System
hardware, refer to RapidPro System – Getting Started.

Diagnostic information The diagnostic information can be grouped into:


§ Unit‑specific information
You can read out the alive state of a connected RapidPro Power Unit.
§ Module‑specific information
You can read out diagnostic information of a PS module that refers to the
entire module, for example, the “Overtemperature” state.
§ Channel‑specific information
You can read out diagnostic information of a PS module that refers to a
specific channel, for example, the “Open load” state.

For the available diagnostic warnings and diagnostic errors of the modules, refer
to Diagnostics in the RapidPro System Installation and Configuration Reference.

Diagnostic message types A module produces module-specific diagnostic messages which can be divided
into diagnostic errors and diagnostic warnings. Diagnostic warnings indicate
errors that are not dangerous for the RapidPro hardware. Diagnostic errors can
lead to dangerous malfunctioning. To avoid hardware damage, the
corresponding module or channel is shutdown.

Diagnostic reset of PS To restart a module or channel in shutdown mode, you have to perform the
modules following steps:
§ Fix the reason for the diagnostic error
§ Trigger a diagnostic reset for the appropriate module. You can do this by:
§ Using ConfigurationDesk
For further information, refer to Diagnostics Handling
( ConfigurationDesk RapidPro Configuration Guide).
§ Disabling and enabling the single Power Unit using its Enable/Disable input
to perform a diagnostic reset of all its modules
For further information, refer to Connecting the Enable Input ( RapidPro
System Hardware Installation Guide).

I/O mapping § For the I/O mapping of the MicroAutoBox, refer to I/O Mappings on page 489.
§ The connection between RapidPro Power Unit and MicroAutoBox is realized
via the serial peripheral interface (SPI). For detailed information, refer to

474
MicroAutoBox Features May 2018
RapidPro Diagnostic with the MicroAutoBox

Connecting the RapidPro System and MicroAutoBox via SPI ( RapidPro


System Hardware Installation Guide).

Note

If you use RapidPro Diagnosis Blockset in your model, you cannot use input
or output signals on digital group 6. For further information, refer to Bit I/O
Unit (DIO Type 1) on page 144.

RTI/RTLib support The diagnostic feature used for RapidPro Power Units is supported only by RTI.
For detailed information, refer to RapidPro Diagnosis ( MicroAutoBox RTI
Reference).

Related topics References

RapidPro Diagnosis ( MicroAutoBox RTI Reference)

475
May 2018 MicroAutoBox Features
RapidPro Diagnostic

476
MicroAutoBox Features May 2018
Limitations

Limitations

Where to go from here Information in this section

Limited Number of CAN Messages ...................................................... 477


When you implement CAN communication with RTI CAN Blockset or
with RTLib's CAN access functions, the number of CAN messages in an
application is limited.

Limitations with RTICANMM ................................................................ 479


There are a number of general limitations with RTICANMM.

Limitations with CAN FD ...................................................................... 481


There are limitations regarding the CAN FD support of RTICANMM.

Limitations with J1939-Support ........................................................... 482


There are a number of limitations regarding the J1939 support of
RTICANMM.

Limitations of RTI LIN MultiMessage Blockset ....................................... 482


Limitations apply when you use the RTI LIN MultiMessage Blockset.

Limited Number of CAN Messages

Limitation When you implement CAN communication with RTI CAN Blockset or with
RTLib's CAN access functions, the number of CAN messages in an application is
limited.

This applies to the following message types:


§ Transmit (TX) messages
§ Receive (RX) messages

477
May 2018 MicroAutoBox Features
Limitations

§ Request (RQ) messages


An RQ message and the corresponding RX message are interpreted as a single
(RQ) message. You cannot enable RX service support for the corresponding RX
message.
§ Remote (RM) messages

The sum of these messages is nsum:

nsum = nTX + nRX + nRQ + nRM

Maximum number of CAN The sum of the above messages nsum in one application must always be smaller
messages than or equal to the maximum number of CAN messages nmax:

nsum ≤ nmax ; nRM ≤ 10

nmax in one application depends on:


§ Whether you implement CAN communication with RTI CAN Blockset or with
RTLib's CAN access functions.
§ Whether you use RX service support.

The maximum number of CAN messages nmax is listed in the table below:

Platform nmax with nmax with RTI CAN Blockset


RTLib
RX Service Support Disabled RX Service Support Enabled

1 1) 2 1) 3 1) 4 1) 1 1) 2 1) 3 1) 4 1)
DS1103 (1 CAN 100 98 – – – 96 2) – – –
controller)
DS2202 (2 CAN 100 98 96 – – 96 2) 92 2) – –
controllers)
DS2210 (2 CAN 100 98 96 – – 96 2) 92 2) – –
controllers)
DS2211 (2 CAN 100 98 96 – – 96 2) 92 2) – –
controllers)
MicroAutoBox 3) 100 98 96 – – 96 2) 92 2) – –
(2 CAN controllers
per CAN_Type1)
MicroLabBox (2 CAN 100 98 96 – – 96 2) 92 2) – –
controllers)
DS4302 (4 CAN 200 198 196 194 192 196 2) 192 2) 188 2) 184 2)
controllers)
1) Number of CAN controllers used in the application
2) It is assumed that RX service support is enabled for all the CAN controllers used, and that both CAN message identifier formats
(STD, XTD) are used.
3) Depending on the variant, MicroAutoBox contains up to three CAN_Type1 modules, each with 2 CAN controllers. The values in
the list apply to a single CAN_Type1 module.

Ways to implement more There are two ways to implement more CAN messages in an application.
CAN messages

478
MicroAutoBox Features May 2018
Limitations with RTICANMM

Using RX service support If you use RTI CAN Blockset’s RX service support,
the number of receive (RX) messages nRX in the equations above applies only to
RTICAN Receive (RX) blocks for which RX service support is not enabled.
The number of RTICAN Receive (RX) blocks for which RX service support is
enabled is unlimited. Refer to Using RX Service Support on page 354.

Using the RTI CAN MultiMessage Blockset To implement more CAN


messages in an application, you can also use the RTI CAN MultiMessage
Blockset. Refer to the RTI CAN MultiMessage Blockset Tutorial.

Maximum number of CAN The number of available CAN subinterrupts you can implement in an application
subinterrupts is limited:

Platform Available CAN Subinterrupts


DS1103 (1 CAN controller) 15
DS2202 (2 CAN controllers) 15
DS2210 (2 CAN controllers) 15
DS2211 (2 CAN controllers) 15
1)
MicroAutoBox (2 CAN controllers per 15
CAN_Type1)
MicroLabBox (2 CAN controllers) 15
DS4302 (4 CAN controllers) 31
1) Depending on the variant, MicroAutoBox contains up to 3 CAN_Type1 modules, each
with 2 CAN controllers. The values in the list apply to a single CAN_Type1 module.

Limitations with RTICANMM

RTI CAN MultiMessage The following limitations apply to the RTI CAN MultiMessage Blockset:
Blockset § The configuration file supports only messages whose name does not begin
with an underscore.
§ Do not use the RTI CAN MultiMessage Blockset and the RTI CAN Blockset for
the same CAN controller.
§ Do not use the RTI CAN MultiMessage Blockset in enabled subsystems,
triggered subsystems, configurable subsystems, or function‑call subsystems. As
an alternative, you can disable the entire RTI CAN MultiMessage Blockset by
switching the CAN controller variant, or by setting the GlobalEnable
triggering option. This option is available on the Triggering Options Page
(RTICANMM MainBlock) ( RTI CAN MultiMessage Blockset Reference).
§ Do not run the RTI CAN MultiMessage Blockset in a separate task.

479
May 2018 MicroAutoBox Features
Limitations

§ Do not copy blocks of the RTI CAN MultiMessage Blockset. To add further
blocks of the RTI CAN MultiMessage Blockset to a model, always take them
directly from the rticanmmlib library. To transfer settings between two
MainBlocks or between two Gateway blocks, invoke the Save Settings and
Load Settings commands from the Settings menu (refer to RTICANMM
MainBlock or RTICANMM Gateway ( RTI CAN MultiMessage Blockset
Reference)).
§ The RTI CAN MultiMessage Blockset is not included in the RTI update
mechanism and is not updated when you open a model with an older version.
To update the RTI CAN MultiMessage Blockset, invoke Create S-Function for
All RTICANMM Blocks from the Options menu of the RTICANMM
GeneralSetup ( RTI CAN MultiMessage Blockset Reference).
As an alternative, you can create new S-functions for all RTICANMM blocks
manually (use the following order):
1. RTICANMM GeneralSetup ( RTI CAN MultiMessage Blockset Reference)
2. RTICANMM ControllerSetup ( RTI CAN MultiMessage Blockset
Reference)
3. RTICANMM MainBlock ( RTI CAN MultiMessage Blockset Reference)
4. RTICANMM Gateway ( RTI CAN MultiMessage Blockset Reference)
§ Model path names with multi-byte character encodings are not supported.
§ Mode signals with opaque byte order format that are longer than 8 bits are
not supported.
§ The RTI CAN MultiMessage Blockset generates data structures on the basis of
the relevant element names specified in the database file. The length of an
element name is limited to 56 characters. If an element name exceeds this
limit, the RTI CAN MultiMessage Blockset shortens the name to 56 characters,
using a checksum to ensure name uniqueness, and makes an entry in the log
file.
The following list shows the element types whose maximum name length
must not exceed 56 characters:
§ Messages
§ Signals
§ UpdateBit signals
§ Mode signals
§ Nodes

FIBEX 3.1, FIBEX 4.1, or The RTI CAN MultiMessage Blockset does not support multiple computation
FIBEX 4.1.1 file as the methods for signals. If several CompuMethods are defined for a signal in the
database FIBEX file, the RTI CAN MultiMessage Blockset uses the first linear computation
method it finds for the signal.

MAT file as the database In the RTI CAN MultiMessage Blockset, the length of signal names is restricted to
32 characters. However, MATLAB allows longer signal names. When MATLAB
entries are mapped to the signals in RTICANMM, the signal names are truncated
at the end and supplemented by a consecutive number, if necessary. To ensure

480
MicroAutoBox Features May 2018
Limitations with CAN FD

that unchanged signal names are used in the RTI CAN MultiMessage Blockset,
the signal names in the Simulink model must not exceed 32 characters.

AUTOSAR system description The RTI CAN MultiMessage Blockset does not support the following features that
file as the database can be defined in an AUTOSAR 3.2.2, 4.0.3, 4.1.1, 4.1.2, 4.2.1, 4.2.2, or 4.3.0
system description file:
§ Partial networking (There are some exceptions: Partial networking is supported
for MicroAutoBox equipped with a DS1513 I/O Board, MicroLabBox, and
dSPACE hardware that is equipped with DS4342 CAN FD Interface Modules.)
§ Unit groups
§ Segment positions for MultiplexedIPdus
§ ContainerIPdus
§ SecuredIPdus
§ End‑to‑end protection for ISignalGroups
§ Global time synchronization

Visualization with the Bus The current version of the RTI CAN MultiMessage Blockset supports visualization
Navigator with the Bus Navigator in ControlDesk 4.2.1 or later. You cannot work with
earlier versions of ControlDesk in connection with applications created with the
current version of the RTI CAN MultiMessage Blockset.

Limitations with CAN FD

Limitations The following limitations apply to the CAN FD support of the RTI CAN
MultiMessage Blockset:
§ To use CAN FD, you must provide a suitable DBC or AUTOSAR system
description file containing descriptions in CAN FD format.
§ For MicroAutoBox and DS4342, CAN FD messages cannot cause a transceiver
wake‑up.
§ If message format manipulation and message length manipulation are enabled
for a message, and if you switch between classic CAN and CAN FD formats
during run time, the range of possible message lengths is not adjusted, neither
upwards, nor downwards. The upper limit for the message length remains
unchanged.

481
May 2018 MicroAutoBox Features
Limitations

Limitations with J1939-Support

Limitations The following limitations apply to the J1939 support of the RTI CAN
MultiMessage Blockset:
§ The J1939 support for the RTI CAN MultiMessage Blockset requires a separate
license.
§ To use J1939, you must provide a J1939-compliant DBC file.
§ Though most messages are already defined in the J1939 standard, you must
specify the required messages in your DBC file.
§ When you gateway messages, J1939 network management (address claiming)
is not supported. This limitation applies to gatewaying via RTICANMM
MainBlocks and via RTICANMM Gateway block.
§ When you gateway J1939 messages via an RTICANMM Gateway block,
multipacket messages cannot be added to the filter list. This means that J1939
messages longer than 8 bytes cannot be excluded from being gatewayed.
§ For J1939 messages, the CRC option is limited to the first eight bytes.
§ For J1939 messages, the custom code option is limited to the first eight bytes.
§ Peer‑to‑peer communication for J1939 messages longer than 8 bytes via
RTS/CTS is supported only for receiving network nodes whose simulation type
is set to 'simulated' or 'external'.
§ CAN messages with extended identifier format and also J1939 messages use a
29‑bit message identifier. Because the RTI CAN MultiMessage Blockset cannot
differentiate between the two message types on the CAN bus, working with
extended CAN messages and J1939 messages on the same bus is not
supported.

Limitations of RTI LIN MultiMessage Blockset

Introduction Limitations apply when you use the RTI LIN MultiMessage Blockset.

Where to go from here Information in this topic

RTI LIN MultiMessage Blockset .............................................................................................. 483


DBC file as the database ....................................................................................................... 484
LDF file as the database ........................................................................................................ 484
FIBEX file as the database ..................................................................................................... 484
MAT file as the database ....................................................................................................... 484
AUTOSAR system description file as the database ................................................................. 484
Limitations with LIN specifications 2.x ................................................................................... 485
Limitations with SAE J2602 support ...................................................................................... 486
Visualization with the Bus Navigator ..................................................................................... 487

482
MicroAutoBox Features May 2018
Limitations of RTI LIN MultiMessage Blockset

RTI LIN MultiMessage The following limitations apply to the RTI LIN MultiMessage Blockset:
Blockset § Do not use the RTI LIN MultiMessage Blockset in enabled subsystems,
triggered subsystems and configurable subsystems. As an alternative, you can
disable nodes or frames of the RTI LIN MultiMessage Blockset by setting the
corresponding option.
§ Do not run the RTI LIN MultiMessage Blockset in a separate task.
§ Do not copy blocks of the RTI LIN MultiMessage Blockset. To add further
blocks of the RTI LIN MultiMessage Blockset to a model, always take them
directly from the rtilinmmlib library.
§ If you switch the platform from a SCALEXIO system to a non‑SCALEXIO system
or vice versa, you have to recreate all RTILINMM blocks. To recreate all
RTILINMM blocks at once, select Create S-function for all LIN Blocks from
the Options menu of the GeneralSetup block (refer to Options Menu
(RTILINMM GeneralSetup) ( RTI LIN MultiMessage Blockset Reference)).
If you switch the platform from one non‑SCALEXIO system to another (for
example, from a DS1005 to MicroAutoBox) but the board and channel settings
are not suitable for the new platform, you have to open the RTILINMM
ControllerSetup blocks and recreate the S‑functions for the blocks.
§ The RTI LIN MultiMessage Blockset is not included in the RTI update
mechanism and is not updated when you open a model with an older version.
To update the RTI LIN MultiMessage Blockset, invoke Create S‑Function for
all LIN Blocks from the Options menu of the RTILINMM GeneralSetup block
(refer to RTILINMM GeneralSetup ( RTI LIN MultiMessage Blockset
Reference)).
As an alternative, you can create new S-functions for all RTILINMM blocks
manually (use the following order):
1. RTILINMM GeneralSetup
2. RTILINMM ControllerSetup
3. RTILINMM MainSetup
§ Model path names with multi-byte character encodings are not supported.
§ The RTI LIN MultiMessage Blockset generates data structures on the basis of
the relevant element names specified in the database file. The length of an
element name is limited to 56 characters. If an element name exceeds this
limit, the RTI LIN MultiMessage Blockset shortens the name to 56 characters,
using a checksum to ensure name uniqueness, and makes an entry in the log
file.
The following list shows the element types whose maximum name length
must not exceed 56 characters:
§ Frames
§ Event‑triggered frames
§ Signals
§ UpdateBit signals
§ Nodes
§ Schedules
§ Schedule entries

483
May 2018 MicroAutoBox Features
Limitations

DBC file as the database The following limitations apply if your database file is in the DBC file format:
§ As the CAN protocol has no standard definitions for master nodes and
schedules, such definitions are not supported by the DBC files.
§ According to the LIN specification only byte layouts in the Intel format are
supported. Byte layouts in Motorola format are not supported.

LDF file as the database The RTI LIN MultiMessage Blockset does not support multiple physical encodings
in the LDF file. If several physical encoding types are defined for a signal, the RTI
LIN MultiMessage Blockset uses the first type it finds for the signal.

FIBEX file as the database The following limitations apply if you import a FIBEX file as the database:
§ The RTI LIN MultiMessage Blockset does not support multiple computation
methods for signals. If several CompuMethods are defined for a signal in the
FIBEX file, the RTI LIN MultiMessage Blockset uses the first linear computation
method it finds for the signal.
§ You cannot specify the checksum calculation type individually for each LIN
communication frame. The RTI LIN MultiMessage Blockset always uses specific
checksum calculation types as follows:
§ As of LIN protocol version 2.0, the 'ENHANCED' checksum calculation type
is used.
§ For LIN protocol versions < 2.0, the 'CLASSIC' checksum calculation type is
used.
§ The 'CLASSIC' checksum calculation type is always used for the master
request and slave response frames.

MAT file as the database In the RTI LIN MultiMessage Blockset, the length of signal names is restricted to
32 characters. However, MATLAB allows longer signal names. When MATLAB
entries are mapped to the signals in RTILINMM, the signal names are truncated
at the end and supplemented by a consecutive number, if necessary. To ensure
that unchanged signal names are used in the RTI LIN MultiMessage Blockset, the
signal names in the Simulink model must not exceed 32 characters.

AUTOSAR system description The following limitations apply if you import an AUTOSAR system description file
file as the database as the database:

Limitation Limitation Applies to AUTOSAR Release


3.1.4 3.2.1 3.2.2 4.0.3 4.1.1 4.1.2 4.2.1 4.2.2 4.3.0
Configuring selected slave nodes via RTI LIN MultiMessage
Blockset is not possible due to the following limitations, which
apply to AUTOSAR System Templates:

484
MicroAutoBox Features May 2018
Limitations of RTI LIN MultiMessage Blockset

Limitation Limitation Applies to AUTOSAR Release


3.1.4 3.2.1 3.2.2 4.0.3 4.1.1 4.1.2 4.2.1 4.2.2 4.3.0
§ In AUTOSAR, it is not possible to define collision resolver ✓ ✓ ✓ – – – – – –
schedules for event‑triggered frames. So if your database file is
an AUTOSAR system description file, you have to manually
assign a collision schedule to each event‑triggered frame on the
Collision Resolver Page (RTILINMM MainSetup).
§ The following initial node configuration parameters for slave ✓ ✓ ✓ – – – – – –
nodes are not provided by AUTOSAR system description files:
§ Supplier ID
§ Function ID
§ Variant ID
§ Initial NAD
For the first three parameters, no identifier values are displayed
on the Network Node Identification Page (RTILINMM
MainSetup). However, you can specify an initial node address
(NAD). By default, the configured NAD is used. If you do not
specify an initial NAD, the selected node is interpreted as an
unconfigured slave node.
§ AUTOSAR does not support the assignment of lists of ✓ ✓ ✓ – – – – – –
configurable frames to network nodes. Thus, you cannot select
configurable frames to specify an initial frame ID.
When importing an AUTOSAR system description file as the ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
database, the RTI LIN MultiMessage Blockset supports the
computation method from source value to physical representation
(converted value) only.
The RTI LIN MultiMessage Blockset does not support the following – 1) – ✓ ✓ ✓ ✓ ✓ ✓ ✓
features that can be defined in an AUTOSAR system description
file:
§ Partial networking
§ End‑to‑end communication protection (E2E protection)
§ Unit groups
1) Partial networking and E2E protection are not supported by this AUTOSAR Release.

Limitations with LIN § The RTI LIN MultiMessage Blockset does not support sporadic frames.
specifications 2.x § The RTI LIN MultiMessage Blockset does not support dynamic frames.
(Dynamic frames are provided by the LIN 2.0 specification only.)
§ With a LIN node configuration compliant with LIN 2.0 and later, the RTI LIN
MultiMessage Blockset supports the slave node configuration only. You can
implement master functionality for a node configuration in the Simulink
model, for example, by using raw data access for the master request frame.
Refer to Network Node Configuration Page (RTILINMM MainSetup) ( RTI LIN
MultiMessage Blockset Reference).
§ The RTI LIN MultiMessage Blockset does not support assign NAD frames.
§ The RTI LIN MultiMessage Blockset does not support assign frame ID range
frames.
§ The RTI LIN MultiMessage Blockset does not support conditional change NAD
frames.

485
May 2018 MicroAutoBox Features
Limitations

Limitations with SAE J2602 The following limitations apply to J2602 support by the RTI LIN MultiMessage
support Blockset:
§ The RTI LIN MultiMessage Blockset supports the SAE J2602 standard. It expects
LIN protocol version J2602_1_1.0 and LIN language version J2602_3_1.0. If
you use an LDF or AUTOSAR system description file with a different J2602
protocol version or language version (the version must also start with
"J2602"), the RTI LIN MultiMessage Blockset continues working but this may
lead to unpredictable behavior. A warning message is generated in the log file.
§ The RTI LIN MultiMessage Blockset does not support sporadic frames.
§ With a LIN node configuration compliant with J2602, the RTI LIN
MultiMessage Blockset supports the slave node configuration according to
LIN 2.0 only. You can implement master functionality for a node configuration
in the Simulink model, for example, by using raw data access for the master
request frame. Refer to Network Node Configuration Page (RTILINMM
MainSetup) ( RTI LIN MultiMessage Blockset Reference).
§ When you import a J2602‑compliant LDF or AUTOSAR system description file,
the following optional master parameters are ignored by the RTI LIN
MultiMessage Blockset:
§ max_header_length
§ response_tolerance
§ When you import a J2602‑compliant LDF or AUTOSAR system description file,
the following optional node attributes are ignored by the RTI LIN
MultiMessage Blockset:
§ response_tolerance
§ wakeup_time
§ poweron_time
§ Compliance with J2602 response tolerances cannot be ensured.
§ The maximum number of supported schedule table entries is 255.
§ In contrast to the SAE J2602 specification, the unused bits of a frame are
transmitted as dominant bits (0), not as recessive bits.
§ Every clearly identified signal may be contained only once in a frame.
§ The RTI LIN MultiMessage Blockset does not abort header transmission if an
error occurs.
§ The RTI LIN MultiMessage Blockset cannot access certain error states (ID parity
error, framing error, bit error). There is no possibility to react to these errors
within the model.
§ There is no automatic parameterization of the J2602 status byte.
§ The RTI LIN MultiMessage Blockset does not automatically support the
Targeted Reset.
§ The RTI LIN MultiMessage Blockset does not support the J2602 broadcast reset
functionality.
§ The RTI LIN MultiMessage Blockset does not support wake‑up timings as
specified in the J2602 standard. There is no automatic generation of wake up
request sequences. If necessary, you can implement wake up request
sequences in the Simulink model by using wake up requests which are
supported by the RTI LIN MultiMessage Blockset.

486
MicroAutoBox Features May 2018
Limitations of RTI LIN MultiMessage Blockset

§ According to the J2602 specification, a sleep mode that lasts for at least four
seconds is interpreted as a bus error. This error is indicated by the J2602 status
byte. The RTI LIN MultiMessage Blockset does not interpret a sleep mode of
this length as an error.
§ According to the J2602 specification, a baud rate accuracy of ±0.5% is
required. For MicroAutoBox, this condition is not met for the standard base
baud rate of 10417 bit/s. The closest available baud rate of 10472 bit/s (which
corresponds to a variance of +0.53%) is used instead.

Visualization with the Bus The current version of the RTI LIN MultiMessage Blockset supports visualization
Navigator with the Bus Navigator in ControlDesk 4.2.1 or later. You cannot work with
earlier versions of ControlDesk in connection with applications created with the
current version of the RTI LIN MultiMessage Blockset.

Related topics References

Collision Resolver Page (RTILINMM MainSetup) ( RTI LIN MultiMessage Blockset


Reference)
Network Node Identification Page (RTILINMM MainSetup) ( RTI LIN
MultiMessage Blockset Reference)

487
May 2018 MicroAutoBox Features
Limitations

488
MicroAutoBox Features May 2018
I/O Mappings

I/O Mappings

Where to go from here Information in this section

I/O Mapping of Boot Mode-Independent Features ............................... 490

I/O Mapping of Boot Mode-Dependent Features .................................. 505

489
May 2018 MicroAutoBox Features
I/O Mappings

I/O Mapping of Boot Mode-Independent Features


Introduction The features are available independent on the boot mode chosen.

Where to go from here Information in this section

I/O Mapping for MicroAutoBox II 1401/1505/1507 .............................. 490

I/O Mapping for MicroAutoBox II 1401/1507 ....................................... 492

I/O Mapping for MicroAutoBox II 1401/1511 ....................................... 493

I/O Mapping for MicroAutoBox II 1401/1513 ....................................... 497

I/O Mapping for MicroAutoBox with DS1552 Multi-I/O Module ........... 500

I/O Mapping for MicroAutoBox with DS1554 Engine Control


I/O Module .......................................................................................... 503

Information in other sections

CAN Signal Mapping ........................................................................... 382

I/O Mapping for MicroAutoBox II 1401/1505/1507

Introduction The following tables show the complete I/O mapping of the features (converter
and channel numbers) served by the Master PPC, as used in RTI and RTLib, to the
related I/O pins of the standard MicroAutoBox II 1401/1505/1507 I/O connector.

The following table shows the I/O mapping of the ADC unit and DAC unit:

Unit Converter Channel Signal I/O Connector Pin


ADC Unit Type 1 1 1 ADC Type 1 Con 1 Ch 1 c1
2 ADC Type 1 Con 1 Ch 2 a1
3 ADC Type 1 Con 1 Ch 3 Y1
4 ADC Type 1 Con 1 Ch 4 W1
2 1 ADC Type 1 Con 2 Ch 1 b1
2 ADC Type 1 Con 2 Ch 2 Z1
3 ADC Type 1 Con 2 Ch 3 X1
4 ADC Type 1 Con 2 Ch 4 V1

490
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

Unit Converter Channel Signal I/O Connector Pin


3 1 ADC Type 1 Con 3 Ch 1 b2
2 ADC Type 1 Con 3 Ch 2 Z2
3 ADC Type 1 Con 3 Ch 3 X2
4 ADC Type 1 Con 3 Ch 4 V2
4 1 ADC Type 1 Con 4 Ch 1 a2
2 ADC Type 1 Con 4 Ch 2 Y2
3 ADC Type 1 Con 4 Ch 3 W2
4 ADC Type 1 Con 4 Ch 4 U2
DAC Unit Type 1 1 DAC 1 D1
2 DAC 2 D2
3 DAC 3 C1
4 DAC 4 C2
5 DAC 5 B1
6 DAC 6 B2
7 DAC 7 A1
8 DAC 8 A2

The following table shows the I/O mapping of the ECU interface:

ECU Interface Connector ECU Interface Signal I/O Connector Pin


ZIF I/O IF1 ECU / IF1 TX - a5
(On DS1505 I/O Board) ECU / IF1 TX + b5
ECU / IF1 RX + Y5
ECU / IF1 RX - Z5
ECU A IF3 ECU / IF3 TX - 1
(On DS1401 Base Board) ECU / IF3 TX + 2
ECU / IF3 RX + 3
ECU / IF3 RX - 4
ECU B IF4 ECU / IF4 TX - 1
(On DS1401 Base Board) ECU / IF4 TX + 2
ECU / IF4 RX + 3
ECU / IF4 RX - 4
ECU C IF2 ECU / IF2 TX - 1
(On DS1507 I/O Board) ECU / IF2 TX + 2
ECU / IF2 RX + 3
ECU / IF2 RX - 4

Matching LVDS Link cables are supplied from dSPACE on request.

491
May 2018 MicroAutoBox Features
I/O Mappings

The following table shows the I/O mapping of the external interrupts. This
variant of MicroAutoBox provides 4 external interrupts:

Number of the External PPC Interrupt Line Signal I/O Connector Pin
Interrupt
RTI RTLib
0 EXT 0 IRQ4 TPU ch 2 in P4
1 EXT 1 IRQ5 TPU ch 3 in P5
2 EXT 2 IRQ6 TPU ch 4 in P6
3 EXT 3 IRQ8 TPU ch 6 in R2

Related topics References

Data Sheet MicroAutoBox II 1401/1505/1507 ( MicroAutoBox II Hardware


Installation and Configuration)

I/O Mapping for MicroAutoBox II 1401/1507

Introduction MicroAutoBox II 1401/1507 provides access to three ECU interfaces via ECU
interface connectors, which are 4-pin LEMO I/O connectors. Matching LVDS Link
cables are supplied from dSPACE on request.

ECU Interface Connector ECU Interface Signal I/O Connector Pin


ECU A IF2 ECU / IF2 TX - 1
(On DS1401 Base Board) ECU / IF2 TX + 2
ECU / IF2 RX + 3
ECU / IF2 RX - 4
ECU B IF3 ECU / IF3 TX - 1
(On DS1401 Base Board) ECU / IF3 TX + 2
ECU / IF3 RX + 3
ECU / IF3 RX - 4
ECU C IF1 ECU / IF1 TX - 1
(On DS1507 I/O Board) ECU / IF1 TX + 2
ECU / IF1 RX + 3
ECU / IF1 RX - 4

492
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

Related topics References

Data Sheet MicroAutoBox II 1401/1507 ( MicroAutoBox II Hardware Installation


and Configuration)

I/O Mapping for MicroAutoBox II 1401/1511

Introduction I/O mapping of the ADC unit

A/D Converter Channel Signal I/O Connector Pin


1 1 Analog ch 1 Z3
2 2 Analog ch 2 Y3
3 3 Analog ch 3 X3
4 4 Analog ch 4 W3
5 5 Analog ch 5 Z4
6 6 Analog ch 6 Y4
7 7 Analog ch 7 X4
8 8 Analog ch 8 W4
9 9 Analog ch 9 Z5
10 10 Analog ch 10 Y5
11 11 Analog ch 11 X5
12 12 Analog ch 12 W5
13 13 Analog ch 13 Z6
14 14 Analog ch 14 Y6
15 15 Analog ch 15 X6
16 16 Analog ch 16 W6
Additional relevant signals1)
External trigger input 1 Ana trigger 1 a3
External trigger input 2 Ana trigger 2 a4
External trigger input 3 Ana trigger 3 a5
External trigger input 4 Ana trigger 4 a6
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

I/O mapping of the DAC unit

D/A Channel Signal1) I/O Connector Pin


1 Analog ch 1 Z2
2 Analog ch 2 Y2

493
May 2018 MicroAutoBox Features
I/O Mappings

D/A Channel Signal1) I/O Connector Pin


3 Analog ch 3 X2
4 Analog ch 4 W2
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

I/O mapping of the inputs of the DIO Type 3 unit, used for bit I/O and timing I/O.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) V2
2 DigP 1 ch 2 U2
3 DigP 1 ch 3 T2
4 DigP 1 ch 4 S2
5 DigP 1 ch 5 R2
6 DigP 1 ch 6 P2
7 DigP 1 ch 7 N2
8 DigP 1 ch 8 M2
9 DigP 1 ch 9 V3
10 DigP 1 ch 10 U3
11 DigP 1 ch 11 T3
12 DigP 1 ch 12 S3
13 DigP 1 ch 13 R3
14 DigP 1 ch 14 P3
15 DigP 1 ch 15 N3
16 DigP 1 ch 16 M3
2 1 DigP 2 ch 1 V4
2 DigP 2 ch 2 U4
3 DigP 2 ch 3 T4
4 DigP 2 ch 4 S4
5 DigP 2 ch 5 R4
6 DigP 2 ch 6 P4
7 DigP 2 ch 7 N4
8 DigP 2 ch 8 M4
9 DigP 2 ch 9 V5
10 DigP 2 ch 10 U5
11 DigP 2 ch 11 T5
12 DigP 2 ch 12 S5
13 DigP 2 ch 13 R5
14 DigP 2 ch 14 P5
15 DigP 2 ch 15 N5
16 DigP 2 ch 16 M5

494
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

Port Channel Signal I/O Connector Pin


3 1 DigP 3 ch 1 V6
2 DigP 3 ch 2 U6
3 DigP 3 ch 3 T6
4 DigP 3 ch 4 S6
5 DigP 3 ch 5 R6
6 DigP 3 ch 6 P6
7 DigP 3 ch 7 N6
8 DigP 3 ch 8 M6
1) DigP <Port number> ch <Channel number>

I/O mapping of the outputs of the DIO Type 3 unit, used for bit I/O and timing
I/O.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) L2
2 DigP 1 ch 2 K2
3 DigP 1 ch 3 J2
4 DigP 1 ch 4 H2
5 DigP 1 ch 5 G2
6 DigP 1 ch 6 F2
7 DigP 1 ch 7 E2
8 DigP 1 ch 8 D2
9 DigP 1 ch 9 L3
10 DigP 1 ch 10 K3
11 DigP1 ch 11 J3
12 DigP 1 ch 12 H3
13 DigP 1 ch 13 G3
14 DigP 1 ch 14 F3
15 DigP 1 ch 15 E3
16 DigP 1 ch 16 D3

495
May 2018 MicroAutoBox Features
I/O Mappings

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 L4
2 DigP 2 ch 2 K4
3 DigP 2 ch 3 J4
4 DigP 2 ch 4 H4
5 DigP 2 ch 5 G4
6 DigP 2 ch 6 F4
7 DigP 2 ch 7 E4
8 DigP 2 ch 8 D4
9 DigP 2 ch 9 L5
10 DigP 2 ch 10 K5
11 DigP 2 ch 11 J5
12 DigP 2 ch 12 H5
13 DigP 2 ch 13 G5
14 DigP 2 ch 14 F5
15 DigP 2 ch 15 E5
16 DigP 2 ch 16 D5
3 1 DigP 3 ch 1 L6
2 DigP 3 ch 2 K6
3 DigP 3 ch 3 J6
4 DigP 3 ch 4 H6
5 DigP 3 ch 5 G6
6 DigP 3 ch 6 F6
7 DigP 3 ch 7 E6
8 DigP 3 ch 8 D6
1) DigP <Port number> ch <Channel number>

For the interface descriptions, refer to Interfaces ( MicroAutoBox II Hardware


Installation and Configuration).

For a complete pinout of the power input connector and the DS1511 ZIF I/O
connector, refer to Connector Pinouts ( MicroAutoBox II Hardware Installation
and Configuration).

MicroAutoBox II 1401/1511 provides no external interrupts.

Related topics References

Data Sheet MicroAutoBox II 1401/1511 ( MicroAutoBox II Hardware Installation


and Configuration)

496
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

I/O Mapping for MicroAutoBox II 1401/1513

Introduction I/O mapping of the ADC Type 4 unit

A/D Converter Channel Signal I/O Connector Pin


1 1 Analog ch 1 Z3
2 2 Analog ch 2 Y3
3 3 Analog ch 3 X3
4 4 Analog ch 4 W3
5 5 Analog ch 5 Z4
6 6 Analog ch 6 Y4
7 7 Analog ch 7 X4
8 8 Analog ch 8 W4
9 9 Analog ch 9 Z5
10 10 Analog ch 10 Y5
11 11 Analog ch 11 X5
12 12 Analog ch 12 W5
13 13 Analog ch 13 Z6
14 14 Analog ch 14 Y6
15 15 Analog ch 15 X6
16 16 Analog ch 16 W6
Additional relevant signals1)
External trigger input 1 Ana trigger 1 a3
External trigger input 2 Ana trigger 2 a4
External trigger input 3 Ana trigger 3 a5
External trigger input 4 Ana trigger 4 a6
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

I/O mapping of the AIO Type 1 unit (ADC)

A/D Converter Channel Signal1) I/O Connector Pin


1 1 AnalogIn ch 1 V3
2 2 AnalogIn ch 2 U3
3 3 AnalogIn ch 3 T3
4 4 AnalogIn ch 4 S3
5 5 AnalogIn ch 5 V4
6 6 AnalogIn ch 6 U4
7 7 AnalogIn ch 7 T4
8 8 AnalogIn ch 8 S4
9 9 AnalogIn ch 9 V5
10 10 AnalogIn ch 10 U5
11 11 AnalogIn ch 11 T5
12 12 AnalogIn ch 12 S5

497
May 2018 MicroAutoBox Features
I/O Mappings

A/D Converter Channel Signal1) I/O Connector Pin


13 13 AnalogIn ch 13 V6
14 14 AnalogIn ch 14 U6
15 15 AnalogIn ch 15 T6
16 16 AnalogIn ch 16 S6
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

I/O mapping of the AIO Type 1 unit (DAC)

D/A Channel Signal1) I/O Connector Pin


1 AnalogOut ch 1 Z2
2 AnalogOut ch 2 Y2
3 AnalogOut ch 3 X2
4 AnalogOut ch 4 W2
5 AnalogOut ch 5 V2
6 AnalogOut ch 6 U2
7 AnalogOut ch 7 T2
8 AnalogOut ch 8 S2
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

I/O mapping of the inputs of the DIO Type 4 unit, used for bit I/O and timing I/O.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) M2
2 DigP 1 ch 2 L2
3 DigP 1 ch 3 K2
4 DigP 1 ch 4 J2
5 DigP 1 ch 5 H2
6 DigP 1 ch 6 M3
7 DigP 1 ch 7 L3
8 DigP 1 ch 8 K3
9 DigP 1 ch 9 J3
10 DigP 1 ch 10 H3
11 DigP 1 ch 11 M4
12 DigP 1 ch 12 L4
13 DigP 1 ch 13 K4
14 DigP 1 ch 14 J4
15 DigP 1 ch 15 H4
16 DigP 1 ch 16 M5

498
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

Port Channel Signal I/O Connector Pin


2 1 DigP 2 ch 1 L5
2 DigP 2 ch 2 K5
3 DigP 2 ch 3 J5
4 DigP 2 ch 4 H5
5 DigP 2 ch 5 M6
6 DigP 2 ch 6 L6
7 DigP 2 ch 7 K6
8 DigP 2 ch 8 J6
1) DigP <Port number> ch <Channel number>

I/O mapping of the outputs of the DIO Type 4 unit, used for bit I/O and timing
I/O.

Port Channel Signal I/O Connector Pin


1 1 DigP 1 ch 11) G2
2 DigP 1 ch 2 F2
3 DigP 1 ch 3 E2
4 DigP 1 ch 4 D2
5 DigP 1 ch 5 C2
6 DigP 1 ch 6 G3
7 DigP 1 ch 7 F3
8 DigP 1 ch 8 E3
9 DigP 1 ch 9 D3
10 DigP 1 ch 10 C3
11 DigP 1 ch 11 G4
12 DigP 1 ch 12 F4
13 DigP 1 ch 13 E4
14 DigP 1 ch 14 D4
15 DigP 1 ch 15 C4
16 DigP 1 ch 16 G5
2 1 DigP 2 ch 1 F5
2 DigP 2 ch 2 E5
3 DigP 2 ch 3 D5
4 DigP 2 ch 4 C5
5 DigP 2 ch 5 G6
6 DigP 2 ch 6 F6
7 DigP 2 ch 7 E6
8 DigP 2 ch 8 D6
1) DigP <Port number> ch <Channel number>

For the interface descriptions, refer to Interfaces ( MicroAutoBox II Hardware


Installation and Configuration).

499
May 2018 MicroAutoBox Features
I/O Mappings

For a complete pinout of the power input connector and the DS1513 ZIF I/O
connector, refer to Connector Pinouts ( MicroAutoBox II Hardware Installation
and Configuration).

MicroAutoBox II 1401/1513 provides no external interrupts.

Related topics References

Data Sheet MicroAutoBox II 1401/1511 ( MicroAutoBox II Hardware Installation


and Configuration)

I/O Mapping for MicroAutoBox with DS1552 Multi-I/O Module

Introduction MicroAutoBox variants with a DS1512 or DS1514 I/O board can be enlarged with
a DS1552 Multi-I/O Module. Its signals are available at the MicroAutoBox I/O
connector (DS1512 or DS1514 ZIF connector).

I/O mapping of the ADC 1552 Type 1 unit

A/D Converter Channel Signal I/O Connector Pin


1 1 AnalogIn+ ch 1 X3
AnalogIn- ch 11) X4
2 2 AnalogIn+ ch 2 W3
AnalogIn- ch 21) W4
3 3 AnalogIn+ ch 3 V3
AnalogIn- ch 31) V4
4 4 AnalogIn+ ch 4 U3
AnalogIn- ch 41) U4
5 5 AnalogIn+ ch 5 H3
AnalogIn- ch 51) H4
6 6 AnalogIn+ ch 6 G3
AnalogIn- ch 61) G4
7 7 AnalogIn+ ch 7 F3
AnalogIn- ch 71) F4
8 8 AnalogIn+ ch 8 E3
AnalogIn- ch 81) E4
Additional relevant signals
External trigger input 1 DigIn ch 1 V5
External trigger input 2 DigIn ch 2 U5

500
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

A/D Converter Channel Signal I/O Connector Pin


External trigger input 3 DigIn ch 3 U6
External trigger input 4 DigIn ch 4 T2
1) Negative input line of the ADC channel is connected to GND. To get optimum analog
performance, follow the instructions in MicroAutoBox II Hardware Installation and
Configuration for connecting the analog channels to GND.

Note

DigIn ch 1 … DigIn ch 4 of the DIO 1552 Type 1 unit are shared with the
external trigger inputs of the ADC 1552 Type 1 unit.

I/O mapping of the ADC 1552 Type 2 unit

A/D Converter Channel Signal1) I/O Connector Pin


1 1 AnalogIn ch 1 b2
2 2 AnalogIn ch 2 a2
3 3 AnalogIn ch 3 Z2
4 4 AnalogIn ch 4 Y2
5 5 AnalogIn ch 5 X2
6 6 AnalogIn ch 6 W2
7 7 AnalogIn ch 7 V2
8 8 AnalogIn ch 8 U2
9 9 AnalogIn ch 9 M2
10 10 AnalogIn ch 10 L2
11 11 AnalogIn ch 11 K2
12 12 AnalogIn ch 12 J2
13 13 AnalogIn ch 13 H2
14 14 AnalogIn ch 14 G2
15 15 AnalogIn ch 15 F2
16 16 AnalogIn ch 16 E2
1) To get optimum analog performance, follow the instructions in MicroAutoBox II
Hardware Installation and Configuration for connecting the analog channels to GND.

I/O mapping of the DAC 1552 Type 1 unit

D/A Channel Signal1) I/O Connector Pin


1 AnalogOut ch 1 c2
2 AnalogOut ch 2 c3
3 AnalogOut ch 3 c4
4 AnalogOut ch 4 c5
1) To get optimum analog performance, follow the instructions in
MicroAutoBox II Hardware Installation and Configuration for
connecting the analog channels to GND.

501
May 2018 MicroAutoBox Features
I/O Mappings

I/O mapping of the inputs of the DIO 1552 Type 1 unit, used for bit I/O and
timing I/O.

Channel Signal I/O Connector Pin


1 DigIn ch 1 V5
2 DigIn ch 2 U5
3 DigIn ch 3 U6
4 DigIn ch 4 T2
5 DigIn ch 5 T3
6 DigIn ch 6 T4
7 DigIn ch 7 T5
8 DigIn ch 8 T6
9 DigIn ch 9 S2
10 DigIn ch 10 S3
11 DigIn ch 11 S5
12 DigIn ch 12 R2
13 DigIn ch 13 R5
14 DigIn ch 14 R6
15 DigIn ch 15 P5
16 DigIn ch 16 P6

Note

DigIn ch 1 … DigIn ch 4 of the DIO 1552 Type 1 unit are shared with the
external trigger inputs of the ADC 1552 Type 1 unit.

I/O mapping of the outputs of the DIO 1552 Type 1 unit, used for bit I/O and
timing I/O.

Channel Signal I/O Connector Pin


1 DigOut ch 1 F5
2 DigOut ch 2 E5
3 DigOut ch 3 E6
4 DigOut ch 4 D2
5 DigOut ch 5 D3
6 DigOut ch 6 D4
7 DigOut ch 7 D5
8 DigOut ch 8 D6
9 DigOut ch 9 C2
10 DigOut ch 10 C3
11 DigOut ch 11 C5
12 DigOut ch 12 B2
13 DigOut ch 13 B5
14 DigOut ch 14 B6
15 DigOut ch 15 A5
16 DigOut ch 16 A6

502
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features

For the interface descriptions, refer to Data Sheet DS1552 Multi-I/O Module
( MicroAutoBox II Hardware Installation and Configuration).

For a complete pinout of the power input connector and the MicroAutoBox I/O
connectors, refer to:
§ MicroAutoBox II 1401/1511/1512: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1512/1513: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

The MicroAutoBox variants with DS1512 or DS1514 I/O board provide no


external interrupts.

Related topics References

Data Sheet DS1552 Multi-I/O Module ( MicroAutoBox II Hardware Installation


and Configuration)
Data Sheet MicroAutoBox II 1401/1511/1512 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1512/1513 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1513/1514 ( MicroAutoBox II Hardware
Installation and Configuration)

I/O Mapping for MicroAutoBox with DS1554 Engine Control I/O Module

Introduction MicroAutoBox variants with a DS1514 I/O board can be enlarged with a DS1554
Engine Control I/O Module. Its signals are available at the MicroAutoBox I/O
connector (DS1514 ZIF connector).

Because the features of the DS1554 Engine Control I/O Module are only
supported by the RTI FPGA Programming Blockset, refer to RTI Block Settings for
the FPGA1401Tp1 with Engine Control I/O Module Framework ( RTI FPGA
Programming Blockset - FPGA Interface Reference) for information on the I/O
mapping.

For the interface descriptions, refer to Data Sheet DS1554 Engine Control I/O
Module ( MicroAutoBox II Hardware Installation and Configuration).

For a complete pinout of the power input connector and the MicroAutoBox I/O
connectors, refer to:

503
May 2018 MicroAutoBox Features
I/O Mappings

§ MicroAutoBox II 1401/1511/1514: Connector Pinouts ( MicroAutoBox II


Hardware Installation and Configuration)
§ MicroAutoBox II 1401/1513/1514: Connector Pinouts ( MicroAutoBox II
Hardware Installation and Configuration)

The MicroAutoBox variants with DS1514 I/O board provide no external


interrupts.

Related topics References

Data Sheet DS1554 Engine Control I/O Module ( MicroAutoBox II Hardware


Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1511/1514 ( MicroAutoBox II Hardware
Installation and Configuration)
Data Sheet MicroAutoBox II 1401/1513/1514 ( MicroAutoBox II Hardware
Installation and Configuration)

504
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

I/O Mapping of Boot Mode-Dependent Features


Introduction The features are only available if the right boot mode has been chosen.

Note

Extended engine control, drives control and chassis control cannot be used
at the same time, and all function groups share some of the I/O pins.

Where to go from here Information in this section

I/O Mapping for Extended Engine Control (EEC) ................................... 505

I/O Mapping for Chassis Control (CC) .................................................. 511

I/O Mapping for Drives Control Edge Aligned ....................................... 515

I/O Mapping for Drives Control Center Aligned .................................... 518

I/O Mapping for Extended Engine Control (EEC)

Introduction Extended engine control can be operated in two modes, the active and the
passive sensor mode. The I/O mapping is different for the two modes.

Where to go from here Information in this section

I/O Mapping for EEC in Passive Sensor Mode ....................................... 506

I/O Mapping for EEC in Active Sensor Mode ........................................ 508

I/O Mapping of the Bit I/O Unit for EEC ................................................ 510

Information in other sections

Extended Engine Control Modes .......................................................... 311

505
May 2018 MicroAutoBox Features
I/O Mappings

I/O Mapping for EEC in Passive Sensor Mode

Introduction The following table shows the complete I/O mapping of the extended engine
control functions, as used in RTI and RTLib, to the related I/O pins of the standard
MicroAutoBox I/O connector:

Unit Group Channel Signal I/O Connector Pin Shared I/O Connector
with Pin
PMMX 1 TPU ch 1 in P3
PSP 1 TPU ch 2 out PWM_FP_TPU, channel 1 G1
2 TPU ch 3 out PWM_FP_TPU, channel 2 G2
3 TPU ch 4 out PWM_FP_TPU, channel 3 G6
4 TPU ch 5 out PWM_FP_TPU, channel 4 H1
5 TPU ch 6 out PWM_FP_TPU, channel 5 H2
6 TPU ch 7 out PWM_FP_TPU, channel 6 H5
7 TPU ch 8 out PWM_FP_TPU, channel 7 H6
8 TPU ch 9 out PWM_FP_TPU, channel 8 J1
9 TPU ch 10 out PWM_FP_TPU, channel 9 J2
10 TPU ch 11 out PWM_FP_TPU, channel 10 J3
11 TPU ch 12 out PWM_FP_TPU, channel 11 J4
12 TPU ch 13 out PWM_FP_TPU, channel 12 J5
Bit I/O 4 8 Camshaft Synchronization Bit I/O group 4, channel 7 a4
Signal
Reserved TPU ch 14
Stepper Motor 1 TPU ch 15 out K1
2 TPU ch 16 out K2
FPW2D 1 CTM ch 1 in M2
2 CTM ch 3 in M5
PWM_FP 1 CTM ch 2 out C3
2 CTM ch 4 out D5
PWM_VP 1 CTM ch 5 out C4
2 CTM ch 6 out C5
3 CTM ch 7 out C6
4 CTM ch 8 out D3

506
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

Unit Group Channel Signal I/O Connector Pin Shared I/O Connector
with Pin
PWM_FP_TPU 1 TPU ch 2 out PSP, channel 1 G1
2 TPU ch 3 out PSP, channel 2 G2
3 TPU ch 4 out PSP, channel 3 G6
4 TPU ch 5 out PSP, channel 4 H1
5 TPU ch 6 out PSP, channel 5 H2
6 TPU ch 7 out PSP, channel 6 H5
7 TPU ch 8 out PSP, channel 7 H6
8 TPU ch 9 out PSP, channel 8 J1
9 TPU ch 10 out PSP, channel 9 J2
10 TPU ch 11 out PSP, channel 10 J3
11 TPU ch 12 out PSP, channel 11 J4
12 TPU ch 13 out PSP, channel 12 J5
DIO ADC (FA/RE) 1 Analog 1 Group 5 ch 1 in a6
2 Analog 2 Group 5 ch 2 in b3
3 Analog 3 Group 5 ch 3 in b4
4 Analog 4 Group 5 ch 4 in b6
5 Analog 5 Group 5 ch 5 in c3
6 Analog 6 Group 5 ch 6 in c4
7 Analog 7 Group 5 ch 7 in c5
8 Analog 8 Group 5 ch 8 in c6
9 Analog 9 Group 4 ch 1 in Y3
10 Analog 10 Group 4 ch 2 in Y4
11 Analog 11 Group 4 ch 3 in Y6
12 Analog 12 Group 4 ch 4 in Z3
13 Analog 13 Group 4 ch 5 in Z4
14 Analog 14 Group 4 ch 6 in Z6
15 Analog 15 Group 4 ch 7 in a3
16 Analog 16 Group 4 ch 8 in a4

Related topics Basics

Extended Engine Control (EEC) ............................................................................................. 309


Extended Engine Control Modes ........................................................................................... 311

References

I/O Mapping for EEC in Active Sensor Mode ......................................................................... 508

507
May 2018 MicroAutoBox Features
I/O Mappings

I/O Mapping for EEC in Active Sensor Mode

Introduction The following table shows the complete I/O mapping of the extended engine
control functions, as used in RTI and RTLib, to the related I/O pins of the standard
MicroAutoBox I/O connector:

Unit Group Channel Signal I/O Connector Pin Shared with I/O
Connector
Pin
PMMX 1 TPU ch 2 in P4
PSP (FP PWM) 1 TPU ch 3 out PWM_FP_TPU, channel 1 G2
2 TPU ch 4 out PWM_FP_TPU, channel 2 G6
3 TPU ch 5 out PWM_FP_TPU, channel 3 H1
4 TPU ch 6 out PWM_FP_TPU, channel 4 H2
5 TPU ch 7 out PWM_FP_TPU, channel 5 H5
6 TPU ch 8 out PWM_FP_TPU, channel 6 H6
7 TPU ch 9 out PWM_FP_TPU, channel 7 J1
8 TPU ch 10 out PWM_FP_TPU, channel 8 J2
9 TPU ch 11 out PWM_FP_TPU, channel 9 J3
10 TPU ch 12 out PWM_FP_TPU, channel 10 J4
11 TPU ch 13 out PWM_FP_TPU, channel 11 J5
12 TPU ch 14 out PWM_FP_TPU, channel 12 J6
Bit I/O 4 8 Camshaft Synchronization Bit I/O group 4, channel 7 a4
Signal
Reserved TPU ch 1
Stepper Motor 1 TPU ch 15 out K1
2 TPU ch 16 out K2
FPW2D 1 CTM ch 1 in M2
2 CTM ch 3 in M5
PWM_FP 1 CTM ch 2 out C3
2 CTM ch 4 out D5
PWM_VP 1 CTM ch 5 out C4
2 CTM ch 6 out C5
3 CTM ch 7 out C6
4 CTM ch 8 out D3

508
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

Unit Group Channel Signal I/O Connector Pin Shared with I/O
Connector
Pin
PWM_FP_TPU 1 TPU ch 3 out PSP, channel 1 G2
2 TPU ch 4 out PSP, channel 2 G6
3 TPU ch 5 out PSP, channel 3 H1
4 TPU ch 6 out PSP, channel 4 H2
5 TPU ch 7 out PSP, channel 5 H5
6 TPU ch 8 out PSP, channel 6 H6
7 TPU ch 9 out PSP, channel 7 J1
8 TPU ch 10 out PSP, channel 8 J2
9 TPU ch 11 out PSP, channel 9 J3
10 TPU ch 12 out PSP, channel 10 J4
11 TPU ch 13 out PSP, channel 11 J5
12 TPU ch 14 out PSP, channel 12 J6
DIO ADC (FA/RE) 1 Analog 1 Group 5 ch 1 in a6
2 Analog 2 Group 5 ch 2 in b3
3 Analog 3 Group 5 ch 3 in b4
4 Analog 4 Group 5 ch 4 in b6
5 Analog 5 Group 5 ch 5 in c3
6 Analog 6 Group 5 ch 6 in c4
7 Analog 7 Group 5 ch 7 in c5
8 Analog 8 Group 5 ch 8 in c6
9 Analog 9 Group 4 ch 1 in Y3
10 Analog 10 Group 4 ch 2 in Y4
11 Analog 11 Group 4 ch 3 in Y6
12 Analog 12 Group 4 ch 4 in Z3
13 Analog 13 Group 4 ch 5 in Z4
14 Analog 14 Group 4 ch 6 in Z6
15 Analog 15 Group 4 ch 7 in a3
16 Analog 16 Group 4 ch 8 in a4

Related topics Basics

Extended Engine Control (EEC) ............................................................................................. 309


Extended Engine Control Modes ........................................................................................... 311

References

I/O Mapping for EEC in Passive Sensor Mode ........................................................................ 506


I/O Mapping of the Bit I/O Unit for EEC ................................................................................. 510

509
May 2018 MicroAutoBox Features
I/O Mappings

I/O Mapping of the Bit I/O Unit for EEC

Introduction Bit I/O Unit for EEC

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 1 0 1 – – A3 Group 1 ch 1 out
1 2 – – A4 Group 1 ch 2 out
2 3 – – A5 Group 1 ch 3 out
3 4 – – A6 Group 1 ch 4 out
4 5 – – B3 Group 1 ch 5 out
5 6 – – B4 Group 1 ch 6 out
6 7 – – B5 Group 1 ch 7 out
7 8 – – – –
Group 2 0 1 T1 Group 2 ch 1 in K3 Group 2 ch 1 out
1 2 T2 Group 2 ch 2 in K4 Group 2 ch 2 out
2 3 T3 Group 2 ch 3 in K5 Group 2 ch 3 out
3 4 T4 Group 2 ch 4 in K6 Group 2 ch 4 out
4 5 T5 Group 2 ch 5 in L1 Group 2 ch 5 out
5 6 T6 Group 2 ch 6 in L2 Group 2 ch 6 out
6 7 U1 Group 2 ch 7 in L3 Group 2 ch 7 out
7 8 W6 Group 2 ch 8 in L4 Group 2 ch 8 out
Group 3 0 1 – – L5 Group 3 ch 1 out
1 2 – – L6 Group 3 ch 2 out
2 3 – – M1 Group 3 ch 3 out
3 4 – – – –
4 5 – – – –
5 6 – – – –
6 7 – – – –
7 8 – – – –
Group 4 0 1 DIO ADC, channel 9 Y3 Group 4 ch 1 in – –
1 2 DIO ADC, channel 10 Y4 Group 4 ch 2 in – –
2 3 DIO ADC, channel 11 Y6 Group 4 ch 3 in – –
3 4 DIO ADC, channel 12 Z3 Group 4 ch 4 in – –
4 5 DIO ADC, channel 13 Z4 Group 4 ch 5 in – –
5 6 DIO ADC, channel 14 Z6 Group 4 ch 6 in – –
6 7 DIO ADC, channel 15 a3 Group 4 ch 7 in – –
7 8 DIO ADC, channel 16; a4 Group 4 ch 8 in – –
Camshaft Synchronization
Signal

510
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 5 0 1 DIO ADC, channel 1 a6 Group 5 ch 1 in – –
1 2 DIO ADC, channel 2 b3 Group 5 ch 2 in – –
2 3 DIO ADC, channel 3 b4 Group 5 ch 3 in – –
3 4 DIO ADC, channel 4 b6 Group 5 ch 4 in – –
4 5 DIO ADC, channel 5 c3 Group 5 ch 5 in – –
5 6 DIO ADC, channel 6 c4 Group 5 ch 6 in – –
6 7 DIO ADC, channel 7 c5 Group 5 ch 7 in – –
7 8 DIO ADC, channel 8 c6 Group 5 ch 8 in – –
Group 6 0 1 MISO in, SPI N1 Group 6 ch 1 in D6 Group 6 ch 1 out
1 2 MOSI out, SPI N2 Group 6 ch 2 in E3 Group 6 ch 2 out
2 3 SCK out, SPI N3 Group 6 ch 3 in E4 Group 6 ch 3 out
3 4 PCS 0 out, SPI N4 Group 6 ch 4 in E5 Group 6 ch 4 out
4 5 PCS 1 out, SPI N5 Group 6 ch 5 in E6 Group 6 ch 5 out
5 6 PCS 2 out, SPI N6 Group 6 ch 6 in F1 Group 6 ch 6 out
6 7 PCS 3 out, SPI P1 Group 6 ch 7 in F2 Group 6 ch 7 out
7 8 P2 Group 6 ch 8 in F5 Group 6 ch 8 out

Related topics Basics

Bit I/O Unit (DIO Type 1) ........................................................................................................ 144

I/O Mapping for Chassis Control (CC)

Where to go from here Information in this section

I/O Mapping of the Bit I/O Unit for Chassis Control .............................. 512

I/O Mapping of Timing I/O and A/D Conversion for Chassis


Control ................................................................................................ 513

511
May 2018 MicroAutoBox Features
I/O Mappings

I/O Mapping of the Bit I/O Unit for Chassis Control

Introduction Bit I/O Unit for CC

Group RTLib Bit RTI I/O Connector Pin I/O Connector Pin
Number Channel Shared with
Input Output
Number
Pin Signal Pin Signal
Group 1 0 1 – – A3 Group 1 ch 1 out
1 2 – – A4 Group 1 ch 2 out
2 3 – – A5 Group 1 ch 3 out
3 4 – – A6 Group 1 ch 4 out
4 5 – – B3 Group 1 ch 5 out
5 6 – – B4 Group 1 ch 6 out
6 7 – – B5 Group 1 ch 7 out
7 8 – – – –
Group 2 0 1 T1 Group 2 ch 1 in K3 Group 2 ch 1 out
1 2 T2 Group 2 ch 2 in K4 Group 2 ch 2 out
2 3 T3 Group 2 ch 3 in K5 Group 2 ch 3 out
3 4 T4 Group 2 ch 4 in K6 Group 2 ch 4 out
4 5 T5 Group 2 ch 5 in L1 Group 2 ch 5 out
5 6 T6 Group 2 ch 6 in L2 Group 2 ch 6 out
6 7 U1 Group 2 ch 7 in L3 Group 2 ch 7 out
7 8 W6 Group 2 ch 8 in L4 Group 2 ch 8 out
Group 3 0 1 – – L5 Group 3 ch 1 out
1 2 – – L6 Group 3 ch 2 out
2 3 – – M1 Group 3 ch 3 out
3 4 – – – –
4 5 – – – –
5 6 – – – –
6 7 – – – –
7 8 – – – –
Group 4 0 1 DIO ADC, channel 9 Y3 Group 4 ch 1 in – –
1 2 DIO ADC, channel 10 Y4 Group 4 ch 2 in – –
2 3 DIO ADC, channel 11 Y6 Group 4 ch 3 in – –
3 4 DIO ADC, channel 12 Z3 Group 4 ch 4 in – –
4 5 DIO ADC, channel 13 Z4 Group 4 ch 5 in – –
5 6 DIO ADC, channel 14 Z6 Group 4 ch 6 in – –
6 7 DIO ADC, channel 15 a3 Group 4 ch 7 in – –
7 8 DIO ADC, channel 16 a4 Group 4 ch 8 in – –

512
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

Group RTLib Bit RTI I/O Connector Pin I/O Connector Pin
Number Channel Shared with
Input Output
Number
Pin Signal Pin Signal
Group 5 0 1 DIO ADC, channel 1 a6 Group 5 ch 1 in – –
1 2 DIO ADC, channel 2 b3 Group 5 ch 2 in – –
2 3 DIO ADC, channel 3 b4 Group 5 ch 3 in – –
3 4 DIO ADC, channel 4 b6 Group 5 ch 4 in – –
4 5 DIO ADC, channel 5 c3 Group 5 ch 5 in – –
5 6 DIO ADC, channel 6 c4 Group 5 ch 6 in – –
6 7 DIO ADC, channel 7 c5 Group 5 ch 7 in – –
7 8 DIO ADC, channel 8 c6 Group 5 ch 8 in – –
Group 6 0 1 MISO in, SPI N1 Group 6 ch 1 in D6 Group 6 ch 1 out
1 2 MOSI out, SPI N2 Group 6 ch 2 in E3 Group 6 ch 2 out
2 3 SCK out, SPI N3 Group 6 ch 3 in E4 Group 6 ch 3 out
3 4 PCS 0 out, SPI N4 Group 6 ch 4 in E5 Group 6 ch 4 out
4 5 PCS 1 out, SPI N5 Group 6 ch 5 in E6 Group 6 ch 5 out
5 6 PCS 2 out, SPI N6 Group 6 ch 6 in F1 Group 6 ch 6 out
6 7 PCS 3 out, SPI P1 Group 6 ch 7 in F2 Group 6 ch 7 out
7 8 P2 Group 6 ch 8 in F5 Group 6 ch 8 out

Related topics References

I/O Mapping for Chassis Control (CC) ................................................................................... 511

I/O Mapping of Timing I/O and A/D Conversion for Chassis Control

Introduction The following table shows the I/O mapping of the chassis control functions for
Timing I/O and A/D conversion, as used in RTI and RTLib, to the related I/O pins
of the MicroAutoBox I/O connector.

Unit Group Channel Signal I/O Connector Pin Shared with I/O Connector Pin
PPM (FPW2D) on CTM Block 1 1 CTM ch 1 in M2
2 CTM ch 2 in M4
Block 2 3 CTM ch 3 in M5
4 CTM ch 4 in M6
PPM (FPW2D) on TPU 1 TPU ch 13 in PWM2D, channel 1 S3
2 TPU ch 14 in PWM2D, channel 2 S4
3 TPU ch 15 in PWM2D, channel 3 S5
4 TPU ch 16 in PWM2D, channel 4 S6

513
May 2018 MicroAutoBox Features
I/O Mappings

Unit Group Channel Signal I/O Connector Pin Shared with I/O Connector Pin
PWM2D on TPU 1 TPU ch 13 in PPM, channel 1 S3
2 TPU ch 14 in PPM, channel 2 S4
3 TPU ch 15 in PPM, channel 3 S5
4 TPU ch 16 in PPM, channel 4 S6
TPU_PWM 1 TPU ch 1 out F6
2 TPU ch 2 out G1
3 TPU ch 3 out G2
4 TPU ch 4 out G6
5 TPU ch 5 out H1
6 TPU ch 6 out H2
7 TPU ch 7 out H5
8 TPU ch 8 out H6
9 TPU ch 9 out J1
10 TPU ch 10 out J2
11 TPU ch 11 out J3
12 TPU ch 12 out J4
PWM_VP 1 CTM ch 5 out C4
2 CTM ch 6 out C5
3 CTM ch 7 out C6
4 CTM ch 8 out D3
DIO ADC (FA/RE) 1 Analog 1 Group 5 ch 1 in a6
2 Analog 2 Group 5 ch 2 in b3
3 Analog 3 Group 5 ch 3 in b4
4 Analog 4 Group 5 ch 4 in b6
5 Analog 5 Group 5 ch 5 in c3
6 Analog 6 Group 5 ch 6 in c4
7 Analog 7 Group 5 ch 7 in c5
8 Analog 8 Group 5 ch 8 in c6
9 Analog 9 Group 4 ch 1 in Y3
10 Analog 10 Group 4 ch 2 in Y4
11 Analog 11 Group 4 ch 3 in Y6
12 Analog 12 Group 4 ch 4 in Z3
13 Analog 13 Group 4 ch 5 in Z4
14 Analog 14 Group 4 ch 6 in Z6
15 Analog 15 Group 4 ch 7 in a3
16 Analog 16 Group 4 ch 8 in a4

514
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

I/O Mapping for Drives Control Edge Aligned

Where to go from here Information in this section

I/O Mapping of the Bit I/O Unit for DCEA ............................................. 515

I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D


Conversion for Drives Control Edge Aligned ......................................... 517

I/O Mapping of the Bit I/O Unit for DCEA

Introduction Bit I/O Unit for DCEA

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 1 0 1 – – A3 Group 1 ch 1 out
1 2 – – A4 Group 1 ch 2 out
2 3 – – A5 Group 1 ch 3 out
3 4 – – A6 Group 1 ch 4 out
4 5 – – B3 Group 1 ch 5 out
5 6 – – B4 Group 1 ch 6 out
6 7 – – B5 Group 1 ch 7 out
7 8 – – – –
Group 2 0 1 T1 Group 2 ch 1 in K3 Group 2 ch 1 out
1 2 T2 Group 2 ch 2 in K4 Group 2 ch 2 out
2 3 T3 Group 2 ch 3 in K5 Group 2 ch 3 out
3 4 T4 Group 2 ch 4 in K6 Group 2 ch 4 out
4 5 T5 Group 2 ch 5 in L1 Group 2 ch 5 out
5 6 T6 Group 2 ch 6 in L2 Group 2 ch 6 out
6 7 U1 Group 2 ch 7 in L3 Group 2 ch 7 out
7 8 W6 Group 2 ch 8 in L4 Group 2 ch 8 out

515
May 2018 MicroAutoBox Features
I/O Mappings

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 3 0 1 – – L5 Group 3 ch 1 out
1 2 – – L6 Group 3 ch 2 out
2 3 – – M1 Group 3 ch 3 out
3 4 – – – –
4 5 – – – –
5 6 – – – –
6 7 – – – –
7 8 – – – –
Group 4 0 1 DIO ADC, channel 9 Y3 Group 4 ch 1 in – –
1 2 DIO ADC, channel 10 Y4 Group 4 ch 2 in – –
2 3 DIO ADC, channel 11 Y6 Group 4 ch 3 in – –
3 4 DIO ADC, channel 12 Z3 Group 4 ch 4 in – –
4 5 DIO ADC, channel 13 Z4 Group 4 ch 5 in – –
5 6 DIO ADC, channel 14 Z6 Group 4 ch 6 in – –
6 7 DIO ADC, channel 15 a3 Group 4 ch 7 in – –
7 8 DIO ADC, channel 16 a4 Group 4 ch 8 in – –
Group 5 0 1 DIO ADC, channel 1 a6 Group 5 ch 1 in – –
1 2 DIO ADC, channel 2 b3 Group 5 ch 2 in – –
2 3 DIO ADC, channel 3 b4 Group 5 ch 3 in – –
3 4 DIO ADC, channel 4 b6 Group 5 ch 4 in – –
4 5 DIO ADC, channel 5 c3 Group 5 ch 5 in – –
5 6 DIO ADC, channel 6 c4 Group 5 ch 6 in – –
6 7 DIO ADC, channel 7 c5 Group 5 ch 7 in – –
7 8 DIO ADC, channel 8 c6 Group 5 ch 8 in – –
Group 6 0 1 MISO in, SPI N1 Group 6 ch 1 in D6 Group 6 ch 1 in
1 2 MOSI out, SPI N2 Group 6 ch 2 in E3 Group 6 ch 2 in
2 3 SCK out, SPI N3 Group 6 ch 3 in E4 Group 6 ch 3 in
3 4 PCS 0 out, SPI N4 Group 6 ch 4 in E5 Group 6 ch 4 in
4 5 PCS 1 out, SPI N5 Group 6 ch 5 in E6 Group 6 ch 5 in
5 6 PCS 2 out, SPI N6 Group 6 ch 6 in F1 Group 6 ch 6 in
6 7 PCS 3 out, SPI P1 Group 6 ch 7 in F2 Group 6 ch 7 in
7 8 P2 Group 6 ch 8 in F5 Group 6 ch 8 in

Related topics References

I/O Mapping for Drives Control Edge Aligned ........................................................................ 515

516
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D Conversion
for Drives Control Edge Aligned

Introduction The following table shows the I/O mapping (signals and channel numbers) of the
features served by DCEA functions of the Slave DIO MC, as used in RTI and
RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

Unit Channel Signal I/O Connector Pin I/O


Shared with Bit Connector
I/O Pin
EA MC PWM TPU 1 PWM U+ on TPU ch2 out G1
2 PWM U+on TPU ch3 out G2
3 PWM V+ on TPU ch4 out G6
4 PWM V+on TPU ch5 out H1
5 PWM W+ on TPU ch6 out H2
6 PWM W+on TPU ch7 out H5
ENC POS 1 1 Index on TPU ch8 in R4
1 Signal 1 on TPU ch9 in R5
1 Signal 2 on TPU ch10 in R6
ENC POS 2 2 Index on TPU ch11 in S1
2 Signal 1 on TPU ch12 in S2
2 Signal 2 on TPU ch13 in S3
ENC POS 3 3 Index on TPU ch14 in S4
3 Signal 1 on TPU ch15 in S5
3 Signal 1 on TPU ch16 in S6
FPWD2D_CTM 1 CTM ch 1 in M2
2 CTM ch 2 in M4
3 CTM ch3 in M5
4 CTM ch4 in M6
PWM VP 1 CTM ch5 out C4
2 CTM ch6 out C5
3 CTM ch7 out C6
4 CTM ch8 out D3

517
May 2018 MicroAutoBox Features
I/O Mappings

Unit Channel Signal I/O Connector Pin I/O


Shared with Bit Connector
I/O Pin
DIO ADC (FA/RE) 1 Analog 1 Group 5 ch 1 in a6
2 Analog 2 Group 5 ch 2 in b3
3 Analog 3 Group 5 ch 3 in b4
4 Analog 4 Group 5 ch 4 in b6
5 Analog 5 Group 5 ch 5 in c3
6 Analog 6 Group 5 ch 6 in c4
7 Analog 7 Group 5 ch 7 in c5
8 Analog 8 Group 5 ch 8 in c6
9 Analog 9 Group 4 ch 1 in Y3
10 Analog 10 Group 4 ch 2 in Y4
11 Analog 11 Group 4 ch 3 in Y6
12 Analog 12 Group 4 ch 4 in Z3
13 Analog 13 Group 4 ch 5 in Z4
14 Analog 14 Group 4 ch 6 in Z6
15 Analog 15 Group 4 ch 7 in a3
16 Analog 16 Group 4 ch 8 in a4

I/O Mapping for Drives Control Center Aligned

Where to go from here Information in this section

I/O Mapping of the Bit I/O Unit for DCCA ............................................ 519

I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D


Conversion for Drives Control Center Aligned ...................................... 520

518
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

I/O Mapping of the Bit I/O Unit for DCCA

Introduction Bit I/O Unit for DCCA

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 1 0 1 – – A3 Group 1 ch 1 out
1 2 – – A4 Group 1 ch 2 out
2 3 – – A5 Group 1 ch 3 out
3 4 – – A6 Group 1 ch 4 out
4 5 – – B3 Group 1 ch 5 out
5 6 – – B4 Group 1 ch 6 out
6 7 – – B5 Group 1 ch 7 out
7 8 – – – –
Group 2 0 1 T1 Group 2 ch 1 in K3 Group 2 ch 1 out
1 2 T2 Group 2 ch 2 in K4 Group 2 ch 2 out
2 3 T3 Group 2 ch 3 in K5 Group 2 ch 3 out
3 4 T4 Group 2 ch 4 in K6 Group 2 ch 4 out
4 5 T5 Group 2 ch 5 in L1 Group 2 ch 5 out
5 6 T6 Group 2 ch 6 in L2 Group 2 ch 6 out
6 7 U1 Group 2 ch 7 in L3 Group 2 ch 7 out
7 8 W6 Group 2 ch 8 in L4 Group 2 ch 8 out
Group 3 0 1 – – L5 Group 3 ch 1 out
1 2 – – L6 Group 3 ch 2 out
2 3 – – M1 Group 3 ch 3 out
3 4 – – – –
4 5 – – – –
5 6 – – – –
6 7 – – – –
7 8 – – – –
Group 4 0 1 DIO ADC, channel 9 Y3 Group 4 ch 1 in – –
1 2 DIO ADC, channel 10 Y4 Group 4 ch 2 in – –
2 3 DIO ADC, channel 11 Y6 Group 4 ch 3 in – –
3 4 DIO ADC, channel 12 Z3 Group 4 ch 4 in – –
4 5 DIO ADC, channel 13 Z4 Group 4 ch 5 in – –
5 6 DIO ADC, channel 14 Z6 Group 4 ch 6 in – –
6 7 DIO ADC, channel 15 a3 Group 4 ch 7 in – –
7 8 DIO ADC, channel 16 a4 Group 4 ch 8 in – –

519
May 2018 MicroAutoBox Features
I/O Mappings

Group RTLib Bit RTI I/O Connector Pin Shared I/O Connector Pin
Number Channel with
Input Output
Number
Pin Signal Pin Signal
Group 5 0 1 DIO ADC, channel 1 a6 Group 5 ch 1 in – –
1 2 DIO ADC, channel 2 b3 Group 5 ch 2 in – –
2 3 DIO ADC, channel 3 b4 Group 5 ch 3 in – –
3 4 DIO ADC, channel 4 b6 Group 5 ch 4 in – –
4 5 DIO ADC, channel 5 c3 Group 5 ch 5 in – –
5 6 DIO ADC, channel 6 c4 Group 5 ch 6 in – –
6 7 DIO ADC, channel 7 c5 Group 5 ch 7 in – –
7 8 DIO ADC, channel 8 c6 Group 5 ch 8 in – –
Group 6 0 1 MISO in, SPI N1 Group 6 ch 1 in D6 Group 6 ch 1 in
1 2 MOSI out, SPI N2 Group 6 ch 2 in E3 Group 6 ch 2 in
2 3 SCK out, SPI N3 Group 6 ch 3 in E4 Group 6 ch 3 in
3 4 PCS 0 out, SPI N4 Group 6 ch 4 in E5 Group 6 ch 4 in
4 5 PCS 1 out, SPI N5 Group 6 ch 5 in E6 Group 6 ch 5 in
5 6 PCS 2 out, SPI N6 Group 6 ch 6 in F1 Group 6 ch 6 in
6 7 PCS 3 out, SPI P1 Group 6 ch 7 in F2 Group 6 ch 7 in
7 8 P2 Group 6 ch 8 in F5 Group 6 ch 8 in

Related topics References

I/O Mapping for Drives Control Center Aligned ..................................................................... 518

I/O Mapping of Incremental Encoder Interface, Timing I/O and A/D Conversion
for Drives Control Center Aligned

Introduction The following table shows the I/O mapping (converter and channel numbers) of
the features served by DCCA functions of the Slave DIO MC, as used in RTI and
RTLib, to the related I/O pins of the MicroAutoBox I/O connector:

520
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features

Unit Channel Signal I/O Connector I/O


Pin Shared with Connector
Bit I/O Pin
CA MC PWM TPU 1 PWM U– on TPU ch2 out G1
(only in PWM 6 mode)
2 PWM U–on TPU ch3 out G2
(only in PWM 6 mode)
3 PWM U+ on TPU ch4 out G6
4 PWM U+on TPU ch5 out H1
5 PWM V– on TPU ch6 out H2
(only in PWM 6 mode)
6 PWM V–on TPU ch7 out H5
(only in PWM 6 mode)
7 PWM V+ on TPU ch8 out H6
8 PWM V+on TPU ch9 out J1
9 PWM W– on TPU ch10 out J2
(only in PWM 6 mode)
10 PWM W–on TPU ch11 out J3
(only in PWM 6 mode)
11 PWM W+ on TPU ch13 out J4
12 PWM W+on TPU ch14 out J5
ENC_POS 1 Signal 1 on TPU ch15 in S5
Signal 2 on TPU ch16 in S6
FPWD2D_CTM 1 CTM ch1 in M2
2 CTM ch2 in M4
3 CTM ch3 in M5
4 CTM ch4 in M6
PWM VP 1 CTM ch5 out C4
2 CTM ch6 out C5
3 CTM ch7 out C6
4 CTM ch8 out C7

521
May 2018 MicroAutoBox Features
I/O Mappings

Unit Channel Signal I/O Connector I/O


Pin Shared with Connector
Bit I/O Pin
DIO ADC (FA/RE) 1 Analog 1 Group 5 ch 1 in a6
2 Analog 2 Group 5 ch 2 in b3
3 Analog 3 Group 5 ch 3 in b4
4 Analog 4 Group 5 ch 4 in b6
5 Analog 5 Group 5 ch 5 in c3
6 Analog 6 Group 5 ch 6 in c4
7 Analog 7 Group 5 ch 7 in c5
8 Analog 8 Group 5 ch 8 in c6
9 Analog 9 Group 4 ch 1 in Y3
10 Analog 10 Group 4 ch 2 in Y4
11 Analog 11 Group 4 ch 3 in Y6
12 Analog 12 Group 4 ch 4 in Z3
13 Analog 13 Group 4 ch 5 in Z4
14 Analog 14 Group 4 ch 6 in Z6
15 Analog 15 Group 4 ch 7 in a3
16 Analog 16 Group 4 ch 8 in a4

522
MicroAutoBox Features May 2018
Appendix

Appendix

Where to go from here Information in this section

Troubleshooting ................................................................................... 523


Gives you information on known problems and their solutions.

Glossary .............................................................................................. 524


The glossary briefly explains the most important expressions and naming
conventions used in the MicroAutoBox documentation.

Troubleshooting

Introduction Gives you information on known problems and their solutions.

To stay up-to-date with information on possible problems, you should


periodically check the known problem reports at
http://www.dspace.com/go/ProblemReports.

Loading the real‑time If you want to use the Signal Generator or the Bus Navigator in ControlDesk, you
application not possible or have to set the Enable real‑time testing option in your Simulink model. For
slow new models this option is set by default. For older models it might be
automatically set when you migrate.

If the Enable real‑time testing option is set, the size of the built real‑time
application increases. The time for loading the application from the flash memory
therefore will be increased. In worst case, the rebuilt real‑time application cannot
be loaded because the board's memory is not sufficient.
§ If you do not need the real‑time testing support, clear the Enable real‑time
testing option in your model.

523
May 2018 MicroAutoBox Features
Appendix

Glossary

A ADC Analog/digital converter

C CAN Controller area network

CC Chassis control
Boot mode of MicroAutoBox providing specific TPU functions for chassis control.

CTM Configurable Timer Module


It is a 68K I/O module of the PowerPC, that measures the time in tics between
two edges (Capture & Compare Unit). If the measurement is finished, the tic
value is written to the DPMEM. The DPMEM is used to communicate with the
PowerPC.

D DAC Digital/analog converter

DC Drives control
Boot mode of MicroAutoBox providing specific TPU functions for drives control.

DCCA Drives control center aligned


Boot mode of MicroAutoBox providing specific TPU functions for drives control.
The output signals of the multi-channel PWM signal generation are center
aligned.

DCEA Drives control edge aligned


Boot mode of MicroAutoBox providing specific TPU functions for drives control.
The output signals of the multi-channel PWM signal generation are edge
aligned.

DIO Digital input/output

DPMEM Dual-port memory

E ECU Electronic control unit

EEC Extended engine control


Boot mode of MicroAutoBox providing specific TPU functions for engine control.

F F2D Frequency measurement


Two successive edges of the same level (high or low) are detected and used to
measure the time between them.

FPGA Field Programmable Gate Array. An FPGA module is used in digital


technology to allow modifications in a circuit's functionality without replacing
hardware.

FPW2D Frequency or pulse width measurement (this is identical to PPM)

524
MicroAutoBox Features May 2018
Glossary

L LIN Local interconnect network

M MC Microcontroller

P PPC Power PC processor

PPM Pulse pattern measurement

PW2D Pulse width measurement


Two successive edges of different levels (high and low) are detected and used to
measure the time between them.

PWM2D PWM measurement (frequency and duty cycle)


All the three edges within a period (high-low-high or low-high-low) are detected
and used to measure the time between them.

PWM Pulse width modulation

S SENT Single edge nibble transmission


SENT is a serial protocol used between sensors and ECUs. It is defined in the SAE
J2716 standard defined by the Society of Automotive Engineers (SAE).

SPI Serial peripheral interface

T TPU Time processing unit

525
May 2018 MicroAutoBox Features
Appendix

526
MicroAutoBox Features May 2018
Index

characteristics 161 failure actions 74


A I/O mapping 161 RTI support 76
angle interrupts 335 RTLib support 76
A/D conversion 112
application self‑test 76
ADC 1552 Type 1 133
flash memory 49 stopping the real‑time application 76
ADC 1552 Type 2 140
global memory 48 timing constraints 72
ADC Unit Type 4 117
auto negotiation 167 characteristics
AIO Type 1 128
AUTOSAR system description file 402 SPI (DIO Type 3) 456
acceleration sensor 98
AUTOSAR System Template 402 SPI (DIO Type 4) 465
measurement range 99
checksum algorithm
measuring 98
B defining 415
output data rate 99
implementing 414
read mode 99 base board
checksum error 397
register access 100 features 51
clock drift 437
RTI/RTLib support 100 basics
clock rate
sample rate 99 SENT 436
CAN MC 351
ADC 1552 Type 1 basics of LIN bus 390
Common Program Data folder 14
characteristics 133, 134 basics on RTI LIN MultiMessage Blockset 410
CommonProgramDataFolder 14
conversion trigger 135 baud rate detection 394
conversion trigger
conversion trigger overflow interrupt 138 bit I/O
ADC 1552 Type 1 135
data lost interrupt 138 DIO 1552 Type 1 156
ADC Type 4 119
data ready interrupt 138 Bit I/O
external trigger 135 DIO Type 1 144
I/O mapping 139 DIO Type 3 147 D
interrupts 137 DIO Type 4 152 D/A conversion 160
swinging buffer 134 Bit I/O (DIO 1552 Type 1) AIO Type 1 161
timer 135 I/O mapping 157 DAC 1552 Type 1 165
trigger signals 135 Bit I/O (DIO Type 1) DAC Type 1 162
trigger sources 135 I/O mapping 145 DAC Type 3 163
ADC 1552 Type 2 Bit I/O (DIO Type 3) DAC 1552 Type 1 165
characteristics 140, 141 I/O mapping 149 characteristics 165
I/O mapping 141 Bit I/O (DIO Type 4) I/O mapping 165
ADC Type 1 114 I/O mapping 154 DAC Type 1 162
characteristics 114 Bit I/O unit I/O mapping 163
I/O mapping 114 overview 143 DAC Type 3 163
ADC Type 3 115 boot firmware 46 characteristics 163
characteristics 116 boot mode 105 I/O mapping 164
I/O mapping 116 broadcast 167 DAC unit
ADC Type 4 burst trigger overview 160
burst start interrupt 125 ADC Type 4 119 data file support 352
burst trigger 119 bypass-based prototyping 169 data rates 167
characteristics 117 data transfer mechanism 44
conversion trigger 119 C database files 401
conversion trigger overflow interrupt 126 datagram size 167
CAN
data lost interrupt 126 DBC file 402
channel 346
data ready interrupt 126 decrementer 66
fault-tolerant transceiver 350
external trigger 120 defining
interrupts 353
I/O mapping 127 LIN frame 403
physical layer 347
interrupts 124 LIN master 402
service 356
swinging buffer 118 LIN slave 402
setup 345
time-stamping mode 124 defining CAN messages 352
status information 356
trigger signals 119 defining LIN communication 412
subsystem 22
trigger sources 120 defining RX and TX frames 413
CAN controller
ADC unit DHCP 167
frequency 351
I/O mapping (Slave DIO MC) 132 DIO 21
CAN FD 365
overview 112 DIO 1552 Type 1
limitations 481
Slave DIO MC 131 bit I/O 156
CAN MC clock rate 351
additional I/O 169 Bit I/O characteristics 156
CAN support 343
AIO Type 1 ADC F2D 278
challenge-response monitoring
characteristics 128, 129 I/O mapping for Bit I/O 157
basics 71
I/O mapping 129 DIO 1552 Type 1 characteristics
characteristics 71
AIO Type 1 DAC 161 F2D 279

527
May 2018 MicroAutoBox Features
Index

DIO firmware 105 characteristics 169 transmitting 403


DIO Type 1 144 I/O mapping 171 FREQ
Bit I/O characteristics 144 interrupt addresses 174 DIO 1552 Type 1 207
I/O mapping for Bit I/O 145 interrupts 56 DIO Type 3 201
SPI 453 subinterrupts 56 DIO Type 3 characteristics 201
DIO Type 1 ADC unit 131 ECU Software Porting Kit 178 DIO Type 4 204
DIO Type 3 147 example 179 DIO Type 4 characteristics 205
Bit I/O characteristics 147 working with the 178 frequency
F2D 271 Embedded PC CAN controller 351
FREQ 201 MicroAutoBox 23 frequency generation 184
FREQ characteristics 201 encoder with index input 294
I/O mapping for Bit I/O 149 End Angle 339 G
incremental encoder 296 energy-saving modes 397
global memory
incremental encoder characteristics 297 engine control
application 48
PW2D 282 example 317
glossary
PW2D characteristics 282 PMMX I/O mapping 314
MicroAutoBox terms 524
PWM 188 PSP I/O mapping 316
group 145
PWM characteristics 189 engine control modes
SPI 456 active sensor 311
DIO Type 3 characteristics passive sensor 311 H
F2D 272 Ethernet I/O Interface 167 hardware interrupts 53
DIO Type 4 152 example of LIN bus 392 high pulse 437
Bit I/O characteristics 152 external trigger high-side switches 148, 153, 156
F2D 275 ADC 1552 Type 1 135
FREQ 204 ADC Type 4 120
I
FREQ characteristics 205
I/O mapping for Bit I/O 154 I/O mapping
F
incremental encoder 301 ADC 1552 Type 1 139
F2D ADC 1552 Type 2 141
incremental encoder characteristics 301
DIO 1552 Type 1 278 ADC Type 1 114
PW2D 286
DIO Type 3 271 ADC Type 3 116
PW2D characteristics 286
DIO Type 4 275 ADC Type 4 127
PWM 193
F2D characteristics ADC unit (Slave DIO MC) 132
PWM characteristics 194
DIO 1552 Type 1 279 AIO Type 1 ADC 129
PWM2D 259
DIO Type 3 272 AIO Type 1 DAC 161
PWM2D characteristics 259
DIO Type 4 276 DAC 1552 Type 1 165
SPI 464
fast data transfer 44 DAC Type 1 163
DIO Type 4 characteristics
FIBEX file 402 DAC Type 3 164
F2D 276
firmware 46 DS1401 IP module 422
DIO_TYPE3_SENT_RX_BLx
flash memory ECU interface 171
implementing 444
application 49 F2D (DIO 1552 Type 1) 280
DIO_TYPE4_SENT_RX_BLx
FlexRay F2D (DIOTP3) 273
implementing 444
IP Module 22 F2D (DIOTP4) 277
Documents folder 14
MicroAutoBox 417 FREQ (DIO 1552 Type 1) 208
DocumentsFolder 14
support 417 FREQ (DIOTP3) 202
DPMEM
flight recorder 84, 85 FREQ (DIOTP4) 206
Slave DIO MC 21
time stamps 86 MicroAutoBox FlexRay 418
DS1401
using 86 PMMX 314
features 51
FPGA support 426 PPM measurement on CTM (CC/DC) 268
DS1401 Base board 21
access functions 427 PPM measurement on CTM (EEC) 268
DS1552 Multi-I/O Module
accessing FPGA Type 1 427 PPM measurement on TPU 271
feature overview 22
hardware components 426 PPM/FPW2D measurement
DS1554 Engine Control I/O Module
RTI support 428 on CTM (CC/DC) 268
feature overview 23
RTLib support 428 on CTM (EEC) 268
duty cycle 184
software components 426 on TPU 271
Dwell Time 339
FPW2D PSP 316
on CTM for CC/DC 267 PW2D 254
E on CTM for EEC 267 PW2D (DIOTP3) 284
ECU on TPU 270 PW2D (DIOTP4) 288
data types 175 frames PWM (DIO 1552 Type1) 200
DPMEM addresses 173 manipulating 404 PWM (DIOTP3) 191
interface unit receiving 403 PWM (DIOTP4) 196

528
MicroAutoBox Features May 2018
Index

PWM_FP (EEC) 212 broadcast/peer-to-peer messages 370 RTLib support 79


PWM_FP_TPU (EEC) 214 limitations 482 run‑time behavior 79
PWM_VP 185 working with J1939-compliant DBC files 370 message frame 391
PWM2D (DIO 1552 Type 1) 264 J2716 (SAE) 436 messages
PWM2D (DIOTP3) 257 defining CAN messages 352
PWM2D (DIOTP4) 261 L delay time 352
serial interface 432 multiple 353
LDF file 401
SPI (DIO Type 1) 455 MicroAutoBox
limitations
SPI (DIO Type 3) 461 diagnostic feature 474
CAN FD 481
SPI (DIO Type 4) 469 glossary 524
J1939 482
stepper motor control 307 MicroAutoBox Embedded PC 39
RTI CAN MultiMessage Blockset 479
TPU_PWM generation 187 feature overview 23
limitations of RTI LIN MultiMessage Blockset
I/O modules MicroAutoBox II 1401/1501 27
482
MicroAutoBox 22 MicroAutoBox II 1401/1504 28
LIN
identifier-parity error 396 MicroAutoBox II 1401/1505/1507 29
I/O mapping 388
implementing MicroAutoBox II 1401/1507 30
schedules 407
SENT 440 MicroAutoBox II 1401/1511 31
sleep mode 405
implementing checksum algorithm 414 MicroAutoBox II 1401/1511/1512 32
support 387
inconsistent-synch-byte error 396 MicroAutoBox II 1401/1511/1512 with DS1552
LIN bus
incremental encoder 291 Multi-I/O Module 37
controlling 404
channel usage (DIO Type 3) 299 MicroAutoBox II 1401/1511/1514 33
handling 399
channel usage (DIO Type 4) 303 MicroAutoBox II 1401/1511/1514 with DS1552
waking up 405
DIO Type 3 296 Multi-I/O Module 37
LIN bus basics 390
DIO Type 4 301 MicroAutoBox II 1401/1511/1514 with DS1554
LIN bus parameters
I/O mapping (DIO Type 3) 299 Engine Control I/O Module 38
changing 406
I/O mapping (DIO Type 4) 304 MicroAutoBox II 1401/1512/1513 34
specifying 401
noise filter sample rate (DIO Type 3) 298 MicroAutoBox II 1401/1512/1513 with DS1552
LIN communication
noise filter sample rate (DIO Type 4) 302 Multi-I/O Module 37
defining 412
incremental encoder (DCCA) 293 MicroAutoBox II 1401/1513 35
LIN frame
characteristics 294 MicroAutoBox II 1401/1513/1514 36
defining 403
I/O mapping 294 MicroAutoBox II 1401/1513/1514 with DS1552
LIN frames
incremental encoder (DCEA) 294 Multi-I/O Module 37
receiving 412
characteristics 295 MicroAutoBox II 1401/1513/1514 with DS1554
transmitting 412
I/O mapping 295 Engine Control I/O Module 38
LIN master 391
incremental encoder characteristics multiple data files 352
LIN nodes
DIO Type 3 297 multiple message support 353
switching 405
DIO Type 4 301
LIN slave
incremental encoder interface N
defining 402
overview 290
LIN specifications nibble pulse 438
in-frame response time 394
supported 390
interrupt
Local Program Data folder 14 P
burst start 125
LocalProgramDataFolder 14
conversion trigger overflow 126, 138 pause pulse 438
low pulse 437
data lost 126, 138 piggyback boards
low-side switches 148, 153, 156
data ready 126, 138 MicroAutoBox 22
interrupt handling 53 piggyback support 350
interrupts M PMMX
ADC 1552 Type 1 137 manipulating camshaft sensor 324
ADC Type 4 124 frames 404 camshaft synchronization 324
IP fragmentation 167 manipulating TX signals 416 counters increment across gaps 322
IP module MAT format 93 I/O mapping 314
DS1401 422 MC 68336 21 missing tooth filler 322
support 421 measurement mode noise suppression 323
IP Module Support 421 PW2D (DIOTP3) 283 pre-synchronized state 322
IP modules PW2D (DIOTP4) 287 simulated tooth 322
MicroAutoBox 421 memory integrity and extras tooth counters 321
ISO11898 348 basics 76 PMMX features 312
ISO11898‑6 349 characteristics 77 polarity 184
failure actions 78 power hold on 95
J prerequisites 77 PPC
RTI support 79 MicroAutoBox II Base board 42
J1939

529
May 2018 MicroAutoBox Features
Index

PPM SENT message via RTI 444 sleep mode


on CTM for CC/DC 267 receiving frames 403 LIN bus 405
on CTM for EEC 267 register functions 44 SPI
on TPU 270 remaining bus simulation 393 characteristics (DIO Type 1) 454
PPM/FPW2D measurement request functions 44 DIO Type 1 453
on CTM routing 167 DIO Type 3 456
I/O mapping (CC/DC) 268 RS485 350 DIO Type 4 464
I/O mapping (EEC) 268 RTI CAN MultiMessage Blockset master mode 455
on TPU limitations 479 SPI (DIO Type 3)
I/O mapping 271 RTI LIN MultiMessage Blockset characteristics 456
pressure sensor 101 basics 410 examples 458
RTI/RTLib support 101 limitations 482 I/O mapping 461
PSP RTICANMM timing behavior 457
angle-time mode 341 CAN FD 481 SPI (DIO Type 4)
Dwell Time 339 J1939 482 characteristics 465
End Angle 339 RTILINMM examples 467
how PSP works 338 checksum header file 415 I/O mapping 469
I/O mapping 316 RX frames timing behavior 466
time-angle angle-priority 340 defining 413 status information
time-angle operation 339 RX service support 354 reading 406
PSP features 312 stepper motor control
pulse angle scheduling 339 S I/O mapping 307
pulse width analysis subinterrupt handling 176
SAE J2716 436
I/O mapping 254 word-based 58
SAE standards
PW2D swinging buffer
supported 390
DIO Type 3 282 ADC 1552 Type 1 134
safety functions 68
DIO Type 3 characteristics 282 ADC Type 4 118
basics 68
DIO Type 4 286 switching
challenge-response monitoring 71
DIO Type 4 characteristics 286 LIN nodes 405
functional safety extras 76
PWM sync high pulse 437
memory integrity and extras 76
DIO 1552 Type 1 198 sync pulse 438
schedule
DIO Type 3 188
LIN 407
DIO Type 4 193 T
priority 408
DIO Type 4 characteristics 194
setting up 407 time base
PWM channel (EEC) 212
SENT 435 USB Flight Recorder 92
PWM characteristics
basics 436 time base counter 66
DIO Type 3 189
implementing on MicroAutoBox 440 time stamps
PWM period 184
signal 436 flight recorder 86
PWM_FP
terms and definitions 436 time-angle angle-priority 340
I/O mapping 212
SENT message time-angle time-priority 339
PWM_FP_TPU
receiving 447 timer 65
I/O mapping (EEC) 214
receiving via RTI 444 timer control
PWM_FP_TPU channel (EEC) 214
SENT pulse 437 ADC 1552 Type 1 135
PWM_VP
serial interface 431 timer services
I/O mapping 185
baud rates 434 overview 65
PWM2D
I/O mapping 432 time-stamping mode
DIO 1552 Type 1 263
oscillator frequency 434 ADC Type 4 124
DIO Type 3 256
serial peripheral interface TJA1041
DIO Type 4 259
DIO Type 3 456 limitations 350
DIO Type 4 characteristics 259
DIO Type 4 464 TJA1054
signal transceiver 350
R SENT message 436 TPU_PWM generation
RapidPro diagnostic for MicroAutoBox 474 signal generation I/O mapping 187
ratio 333 overview 180 transceiver
raw data signal measurement TJA1054 350
working with 413 overview 250 transmitting frames 403
read functions 44 slave access functions 44 trigger signals
reading Slave DIO MC ADC 1552 Type 1 135
status information 406 ADC unit 131 ADC Class 1 119
receiving PWM2D measurement 253 ADC Type 4 119
SENT message 447 slave-not-responding error 397 trigger sources

530
MicroAutoBox Features May 2018
Index

ADC 1552 Type 1 135


ADC Type 4 120
troubleshooting
loading application fails 523
loading application slower than before 523
MicroAutoBox 523
real-time testing support 523
TX frames
defining 413
TX signals
manipulating 416

U
upcounter 65
update mode
PW2D (DIOTP3) 283
PW2D (DIOTP4) 287
USB Flight Recorder 88
avoiding data loss 90
basics 89
FTP connection 91
limitations 92
max. data rate 92
overwrite mode 90
time base 92
USB mass storage device 90
USB status LED 92
using 93
using
flight recorder 86

W
waking up a LIN bus 405
watchdog handling
basics 69
handling interrupts 71
hook function 71
restart monitoring 70
RTI support 71
RTLib support 71
stop monitoring 70
watchdog timer 70
word-based subinterrupt handling 58
working with CAN FD 365
working with raw data 413

Z
zero nibble pulse 438

531
May 2018 MicroAutoBox Features
Index

532
MicroAutoBox Features May 2018

You might also like