Feature
Proprietary architectures defend automotive space
Although ARM architectures increasingly vie for automotive and industrial dominance, they face stiff competition from proprietary devices that regard these markets as their own. Recent devices from major vendors underline the continuing determination to compete for market share.
By David Marsh, Contributing Technical Editor -- EDN, 12/1/2006
|
As EDN Europe reported in its December 2005 and February 2006 issues, the ARM architecture is enjoying increasing acceptance within the automotive and industrial markets that are traditionally the domain of proprietary designs (reference 1 and reference 2). The recent announcement of ARM's Cortex-M—available for the first time in Luminary Micro's Stellaris family—strengthens this architecture's challenge by implementing a redesign that addresses comparative weaknesses in the original ARM7TDMI and its upwardly compatible successors, notably within real-time-response performance.
Unsurprisingly, vendors with long histories in the automotive sector are reluctant to cede market share and continue to introduce new silicon that raises the price and performance bar for application-specific devices. Several recent 32-bit proprietary products suit applications from general-purpose embedded control to infotainment, hard real time, and DSP, from the perspective of the low-cost-development environments that their makers believe will highlight each chip's capabilities.
In its previous Motorola Semiconductor guise, Freescale was among the first silicon makers to target the automotive sector. One of its most successful products—the PowerPC family, with devices such as the MPC565—enjoys widespread acceptance within the engine-management and power-train-control segments. The company's product portfolio also includes the ColdFire series of 32-bit machines, many of which enjoy success within industrial-control networks. Widening the application focus, the recent MCF5251 targets portable and in-vehicle audio players, with interfaces for ATA-66 hard disks, a CD-ROM codec, SmartMedia, USB-On-the-Go, and serial-digital audio. Its V2 68K/ColdFire core includes an enhanced MAC (multiply-accumulate) unit with hardware division, which helps decompress streaming multimedia, making discrete DSPs unnecessary in many applications. The chip integrates 128 kbytes of SRAM and an 8-kbyte instruction cache, together with a system-bus controller and SDRAM interface to support the external-memory system. A ROM boot loader allows the chip to boot from hard-disk, I2C, or SPI-connected devices. Two CAN (controller-area-network) ports augment the normal complement of microcontroller peripherals, and JTAG and BDM (background-debug-mode) interfaces ease system development. The budgetary price is $10.83 (1000).
The $949.50 M5251EVBWR evaluation system contains an M5251C3 single-board computer, a 2.2-in. TFT (thin-film-transistor) display module, a serial cable, and a universal power supply. In addition, a binder houses a 30-day evaluation copy of Wind River's Workbench on-chip-debugging-edition software, together with a Wind River Probe USB emulator that links the PC host to the board. Workbench provides all of the normal debugging and flash-programming features and is OS-aware for environments including Linux, ThreadX, and VxWorks. The software runs on Linux, Solaris, and Windows hosts. Presumably because this kit is so new, there's no board-support information in the package; you download it from Freescale's Web site. However, licensing issues mean that you must obtain authorization to download the Trio software for use with Workbench. There are no MCF5251-specific examples on the CD, but the MCF5251 home page carries software libraries with routines such as a graphic equalizer, JPEG video, MPEG-2 AAC (advanced audio coding), and MP3 decoders. There's also a binary image that's useful for proving that the flash programming system is operational.
The documentation reveals that the board carries 2 Mbytes of flash, 256 kbytes of which comprise the dBug monitor/debugger firmware that enables stand-alone operation with an RS-232 terminal. Or, that's the theory; our board resolutely refused to communicate over this port, simply sending error-break and break signals before locking up. Installing the Wind River software went seamlessly but did not create the HddSoftware examples directory that the printed booklet uses to introduce the system. Attaching the Wind River Probe worked fine, providing access to the microcontroller's on-chip JTAG-based debugging system at speeds that the company says are typically three to 10 times faster than competing products. The Trio software comprises a full application for an MP3 player—which requires an external ATA hard disk—but there are few pointers about how to get started within this complex environment. Freescale and Wind River are still working to improve the out-of-the-box experience, so if you're considering this evaluation platform, be sure to contact these companies for the most up-to-date support material. Wind River is currently offering a price incentive for customers who purchase this kit. For $5000, the software bundle comprises perpetual-seat, node-locked versions of the Compiler and Workbench suites and ColdFire-family support for the emulator that comes with the kit.
Another recent introduction from Freescale also demonstrates the ColdFire architecture and comes with the ubiquitous CodeWarrior environment, which is familiar to virtually every Freescale user. For $349, the M5208EVB evaluation kit consists of an evaluation board from Intec Automation, P&E Micro's USB MultiLink BDM interface, all necessary cables, and a power supply. The board's MCF5208, which costs $7.22 (1000), shares the same core and general-purpose peripherals as the 5251 but lacks the multimedia interfaces and the CAN ports; for industrial-network use, the 5208 adds a fast Ethernet port. Together with CodeWarrior, the software resources comprise a getting-started CD and Intec Automation's SBCTools board-support package for the µClinux (microcontroller Linux, pronounced "you see Linux") OS. There's also evaluation software from CMX Systems, Green Hills, MQX Embedded, and Treck. A 2-Mbyte flash device carries the dBug monitor together with the µClinux kernel, which facilitates a Web-browser interface, and a 32-Mbyte SDRAM provides program space. Interfaces include serial and Ethernet ports, a BDM header, and a 16-pin header that makes available a range of signals including I2C and SPI buses. Echoing Freescale's presence in the ZigBee marketplace, the board features a ZigBee transceiver with a pc-board-track antenna.
The getting-started CD automatically runs a routine that scans the board and establishes serial communications with a terminal program at 115,200 baud, booting into µClinux. Providing that you reset your terminal program from this rate to 19,200 baud, removing jumper JP3 and rebooting displays the dBug-monitor prompt. A 54-pg manual describes the monitor's utilities, which include assembly/disassembly and flash programming, all of which are great fun for machine-code fans wishing to handcraft smaller projects. The abort pushbutton is especially useful here, as it generates a Level 7 interrupt that passes control from user code to dBug and preserves the machine's state. This action also automatically displays the ColdFire's core-register states. In case of accidental flash erasure, images of dBug and µClinux appear on the M5208EVB's Web page.
Larger projects will benefit from CodeWarrior, which the kit delivers in a 128-kbyte, code-limited special-edition format. With features such as Stationery providing templates that generate start-up scripts, the IDE (integrated development environment) provides support for assembler and C using the P&E hardware debugger. Helpful features include the USB-hardware-test routine, which confirms the probe's ability to force the 5208 into BDM, showing that the hardware is good. You can then rebuild CodeWarrior's example "hello-world" project for the BDM probe and run it on the evaluation board to verify the entire installation. Useful as a template for further development is an example program in CodeWarrior's installation directory that shows how to use the timer and general-purpose I/O to toggle the board's four LEDs. CodeWarrior-licensing options are available to add features such as instruction-set simulation, RTOS support, and Abatron's high-speed JTAG/BDM interface. The standard edition costs $2495, and the $5995 professional-version software supports the entire ColdFire family.
The SBCTools board-support-package CD installs the company's standard edition for use with dBug together with µClinux, Eclipse edition, which helps developers keen to try this increasingly popular kernel. The Eclipse environment entertainingly describes itself as "an open extensible IDE for anything and nothing in particular," yet it contains a full-blown C/C+ + compiler and debugger, enough tutorial material to be genuinely useful, and utilities to share a Samba filing system and configure IP (Internet Protocol) addresses. However, getting the system to work was a struggle, starting with the TCP/IP (Transfer Control Protocol/IP) communications and culminating with the Samba file structure. The Ethernet issues took some experimentation to fix, but there's an obscure instruction in Version 2.0.0 of the user manual that claims it's essential to have a shared directory with the name SBCToolsWS for Samba to work. This statement is simply wrong: The environment doggedly directs itself to the default work-space directory and appears to ignore switch-work-space commands; hence, it never loads the object file from SBCToolsWS. So, obey the quick-start instructions and don't stray out of work space!
Even with a successful building and download, arcane error messages appear that state, for instance, "can't get /etc/mtab~ lock filesmbmnt failed: 1," which is confusing at the best of times. Help from Intec Automation's programmer, Mike Lavender, yielded a running serial-I/O sample program (Figure 1). From this point, it's easy to explore the facilities that the Eclipse environment offers, such as the tight integration between the GCC (GNU C compiler) and GDB (GNU debugger) that unusually run under Windows without needing the Cygwin Windows/Linux interface. The GDBServer implementation runs a version of the GDB on a PC host with communications through the fast-Ethernet port. Lavender notes that the executable file is "flat" with no file-name extensions: "This format allows the program to be placed anywhere in RAM when it is run as opposed to linking static addresses directly in the code. This allows the OS to run a program and even run multiple instances of the same program!"
If µClinux is your prime interest, see www.uclinux.org for news and developments for the many platforms that the OS supports, including ColdFire. Targeting microcontrollers that lack memory-management units, several µClinux projects are now maturing, such as the Analog Devices' Blackfin port, which uses the company's Stamp board (Reference 3). Also, don't forget Freescale's own ARM9-derived i.MXL Litekit, which EDN Europe reviewed last February (Reference 2). This multimedia-focused kit offers a particularly smooth introduction to Microcross GX-Linux, a port of the full Linux system.
Hard-real-time focusDesigned from the ground up to satisfy the hard-real-time needs of the automotive industry, Infineon's TriCore is one of today's newer architectures. A recent addition to the family, the TC1796, is a 150-MHz evolution of the TC1775, which the company introduced in 2000. As well as increasing the clock rate from the original chip's 40 MHz, this updated device carries 2 Mbytes of error-code-correcting flash, thereby addressing the TC1775B's principal disadvantage compared with its competitors. Other on-chip memory includes 128 kbytes of data flash that can emulate 16-kbyte segments of EEPROM, 192 kbytes of SRAM, and a 16-kbyte instruction cache. The TriCore nomenclature comes from the core's combination of a 32-bit, superscalar CPU; a single-precision, floating-point unit; and a DSP engine that exploits the best features of RISC, CISC, and DSP architectures. Separate program and data buses decouple the memory system from a range of I/O devices, each of which is optimized for flexibility and autonomous operation. The TC1796 also includes a 32-bit PCP (peripheral-control processor) that can autonomously handle I/O operations. The guide price for the TC1796 is approximately $27 (1000).
For about $400, Infineon's starter kit for the TC1796 consists of a Eurocard-format board; parallel-port cable; and software resources, including Infineon's starter-kit disk, an evaluation copy of Tasking's TriCore-VX tool set, and a board-support package from Hitex. Three more CDs contain sample development environments from HighTec, Lauterbach, and PLS. A getting-started booklet and a breakout board that brings the processor's I/O out to 0.1-in. headers complete the package. The kit requires an external ac or dc adapter that supplies 5.5 to 60V for the onboard power supply, which uses Infineon's TLE6389 buck converter to derive a master 5V rail with Texas Instruments' TPS76801 linear regulators downconverting to the 3.3V and 2.5V rails that the CPU's core requires. The board's major components comprise the SAK-TC1796-256F150E processor, 4 Mbytes of burst-mode flash, 1 Mbyte of asynchronous SRAM, and the usual array of I/O and switches. Most I/O connects to four high-density connectors, which is the reason that the breakout board is essential. The serial- and parallel-port interfaces have standard full-sized connectors, and the CAN interfaces come out to 0.1-in. headers.
The starter-kit CD's QuickStart subdirectory contains a step-by-step guide to installing and running the Tasking tool set and the Hitex HiTop debugger that form the default environment for this kit, as well as various code samples. To summarize a long story, the out-of-the-box experience did not go well. At first, the code examples failed to compile, which was due to the fact that the version of the Tasking compiler that came with the kit differs from the version used to develop the examples. It's an ongoing mystery about why Tasking's developers continue to think that it's acceptable to produce tools that cannot tolerate forward or backward compatibility, which has been a problem since the earliest days of the TriCore (Reference 4). After I fixed the compilation problems, several of the promising-looking hands-on training exercises failed to run. Investigation revealed that the initial training exercise leaves the TriCore's program counter pointing at the default blinking-LED routine in flash; hence, downloaded programs will never run. There were also some obscure board-to-PC communication problems that required workarounds, all of which convey the impression that no one has properly tested this kit. But don't let any of this information dissuade you from considering the TC1796, which is clearly capable of outstanding performance (see sidebar "Generic platform speeds ECU development"). Furthermore, there are heavy hints that Infineon is working to resolve these issues; a capable software engineer can probably also accomplish this task.
Hearing of these problems prompted Infineon to donate a starter kit for the new TC116x series, which the company recommends as a simpler introduction to the TriCore family. Aiming at deeply embedded industrial-control applications, the TC116x family makes available a full complement of peripherals, including the Micro Link interface for interprocessor communication and the Micro Second bus interface, which provides high-speed control of external power ICs. The major operational differences between this 176-pin LQFP and the full-blown TC1796 are the absence of an external memory bus and the PCP. The roughly $295 starter kit comprises a Eurocard-format board whose processor's identifier has been blanked out; a note says that it's a superset of the TC1166, a standard chip that costs approximately $14 (1000)—along with the power supply, an RS-232 port, and a parallel port to drive the JTAG interface. You also get a short plug-to-plug parallel-port cable, a breakout board to access I/O lines, a universal-input power supply, and a starter-kit CD.
The February 2006-dated CD contains a getting-started guide, the TriCore manuals, and software that includes Infineon's excellent chip-configuration code-generator DAVE (Digital Application Virtual Engineer) Version 2.1r22. Apart from its primary role in initializing the processor, DAVE is a tool that rewards investigation, as its layers reveal a great deal of useful information about the target chip, which can be any TriCore or 166-family device. The tool's output is a fully documented, free file that you can import straight into a project. The default compiler is Version 2.3r1 of Tasking's environment, which the kit couples with the UDE (universal-development environment) from PLS. There are samplers of HighTec's GNU-based development environment and Lauterbach's Trace32 debugger, together with OS samplers from Enea and Euros. You also get a free copy of Infineon's TriLib DSP library for TriCore. The opening screen promises that you can be up and running within 30 minutes of unpacking the kit, which the screen assists by providing hyperlinks to install the Tasking compiler, the PLS debugging engine, and DAVE, which the program samples use.
|
Sadly, the first hello-world program failed to compile, generating more than 40 error messages before giving up. This problem—which the kit did not document—is due to an incorrect linker setting for TriCores without external memory, as a release-note entry on Tasking's Web site for its Version 2.3 compiler reports. Changing the linker-script file settings for internal memory so that SPRAM's (single-port RAM) Alloc attribute is on and its Type is ROM allows the six samples to compile and run correctly. These samples progress from hello world, which demonstrates studio support in an embedded environment through a blinking-LED I/O-port routine, to samples of handling arithmetic saturation, interrupts, serial I/O, and on-chip flash programming. The arithmetic sample shows the power of Tasking's C-language extensions, which map directly to TriCore instructions, slashing the sample code's computation time from 262.6 nsec for 32-bit ANSI-C to just 37.7 nsec for the 64-bit Tasking implementation (Figure 2).
One sample uses the timer array to generate a 1-sec interrupt that toggles the TriBoard's LED—in the meantime showing that the TriCore supports as many as 255 interrupt sources that can each have a unique priority level set from within DAVE. Although most processors load new program-counter values to run interrupt-service routines, the TriCore minimizes interrupt latency by jumping to vectors in code memory. The serial-output routine then builds on the IRQ (interrupt-request) exercise to output an updating message to HyperTerminal. The final example uses the UDE tool set from PLS to program the TC1166's flash with a variation of the serial-output routine. This method also works, providing that you set the tool to Infineon's DAS (device-access server) rather than the default starter-kit JTAG driver and power down or power up the TriBoard when programming completes.
|
Although all tool chains are subject to personal preferences, the most popular TriCore setup combines Tasking's compiler with the HiTop debugger from Hitex. But don't ignore the other possibilities; besides the choices that appear on the starter-kit CD, Infineon's Web site lists compiler choices that range from GNU freeware to approximately $3000 to $4000 for a commercial product with maintenance and support. Because Infineon uses a parallel-port "wiggler" interface, it's easy to duplicate the simple logic that appears in the schematics for use with your own prototype hardware. You can then use the tools that accompany this kit to perform basic hardware and software debugging at low cost. For "proper" development, the TriCore supports three levels of debugging through its on-chip-debugging system (Reference 5). Infineon reckons that the runtime control and internal access that Level 1 offers is sufficient for approximately 80% of applications. Level 2 adds instruction tracing, and Level 3 is full-blown real-time in-circuit emulation that includes trigger logic, trace and overlay memories, and the ability to view the chip's internal buses. The budgetary range for these tools spans starter-kit prices through $5000 to $8000 for Level 2 facilities to approximately $10,000 for Level 3 capabilities.
Don't dismiss DSPFrom audio decompression to vibration analysis, it's hard to beat a DSP engine when it comes to performing repetitive computations on chunks of data in real time. Yet, many engineers shy away from the technology, believing it to be too complex and expensive. However, with a budgetary guide price that starts at $11.60 (1000) for the 100-pin BGA package, the fixed-point TMS320F2808 from Texas Instruments lies at the low-cost end of the DSP spectrum. Targeting real-time control, the chip packs 36 kbytes of SARAM (single-access RAM) and 128 kbytes of flash alongside the 100-MHz C28x core, augmenting the normal complement of microcontroller peripherals with dual CAN ports and a 16-channel PWM module. It also has a 2-kbyte one-time-programmable ROM block and a separate 8-kbyte boot ROM. Crucially for real-time use, the chip features hardware debugging, which the accompanying CCStudio (Code Composer Studio) suite comprehensively exploits. Software support includes TI's DSP/BIOS kernel, as well as a number of libraries, such as high-speed fixed-point arithmetic routines and digital motor-control algorithms.
Spectrum Digital offers its $469 TMS 320F2808 eZdsp system kit, which contains a compact development board, a resource CD, a USB cable, a power supply, and the obligatory getting-started flier. The board is home to the target 320F2808 DSP, an Actel FPGA, an MS320DA255 chip, two switch arrays, and various support logic, including serial-boot EEPROMs. Two nine-pin D connectors bring out the primary CAN and SCI buses, with secondary instances of each available on 0.1-in. headers. The final header supports an optional JTAG emulator, as the kit uses a USB connection for this purpose. Two unpopulated header layouts optionally allow you to connect general-purpose-I/O and analog signals, taking care to ensure that external-signal levels don't exceed the F2808's 3.3V I/O levels. To prevent the F2808 from latching up with possibly destructive effects, it's also necessary to power the eZdsp board before applying any external signals, so consider hot-pluggable level-translating transceivers for any custom interface that runs at normal automotive or industrial 5V levels.
Installing CCStudio together with the board-support package and a flash-burner utility completes seamlessly in about 10 minutes, when an XP Pro machine automatically installs the USB drivers, which you can test by launching a desktop diagnostic icon. In this case, the installation created icons for the F2812 version of CCStudio as well as the desired F2808 instance, but this aberration didn't affect the kit's behavior; however, it proved impossible to register CCStudio, as the service code was missing from the CD case. It transpires that the software that we received with our kit is the full Platinum version rather than the free-kit version, which similarly has no code-size limit.
The F2808 section of the downloads area at Spectrum Digital yields documents that include hardware-reference guides and schematics as well as the board's getting-started guide, which directs users to CCStudio's integral tutorial. This invaluable facility comprises three modules that introduce users to the IDE, the DSP/BIOS real-time kernel, and the real-time-emulation facilities. Nice touches abound. For example, the IDE automatically imports the appropriate "include" files for a project. You can also get help on an assembly-language instruction by clicking on it and hitting F1. But the IDE includes some truly slick features, such as the ability to import test-stimulus data from a PC file to the board and return result data using a probe-points mechanism for file I/O. Effectively a special kind of breakpoint, a probe point temporarily halts the target to perform the data transfer before automatically restarting the processor—a technique that suits program development rather than real-time verification. You can graph the result data by setting parameters under the View menu and animating the outputs for the sample sine-wave input data and a processing gain of 10 (Figure 3). Other key IDE features include a profiler that helps identify sections of code requiring optimization and the GEL (general-extension language), which allows you to automate CCStudio setups and perform runtime functions.
The DSP/BIOS kernel consists of a set of modules that you can link into an application to provide real-time scheduling, synchronization, and host/target communications. It employs code instrumentation to monitor program activity on the fly and automatically instruments any code that uses the kernel's pre-emptive-multithreading ability. A configuration tool links in only the DSP/BIOS objects that are necessary for the user's program and allows you to set up memory, interrupt handlers, and thread priorities. The tutorial first describes how to measure the cycle count of the stdio.h function "puts," which writes the inevitable hello-world message to the console. You should then be able to see how the DSP/BIOS-call log speeds I/O. In this case, this operation stalled, presumably due to a failure in the RTDX (real-time-data-exchange) subsystem, although the diagnostics report correct operation. By contrast, the next example that shows thread-execution measurements using the real-time-analysis functions within DSP/BIOS ran perfectly, thereby demonstrating the environment's ability to ensure that a process meets a deadline. You can demonstrate this situation more clearly by using the CPU load graph while testing the time line by adding dummy cycles using the load function from the GEL environment (Figure 4). Other DSP/BIOS tutorial topics include analyzing real-time behavior and connecting to virtual I/O devices, and there are thoughtful "things to try" throughout the material.
If all of these features aren't enough, there's a great deal more material available from TI's Web site, such as the free getting-started-with-DSP material that's so popular with students and engineers alike. (Also see EDN Europe's coverage in Reference 6.) Automotive users may be particularly interested to see the eZdspF2808 diagnostics and demo-source-code Version 2 material that appears at Spectrum Digital's F2808 page. As well as source and project files for F2808 diagnostics, this code includes a CAN loop-back test program. Converts can purchase an annual license for the TMS2000-only version of CCStudio for $495, and the universal version, which permits development on any TMS320-family chip, costs $3595.
| For more information | ||
| Abatron: www.abatron.ch | Actel: www.actel.com | Analog Devices: www.analog.com |
| ARM: www.arm.com | BigStuff3: www.bigstuff3.com | CMX Systems: www.cmx.com |
| Embedded Linux/ Microcontroller Project: www.uclinux.org | Enea: www.enea.com | ETAS: www.etasgroup.com |
| Euros Embedded Systems: www.euros-embedded.com | Freescale Semiconductor: www.freescale.com | Green Hills Software: www.ghs.com |
| HighTec EDV-Systeme: www.hightec-rt.com | Hitex UK: www.hitex.co.uk | Infineon Technologies: www.infineon.com |
| Intec Automation: www.steroidmicros.com | Lauterbach: www.lauterbach.com | Luminary Micro: www.luminarymicro.com |
| MQX Embedded: www.mqxembedded.com | P&E Microcomputer Systems: www.pemicro.com | PLS Development Tools: www.pls-mc.com |
| Spectrum Digital: www.spectrumdigital.com | Tasking: www.tasking.com | Texas Instruments: www.ti.com |
| Treck: www.treck.com | Wind River: www.windriver.com | |
| Author Information |
| You can reach Contributing Technical Editor David Marsh at forncett@btinternet.com. |
| References |
|
| Generic platform speeds ECU development |
|
Until recently, engineers wishing to develop new engine-management and power-train-control ECUs (electronic-control units) had to build custom electronics to interface with sensors and control critical processes, such as combustion. With the introduction of Infineon's PSK (power-train starter kit), it's now possible to employ a generic platform that promises to slash development times and standardize the hardware architecture—all of which have great potential for OEMs needing to minimize development costs and shorten time to market. The platform leaves the software content with the developer, allowing OEMs to differentiate their products and retain their intellectual property. Interestingly, this goal wasn't Infineon's prime intention in developing the product, as Simon Brewerton, principal engineer at the company's UK development center, explains: "We wanted to be able to demonstrate our hardware to engine developers, but, as a silicon vendor, we don't possess our own engines and dynos [dynamometers]. It therefore made sense to work with someone who does to develop a general-purpose platform that's capable of controlling pretty much any engine, as well as being able to run a simulation mode for demonstration and training purposes." The partner that Infineon chose is BigStuff3, a Michigan-based consulting company that specializes in designing after-market fuel-injection and ignition controllers for applications such as drag racing. The result is Infineon's PSK, which BigStuff3 also markets as the Gen4 development system. The kit comprises an environmentally sealed enclosure that houses the electronics and a generic wiring harness with standard connectors to mate with common engine and power-train components. The system controls as many as 12 fuel injectors and eight ignition coils, accepting inputs from as many as four inductive or Hall-effect cam-phase sensors, four Lambda sensors, and four knock sensors. It supports electronic throttle control and can control a five-speed torque-converter-based automatic transmission. Various ancillary outputs cater to devices such as fans and pumps. A single pc board carries Infineon's TC1796 TriCore processor, which processes analog and digital inputs from an array of sensors and drives power-stage outputs built from a combination of the company's protected MOSFET power switches (Figure A). The hardware architecture is deceptively simple but extremely powerful, showcasing the TriCore's real-time computational prowess and the power of its peripheral-control processor to perform every necessary action in real time. Brewerton notes that the secondary XC164 processor acts as a check system for electronic throttle control: "In a real application, the XC164 handshakes data with the TriCore over an internal CAN [controller-area-network] bus, performing checksums and so on to ensure that everything is running properly. But, for training and other simulation purposes, it can also generate all the signals that the TriCore needs to simulate a running engine—effectively providing a 'virtual engine' for hardware-in-the-loop capability." Brewerton says that engine-control strategies comprise a mix of three major elements—state-machine control, look-up tables, and functional models—all of which endeavor to accurately estimate what's happening within the combustion chamber. For instance, flow-control models predict the basic physics of fuel-to-air-input ratios and quantities to exhaust-gas output. As ever, the better the control accuracy, the better the end result—which, in this case, is the maximum power output for minimum fuel consumption and pollution; pollution control is today's prime driver of ECU development. Engine position is a principal control input, with the main angular input typically deriving from a 58-tooth crankshaft position sensor (actually, 60 with two missing) on the flywheel. From this timing input, the control system derives angular information with 6° of native resolution. A typical PSK application uses the TriCore's GPTA (general-purpose timer array) to debounce cam-shaft- and crankshaft-position sensors before using the flywheel input to run a PLL (phase-locked-loop) at 2048 times gear-tooth speed, thereby increasing angular resolution to 0.0029° per pulse. As the PLL locks to the incoming frequency, software can assess changes over time that signify events such as acceleration and make appropriate adjustments—including compensating for undesirable effects, such as the torsional resonances that peak when the furthermost cylinder from the flywheel fires in an inline engine. Another key control input comes from piezoelectric resonance sensors on the cylinder head that detect "knock," or pre-ignition. These sensors are tuned to the block's resonant knock frequency, which typically lies within 8 to 12 kHz. Brewerton asserts, "The limit on engine performance is the onset of knock. As every 1° of ignition advance approximates a 1% power gain, it's essential to run the engine as close to the limit as possible." One problem is that, when knock sets in, it can take many degrees of timing retardation to restore normal operation, so most manufacturers leave a guardband of 2 to 3° of retard to ensure that the engine does not pre-ignite. If you can detect the onset of knock early on, it's possible to reduce this value and increase power output. The TriCore includes a 3.5M-sample/sec ADC with autonomous trigger logic that can oversample as many as four knock-sensor channels before passing the data to the chip's DSP block. The block contains dual multiply-accumulate units that can generate two new results per clock cycle. As the trigger logic ensures the phase coherency of data capture, a fast-Fourier transform can extract the real signal and evaluate its energy content. Software can exploit this technique to create a frequency profile that significantly increases knock-detection sensitivity—also allowing a look-up table of maybe 128 entries to make the fine adjustments in engine-speed-dependent knock-center frequency. Another possibility for vibration profiling lies with predictive maintenance, such as detecting the onset of bearing failure. The look-up tables that carry engine-calibration data are key components in any ECU and can run to several hundred kilobytes. It's essential for development engineers to be able to transparently modify calibration constants as the engine runs before locking down satisfactory values in nonvolatile memory. Traditionally, hardware tools access dual-port SRAM that overlays the flash calibration memory to facilitate dynamic changes, but a special emulation-device version of the TC1796 improves this process. The TC1796ED carries on-chip emulation logic as well as 512 kbytes of SRAM that can act as a calibration overlay area, all connected to the outside world through a USB port on top of the chip (Figure B). This unique arrangement allows a calibration engineer direct access to the running under-hood hardware using nothing more than a laptop and some software. The emulation interface provides access to Nexus Level-III application-programming-interface features, allowing toolmakers such as ETAS to offer calibration tools based on a generic model. The SRAM is also capable of real-time data capture, allowing the interface to stream time-stamped data to tools from vendors such as Lauterbach and PLS that offer emulation tools with logic-analyzerlike functions for event reconstruction and tracing and code debugging. Although the PSK targets spark-ignition engines, Brewerton reports that various customers have successfully adapted the system for diesel motors that range from passenger cars to giant earth movers. In these applications, the TriCore controls direct-injection sequences that typically require five to seven injection bursts per ignition cycle to minimize pollutant generation. The PSK is available now for approximately $3400 and comes with sample software projects; approximately $1500 more buys you a version that includes the TriCore-emulation device. |















