Micro Auto Box Features
Micro Auto Box Features
Features
For all variants of MicroAutoBox
If possible, always provide the relevant dSPACE License ID or the serial number of the
CmContainer in your support request.
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.
This publication and the contents hereof are subject to change without notice.
Contents
3
May 2018 MicroAutoBox Features
Contents
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
Flight Recorder............................................................................................................ 84
4
MicroAutoBox Features May 2018
Contents
5
May 2018 MicroAutoBox Features
Contents
6
MicroAutoBox Features May 2018
Contents
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
7
May 2018 MicroAutoBox Features
Contents
8
MicroAutoBox Features May 2018
Contents
9
May 2018 MicroAutoBox Features
Contents
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
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
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
13
May 2018 MicroAutoBox Features
About This Reference
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:
Special folders Some software products use the following special folders:
14
MicroAutoBox Features May 2018
Accessing dSPACE Help and PDF Files
%USERPROFILE%\AppData\Local\dSPACE\<InstallationGUID>\
<ProductName>
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.
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
15
May 2018 MicroAutoBox Features
About This Reference
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:
Related Documents
Related documents Below is a list of documents that you are also recommended to read when
working with MicroAutoBox.
16
MicroAutoBox Features May 2018
Related Documents
17
May 2018 MicroAutoBox Features
About This Reference
18
MicroAutoBox Features May 2018
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.
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.
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
The DS1401 base board and the I/O boards are connected via an internal bus
(intermodule bus).
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.
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:
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.
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.
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
These are the most important DS1401 Base Board revisions of MicroAutoBox II:
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.
24
MicroAutoBox Features May 2018
System Overview
I/O board revisions The following I/O board revisions are of interest:
25
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox
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
ECU interface
Decrementer, unit 1
time base
DAC unit
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
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
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
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
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
CAN controller
CAN controller
CAN controller
Serial interface
Serial interface
LIN controller
LIN controller
LIN / K-Line
LIN / K-Line
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
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
CAN subsystem 2
DPMEM DPMEM
FlexRay IP module 1
FlexRay IP module 2
CAN controller
CAN controller
CAN controller
Serial interface
Serial interface
LIN controller
LIN controller
LIN / K-Line
LIN / K-Line
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
DAC unit
Decrementer, Type 3
time base
ADC unit
Type 4
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
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
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
interface
Serial interface
CAN controller
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
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
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
interface
Serial interface
CAN controller
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
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
Slave CAN MC
ECU interface DPMEM
I/O connector Serial interface
unit B
CAN controller
Ethernet I/O
I/O connector
interface CAN controller
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM
Serial interface
CAN controller
CAN controller
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
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
F2D
Flash
memory Bit I/O In
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
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
Slave CAN MC
ECU interface DPMEM
I/O connector Serial interface
unit B
CAN controller
Ethernet I/O
I/O connector
interface CAN controller
LIN controller
LIN / K-Line
Slave CAN MC
DPMEM
Serial interface
CAN controller
CAN controller
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
36
MicroAutoBox Features May 2018
System Overview
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.
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
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
DS1511/DS1513
(For details, refer to MicroAutoBox II 1401/1511
or MicroAutoBox II 1401/1513)
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
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.
Decrementer,
time base FlexRay IP module 1
FlexRay IP module 2
Knock
ECU interface
I/O connector
ECU interface
I/O connector
unit B Cam
Ethernet I/O
I/O connector
interface
DS1511/DS1513
(For details, refer to MicroAutoBox II 1401/1511
or MicroAutoBox II 1401/1513)
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.
I/O connector
ECU A
USB
(Flight recorder)
Power input
Ethernet
Gigabit Ethernet switch
Host PC
WLAN
Power supply
(optional)
Gigabit Ethernet switch
1 x LEMO PCI e
2 x RJ45
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).
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.
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
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
41
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox
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
42
MicroAutoBox Features May 2018
Base Board's Basics
Onboard sensors Since board revision DS1401‑23, the MicroAutoBox II Base board provides
onboard sensors for:
§ Pressure measurement
§ Acceleration measurement
References
43
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox
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.
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
45
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox
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
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.
47
May 2018 MicroAutoBox Features
Introduction to the Features of MicroAutoBox
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.
48
MicroAutoBox Features May 2018
MicroAutoBox Application Start
References
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
50
MicroAutoBox Features May 2018
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.
51
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
52
MicroAutoBox Features May 2018
Interrupt Handling
Interrupt Handling
Introduction General information on the interrupt handling provided by the MicroAutoBox
Base board.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ – – – – – – – –
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.
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:
53
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
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.
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.
Note
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
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.
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
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.
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ ✓ – ✓ ✓ – – – –
Note
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.
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:
DSECU_THIRTY_PLUS_X_
FREE_DPM_WORDS
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.
The following illustration shows the activities from the ECU side (the RTP uses its
DPMEM addresses to perform corresponding actions):
ECU DPMEM
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:
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
ECU “alive-write”
RTP “alive-write”
References
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:
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.
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.
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.
64
MicroAutoBox Features May 2018
Timer Services
Timer Services
Introduction MicroAutoBox provides incremental and decremental timer services.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ – – – – – – – –
Timer ..................................................................................................... 65
Decrementer .......................................................................................... 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
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)
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
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.
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.
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 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 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.
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.
69
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
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
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
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.
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.
71
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
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
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
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
Challenge period
Response timeout
Task period
t
C = challenge R = response
Failure actions For failure handling four failure actions are available.
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.
V CAUTION
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
With RTI, you can use the CRM_SUPERVISION_STATUS block 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.
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.
Note
V CAUTION
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
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.
79
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
RTC RAM Access ✓ – – – – – – – –
Nonvolatile RAM Access ✓ – – – – – – – –
Flash Memory 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:
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.
81
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
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.
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.
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.
83
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
Flight Recorder
Introduction MicroAutoBox offers two different flight recorders for long-term data acquisition.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ – – – – – – – –
84
MicroAutoBox Features May 2018
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.
0.75
0.25 2
0 16 MB
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.
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).
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);
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ – – – – – – – –
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.
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.
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
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
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 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
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
USB status LED The status LED of the USB connector displays the current status of the USB
device and the flight recorder.
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.
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).
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).
94
MicroAutoBox Features May 2018
Power Hold Control
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
For further information, refer to I/O Features and Boot Modes on page 105.
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.
Note
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
97
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
Onboard Sensors
Where to go from here Information in this section
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓1) – – – – – – – –
1) Board revision DS1401‑23 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.
98
MicroAutoBox Features May 2018
Onboard Sensors
Thus, any static position or movement of the system can be detected and
calculated.
Earth gravity
Z
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:
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.
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
Introduction The pressure sensor of MicroAutoBox allows you to consider the air pressure to
your real-time application, for example, for engine control.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓1) – – – – – – – –
1) Board revision DS1401‑23 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)
101
May 2018 MicroAutoBox Features
MicroAutoBox Basic Features
102
MicroAutoBox Features May 2018
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.
103
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
104
MicroAutoBox Features May 2018
I/O Features and 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.
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
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.
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.
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.
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 run-time adjustable period and duty
cycle
§ See PWM Generation with a Variable Period (PWM_VP) on the CTM
on page 184.
109
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
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
113
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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:
114
MicroAutoBox Features May 2018
A/D Conversion
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – ✓ – – – – – –
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:
References
116
MicroAutoBox Features May 2018
A/D Conversion
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – ✓ –
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.
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
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.
118
MicroAutoBox Features May 2018
A/D Conversion
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
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.
119
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
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.
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
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.
123
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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.
Note
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.
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
Note
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
...
t
Conversion trigger Conversion trigger
Burst Burst
Data ready Data ready
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 trigger
Burst
Conversion
trigger
t t
Conversion
trigger
Conversion time Conversion time
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.
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
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:
127
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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.
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):
129
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
ADC 1552 Type 2 Unit for DS1552 Multi-I/O Module ( MicroAutoBox RTLib
Reference)
AIO_TYPE1_ADC_BLx ( MicroAutoBox RTI Reference)
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
For further information, refer to I/O Features and Boot Modes on page 105.
130
MicroAutoBox Features May 2018
A/D Conversion
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).
Note
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.
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
132
MicroAutoBox Features May 2018
A/D Conversion
References
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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.
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
134
MicroAutoBox Features May 2018
A/D Conversion
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.
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 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
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.
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.
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
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.
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
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):
139
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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.
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)
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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.
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):
141
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
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
143
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
146
MicroAutoBox Features May 2018
Bit I/O
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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).
Output
GND
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
149
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
150
MicroAutoBox Features May 2018
Bit I/O
Digital outputs
151
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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).
Output
GND
153
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
154
MicroAutoBox Features May 2018
Bit I/O
Digital outputs
155
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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).
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).
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
157
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
158
MicroAutoBox Features May 2018
Bit I/O
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
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
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
– – – – – – – ✓ DS1514
–
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):
161
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ – ✓ – – – – –
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:
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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
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):
164
MicroAutoBox Features May 2018
D/A Conversion
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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):
165
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ – – – – – – – –
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.
167
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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).
HowTos
References
168
MicroAutoBox Features May 2018
ECU Interface
ECU Interface
Hardware and boot mode Supported MicroAutoBox hardware:
requirements
MicroAutoBox with I/O Boards
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ ✓ – ✓ ✓ – – – –
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
References
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.
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:
Note
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.
171
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
Working Modes
Introduction The ECU interface supports three working modes. In your ECU program, you
determine the mode to be used.
write
read
read
write
write
read
t t
172
MicroAutoBox Features May 2018
ECU Interface
write
interrupt
read
wait
write
EOI
read
t
write
interrupt
read
write
EOI
read
t
References
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:
+ 0x7FFE Reserved
range
ECU address offset + 0x7FFC
Allowed
addresses
+ 0x0002
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.
174
MicroAutoBox Features May 2018
ECU Interface
end of the range "Allowed addresses" to preserve a consecutive range for the
data transfer.
References
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.
175
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
ECU Interrupts
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.
176
MicroAutoBox Features May 2018
ECU Interface
References
177
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
✓ ✓ – ✓ ✓ – – – –
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.
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
Example The following example demonstrates how to use the ECU Software Porting Kit:
#include <stdlib.h>
#include <dsECUframe.c>
void main(void)
{
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;
}
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);
}
}
}
179
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
PWM Generation with a Variable Period (PWM_VP) on the CTM .......... 184
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
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
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
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.
181
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
182
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period
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
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
The following illustration shows how the duty cycle (T/Tp ratio) and polarity are
defined.
PWM
output
low
T Tp t
PWM
output
low
Tp t
(PWM period)
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
References
Purpose To generate low active square-wave signals with variable periods and variable
duty cycles adjustable during run time.
Note
186
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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.
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.
187
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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
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
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.
References
Purpose To generate a PWM signal with the period and duty cycle adjustable during run
time.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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
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
Note
Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.
197
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
Purpose To generate a PWM signal with the period and duty cycle adjustable during run
time using the DS1552 Multi-I/O Module.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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.
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).
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.
References
Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50%.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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
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
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.
References
Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50%.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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
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.
Note
Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.
206
MicroAutoBox Features May 2018
PWM Signal Generation with a Variable Period
References
Purpose To generate square-wave signals with variable frequencies and a fixed duty cycle
of 50% using the DS1552 Multi-I/O Module.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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.
207
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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).
208
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.
References
209
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
PWM Generation with a Fixed Period (PWM_FP) for EEC ...................... 210
PWM Generation with a Fixed Period (PWM_FP_TPU) for EEC .............. 213
Purpose To generate PWM signals (PWM_FP) with fixed period and run‑time adjustable
duty cycle for extended engine control (EEC).
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
low
T Tp t
PWM
output
low
Tp t
(PWM period)
The following table shows the available ranges for PWM generation:
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.
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.
References
212
MicroAutoBox Features May 2018
PWM Signal Generation with a Fixed Period
Purpose To generate PWM signals (PWM_FP_TPU) with fixed period and run‑time
adjustable duty cycle for extended engine control (EEC).
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
– ✓ ✓ ✓ – – – – DS1514
–
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
Note
The following illustration shows how the duty cycle (T/Tp ratio) and polarity are
defined.
PWM
output T
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.
214
MicroAutoBox Features May 2018
PWM Signal Generation with a Fixed Period
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.
References
215
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Note
216
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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.
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
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.
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:
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.
References
Note
219
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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.
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)
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
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.
222
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
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–
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:
223
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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.
Note
The TPU channels 1 and 14 are used for internal purposes and thus have
undefined signal sequences at their outputs.
224
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
References
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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.
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.
226
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
PWM U+
PWM V+
PWM W+
TP
Thigh, U
PWM U+
t
Thigh, V
PWM V+
t
Thigh, W
PWM W+
227
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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)
Thigh, U
PWM U+
t
Thigh, V
PWM V+
t
Thigh, W
PWM W+
PWM U-
PWM V-
PWM W-
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
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
230
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
Change to
Duty cycle U = 0.5 duty cycle = 0.7
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
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
Change to
Duty cycle V = 0.3 duty cycle = 0.5
Change to
Duty cycle = 0.2 duty cycle = 0.3
<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.
Interrupts and external trigger pulses can be generated at the start and/or in the
middle of a period.
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
Event delay t
∆t ∆t ∆t ∆t
Start of a period
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.
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.
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
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.
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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.
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.
238
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
PWM U+
PWM V+
PWM W+
TP
Thigh, U
PWM U+
t
Thigh, V
PWM V+
t
Thigh, W
PWM W+
239
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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)
Thigh, U
PWM U+
t
Thigh, V
PWM V+
t
Thigh, W
PWM W+
PWM U-
PWM V-
PWM W-
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
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
242
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
Change to
Duty cycle U = 0.5 duty cycle = 0.7
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
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
Change to
Duty cycle V = 0.3 duty cycle = 0.5
Change to
Duty cycle = 0.2 duty cycle = 0.3
<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.
Interrupts and external trigger pulses can be generated at the start and/or in the
middle of a period.
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
Event delay t
∆t ∆t ∆t ∆t
Start of a period
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.
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.
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
Note
Concurrent access to the same digital output channel(s) by other DIO Type 4
blocks or functions is not allowed.
248
MicroAutoBox Features May 2018
Multi-Channel PWM Signal Generation (MC_PWM)
References
249
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
PWM Measurement (PWM2D) on the DIO 1552 Type 1 Unit ................ 263
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
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)
251
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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)
Purpose To measure frequency and duty cycle of PWM signals in chassis control boot
mode.
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
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.
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)
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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
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
256
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)
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
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.
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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
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
260
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)
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
Note
Concurrent access to the same digital input channel by other DIO Type 4
blocks or functions is not supported.
262
MicroAutoBox Features May 2018
PWM Signal Measurement (PWM2D)
References
Purpose To measure the pulse width, frequency and duty cycle of PWM signals using a
DS1552 Multi-I/O Module.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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.
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
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)
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.
References
265
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Pulse Pattern Measurement (PPM, FPW2D) on the TPU for CC ............. 269
Frequency Measurement (F2D) on the DIO 1552 Type 1 Unit ................ 278
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
266
MicroAutoBox Features May 2018
Pulse Pattern Measurement
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.
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
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.
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.
268
MicroAutoBox Features May 2018
Pulse Pattern Measurement
References
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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:
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.
References
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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:
272
MicroAutoBox Features May 2018
Pulse Pattern Measurement
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
Note
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
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.
References
Purpose To measure the frequency of a square-wave signal. The measurement covers the
values of one period.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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:
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
Note
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.
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.
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓1) – ✓1)
1) Requires a DS1552 Multi-I/O Module.
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:
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
279
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Note
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).
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.
280
MicroAutoBox Features May 2018
Pulse Pattern Measurement
References
281
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Pulse Width Measurement (PW2D) on the DIO Type 3 Unit .................. 282
Pulse Width Measurement (PW2D) on the DIO Type 4 Unit .................. 286
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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)
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).
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.
284
MicroAutoBox Features May 2018
Pulse Width Measurement (PW2D)
Note
Concurrent access to the same digital input channel by other DIO Type
blocks or functions is not supported.
285
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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.
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).
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.
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)
References
289
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
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.
Note
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
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.
PHI0
PHI90
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
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:
References
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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:
295
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
References
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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.
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
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.
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.
Tip
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:
299
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Note
300
MicroAutoBox Features May 2018
Incremental Encoder Interface
References
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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.
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
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.
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.
Tip
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:
Note
304
MicroAutoBox Features May 2018
Incremental Encoder Interface
References
305
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
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
Note
(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.
307
May 2018 MicroAutoBox Features
MicroAutoBox I/O Features
308
MicroAutoBox Features May 2018
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
For further information, refer to I/O Features and Boot Modes on page 105.
309
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
How Extended Period Measurement for Engine Control Works ............ 320
310
MicroAutoBox Features May 2018
Basics on Extended Engine Control
Note
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.
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
Note
PMMX features PMMX is an input function which is specifically designed to correctly process the
input signals from crankshaft timing wheels.
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
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:
313
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
Note
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.
Note
How Extended Period Measurement for Engine Control Works ............................................. 320
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
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 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:
Note
The following table shows the PSP resolution in relation to the selected prescaler
value for a 60-2 wheel:
315
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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
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.
316
MicroAutoBox Features May 2018
Basics on Extended Engine Control
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.
How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338
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
magnetic sensor
Flywheel
crankshaft PMMX Engine
C Channel positon
60-2
D: High-current
PSP
A D Channel 2
time-angle angle
prior
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
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.
319
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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.
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.
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.
321
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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.
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
§ 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.
323
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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.
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.
324
MicroAutoBox Features May 2018
How Extended Period Measurement for Engine Control Works
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:
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.
18° 54° 240° 276° 462° 519° 684° 720° 18° 54°
...
*1 *2 *3 *4 *5 *6 *7
325
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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
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
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
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.
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.
. . . . . .
*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.
. . . . . .
. . .
*1 *2 *3 *4 *5
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).
How Extended Period Measurement for Engine Control Works ............................................. 320
Examples
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).
. . . . . .
*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.
. . . . . .
*1 *2 *3 *4 *5
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.
How Extended Period Measurement for Engine Control Works ............................................. 320
Examples
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)
The camshaft windows are defined within the ranges 18° … 54°, 240° … 276°,
462° … 489° and 684° … 720°.
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
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
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
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)
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°.
How Extended Period Measurement for Engine Control Works ............................................. 320
Examples
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.
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.
333
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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.
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
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.
References
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:
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
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
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.
0 36
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
How Extended Period Measurement for Engine Control Works ............................................. 320
How Position-Synchronized Pulse Generation for Engine Control Works ............................... 338
References
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:
337
May 2018 MicroAutoBox Features
Extended Engine Control (EEC)
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.
338
MicroAutoBox Features May 2018
How Position-Synchronized Pulse Generation for Engine Control Works
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
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.
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.
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.
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°).
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°).
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ – ✓ ✓ – ✓ –
343
May 2018 MicroAutoBox Features
CAN Support
344
MicroAutoBox Features May 2018
Setting Up a CAN Controller
345
May 2018 MicroAutoBox Features
CAN Support
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:
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:
1 bit time
Sync-
Seg TSeg1 TSeg2
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
Note
RTI support You initialize a CAN controller with the RTICAN CONTROLLER SETUP block.
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
Supported transceivers The following table lists dSPACE hardware and the supported transceivers:
Note
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
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.
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.
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.
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
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.
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 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 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:
Configuring CAN Messages via Data Files ( RTI CAN Blockset Reference)
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
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
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.
Note
You can define the interrupt on the Unit Page (RTI CAN Interrupt) ( 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
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).
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
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
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.
358
MicroAutoBox Features May 2018
Setting Up a CAN Controller
359
May 2018 MicroAutoBox Features
CAN Support
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).
360
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset
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
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.
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
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.
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
The RTI CAN MultiMessage Blockset lets you specify the CAN partial networking
wake‑up messages by filtering message IDs and message data.
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.
Introduction Using the CAN FD protocol allows data rates higher than 1 Mbit/s and payloads
longer than 8 bytes per message.
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.
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.
Arbitration Arbitration
phase Data 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.
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
ACK delimiter
CRC delimiter
SOF Identifier r1 IDE EDL r0 BRS ESI DLC Data CRC ACK EOF IFS
ACK delimiter
CRC delimiter
SOF Identifier RRS IDE FDF res BRS ESI DLC Data Stuff CRC ACK EOF IFS
count
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
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).
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.
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):
§ 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.
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.
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
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
373
May 2018 MicroAutoBox Features
CAN Support
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.
374
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset
Note
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.
The RTI CAN MultiMessage Blockset supports J1939 message packaging via BAM
and RTS/CTS.
375
May 2018 MicroAutoBox Features
CAN Support
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.
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.
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.
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.
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
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.
378
MicroAutoBox Features May 2018
Using the RTI CAN MultiMessage Blockset
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.
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
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
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).
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).
381
May 2018 MicroAutoBox Features
CAN Support
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
382
MicroAutoBox Features May 2018
CAN Signal Mapping
383
May 2018 MicroAutoBox Features
CAN Support
384
MicroAutoBox Features May 2018
CAN Signal Mapping
385
May 2018 MicroAutoBox Features
CAN Support
386
MicroAutoBox Features May 2018
LIN Support
LIN Support
Introduction The following chapter contains information on the LIN support for
MicroAutoBox.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ – ✓ ✓ – ✓ –
Characteristics Depending on the variant you use, MicroAutoBox is equipped with a different
number of CAN_TP1 modules.
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:
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.
388
MicroAutoBox Features May 2018
LIN Support
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
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.
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 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.
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
Central body
Climate
control
Light
Instruments
Mirror CAN
Mirror
LIN
Seat Roof Seat
Lock Lock
Heating Heating
Seat
Wiper
Universal Panel
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.
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
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.
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.
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.
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
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.
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
Start Stop
bit bit
Length control
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.
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
398
MicroAutoBox Features May 2018
LIN Bus Handling
Introduction To transmit and receive frames you have to set up the LIN bus.
399
May 2018 MicroAutoBox Features
LIN Support
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
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.
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.
Introduction After the LIN bus is set up, you can define all simulated LIN nodes.
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).
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).
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.
404
MicroAutoBox Features May 2018
LIN Bus Handling
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.
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).
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
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).
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.
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
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).
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.
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
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
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.
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.
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.
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.
414
MicroAutoBox Features May 2018
Using the RTI LIN MultiMessage Blockset
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.
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:
415
May 2018 MicroAutoBox Features
LIN Support
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.
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – ✓ – ✓ – ✓
417
May 2018 MicroAutoBox Features
FlexRay Support
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.
418
MicroAutoBox Features May 2018
Basics on FlexRay Support
419
May 2018 MicroAutoBox Features
FlexRay Support
420
MicroAutoBox Features May 2018
IP Module Support
IP Module Support
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – ✓ – ✓ – ✓
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
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
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.
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
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – ✓ – ✓
425
May 2018 MicroAutoBox Features
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.
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
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.
References
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
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.
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).
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
– ✓ ✓ – ✓ ✓ – ✓ DS1514
–
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
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.
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.
432
MicroAutoBox Features May 2018
Basics on Serial Interface
433
May 2018 MicroAutoBox Features
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:
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
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
Introduction You can implement the SENT protocol on MicroAutoBox using RTI blocks or
RTLib functions.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – ✓ –
435
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
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
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.
Sync pulse
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%.
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:
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:
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:
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:
439
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
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.
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
Note
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):
441
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
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
Note
Concurrent access to the same digital input channel by other DIO Type 3 or
DIO Type 4 blocks or functions is not allowed.
443
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
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).
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
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.
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.
Tick period The Tick Period outport provides the actual tick period which is
calculated from the last received valid synchronization pulse.
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
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:
447
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
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
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
References
451
May 2018 MicroAutoBox Features
Single Edge Nibble Transmission (SENT) Support
452
MicroAutoBox Features May 2018
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.
Introduction Note
453
May 2018 MicroAutoBox Features
Serial Peripheral Interface
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
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
454
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 1 Unit
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).
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:
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
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.
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – ✓ – – –
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
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.
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.
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.
458
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 3 Unit
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
MOSI 1 2 3 4 5 6 1 2 3 4 5 6
CPHA=0, CPOL=0
CS
CLK
CPHA=0, CPOL=1
CS
CLK
CPHA=1, CPOL=0
CS
CLK
CPHA=1, CPOL=1
CS
CLK
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.
MOSI 1 2 3 4 5 6 1 2 3 4 5 6
CPHA=0, CPOL=0
CS
CLK
CPHA=0, CPOL=1
CS
CLK
CPHA=1, CPOL=0
CS
CLK
CPHA=1, CPOL=1
CS
CLK
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.
You can use one of the following digital input channels available on the DS1511
I/O connector to connect to the MISO signal.
461
May 2018 MicroAutoBox Features
Serial Peripheral Interface
Note
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.
463
May 2018 MicroAutoBox Features
Serial Peripheral Interface
Note
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
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– – – – – – – ✓ –
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
465
May 2018 MicroAutoBox Features
Serial Peripheral Interface
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.
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
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.
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
MOSI 1 2 3 4 5 6 1 2 3 4 5 6
CPHA=0, CPOL=0
CS
CLK
CPHA=0, CPOL=1
CS
CLK
CPHA=1, CPOL=0
CS
CLK
CPHA=1, CPOL=1
CS
CLK
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
MOSI 1 2 3 4 5 6 1 2 3 4 5 6
CPHA=0, CPOL=0
CS
CLK
CPHA=0, CPOL=1
CS
CLK
CPHA=1, CPOL=0
CS
CLK
CPHA=1, CPOL=1
CS
CLK
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.
You can use one of the following digital input channels available on the DS1513
I/O connector to connect to the MISO signal.
470
MicroAutoBox Features May 2018
Serial Peripheral Interface on the DIO Type 4 Unit
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.
471
May 2018 MicroAutoBox Features
Serial Peripheral Interface
Note
Multiple access to the same digital output channels by other DIO TYPE 4
blocks or functions is not allowed.
472
MicroAutoBox Features May 2018
RapidPro Diagnostic
RapidPro Diagnostic
Note
DS1501
DS1504
DS1505
DS1507
DS1511
DS1512
DS1513
DS1514
– ✓ ✓ ✓ – – – – –
For further information, refer to I/O Features and Boot Modes on page 105.
473
May 2018 MicroAutoBox Features
RapidPro Diagnostic
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.
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
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).
475
May 2018 MicroAutoBox Features
RapidPro Diagnostic
476
MicroAutoBox Features May 2018
Limitations
Limitations
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.
477
May 2018 MicroAutoBox Features
Limitations
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:
The maximum number of CAN messages nmax is listed in the table below:
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.
Maximum number of CAN The number of available CAN subinterrupts you can implement in an application
subinterrupts is limited:
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 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 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.
Introduction Limitations apply when you use the RTI LIN MultiMessage Blockset.
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:
484
MicroAutoBox Features May 2018
Limitations of RTI LIN MultiMessage Blockset
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.
487
May 2018 MicroAutoBox Features
Limitations
488
MicroAutoBox Features May 2018
I/O Mappings
I/O Mappings
489
May 2018 MicroAutoBox Features
I/O Mappings
I/O Mapping for MicroAutoBox with DS1552 Multi-I/O Module ........... 500
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:
490
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
The following table shows the I/O mapping of the ECU interface:
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
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.
492
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
493
May 2018 MicroAutoBox Features
I/O Mappings
I/O mapping of the inputs of the DIO Type 3 unit, used for bit I/O and timing I/O.
494
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
I/O mapping of the outputs of the DIO Type 3 unit, used for bit I/O and timing
I/O.
495
May 2018 MicroAutoBox Features
I/O Mappings
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).
496
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
497
May 2018 MicroAutoBox Features
I/O Mappings
I/O mapping of the inputs of the DIO Type 4 unit, used for bit I/O and timing I/O.
498
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
I/O mapping of the outputs of the DIO Type 4 unit, used for bit I/O and timing
I/O.
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).
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).
500
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Independent Features
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.
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.
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.
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)
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
504
MicroAutoBox Features May 2018
I/O Mapping of Boot Mode-Dependent Features
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.
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.
I/O Mapping of the Bit I/O Unit for EEC ................................................ 510
505
May 2018 MicroAutoBox Features
I/O Mappings
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
References
507
May 2018 MicroAutoBox Features
I/O Mappings
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
References
509
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 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
I/O Mapping of the Bit I/O Unit for Chassis Control .............................. 512
511
May 2018 MicroAutoBox Features
I/O Mappings
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
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 of the Bit I/O Unit for DCEA ............................................. 515
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
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:
517
May 2018 MicroAutoBox Features
I/O Mappings
I/O Mapping of the Bit I/O Unit for DCCA ............................................ 519
518
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 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
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
521
May 2018 MicroAutoBox Features
I/O Mappings
522
MicroAutoBox Features May 2018
Appendix
Appendix
Troubleshooting
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
CC Chassis control
Boot mode of MicroAutoBox providing specific TPU functions for chassis control.
DC Drives control
Boot mode of MicroAutoBox providing specific TPU functions for drives control.
524
MicroAutoBox Features May 2018
Glossary
M MC Microcontroller
525
May 2018 MicroAutoBox Features
Appendix
526
MicroAutoBox Features May 2018
Index
527
May 2018 MicroAutoBox Features
Index
528
MicroAutoBox Features May 2018
Index
529
May 2018 MicroAutoBox Features
Index
530
MicroAutoBox Features May 2018
Index
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