Executable Test Definition for a State Machine Driven Embedded Test Controller Module Benjamin Steinwender ∗† , Michael Glavanovics † , Wilfried Elmenreich ∗ ∗ Smart Grids Group/Lakeside Labs, Alpen-Adria-Universität Klagenfurt, Austria † KAI Kompetenzzentrum Automobil- und Industrie-Elektronik GmbH, Villach, Austria E-mail: [email protected]Abstract—Microcontroller modules are introduced to a life test system to apply stimuli and stress patterns to the unit under test. The firmware must evaluate the status or operational function of the tested device for a multitude of different applications. A finite-state machine design for the microcontroller is presented that is configurable via a communication bus. The controller acts according to the given test plan description. Various sources can trigger events to cause a transition in the state machine. Custom Lua script code is executed in each state in order to control and communicate with the test hardware. Keywords: microcontroller, Lua, embedded scripting, finite- state machine, life testing I. I NTRODUCTION Life testing of devices and applications for reliability assessment purposes requires a large number of units to be tested in a harsh environment, i.e. temperature ranges up to 125 ◦ C or repetitive short circuit testing [1]. The devices and their application are usually put into a climate chamber, while the stress test hardware is left outside because it will not sustain the high temperatures. Traditional systems come with a control system outside the climate chamber, which requires a large number of analog signal wires and limits the flexibility of the test setup. In [2] we proposed a paradigm shift towards a system of distributed control and test nodes which are located close to the unit under test (UUT) to enable: • closed loop control, • in-situ data acquisition and analysis, • real-time failure diagnosis, and • high speed interfaces to the UUT. A new generation of life test systems for power semicon- ductor devices and applications is currently developed at the KAI center of competence. It provides an array of controller and application modules, linked by a communication bus to a central host computer [2]. The microcontroller modules are used to apply stress patterns and monitor the devices on the application modules. Several of these microcontroller hardware targets are used to obtain statistical data about multiple tests. To provide a further advantage, i.e., higher flexibility towards different test setups, an appropriate configuration approach for the test software is required. The test procedures can be defined on the host computer at run-time and transferred to the microcontroller to be executed there. During product development and subsequent reliability life testing, the test requirements change as soon as problems are identified or superseded by other problems. Thus, not only the execution of tests takes a significant amount of time, but the test setup also takes considerable effort. Typically, different instruments like power supplies, electronic loads, as well as pattern and waveform generators are used simultaneously. During tests the engineer needs to change the wiring of the test setup as well as to modify the test software. By reducing this setup time, more tests can be performed, providing more data about the long-term behavior of products and minimizing their time to market. To reduce complexity, we propose a modular software architecture which can be adjusted to the respective hardware and required test. The modular approach is beneficial, because it provides several advantages over the previous generations of monolithic test systems [3], [1]: • Separate test development from hardware and software design • Simplify development, debugging and replacement of individual hardware modules • Enable a smaller development team to tackle one problem at a time while using proven modules for their main code. The purpose of this paper is to describe and evaluate a software framework that is able to handle a variety of different modular hardware setup scenarios. The proposed framework builds upon the concept of finite state machines and Lua scripts for executing test routines. The use of the script language Lua is expected to reduce the cognitive complexity of a test routine. The finite state machine (FSM) allows for a modular composition and extension of existing test sequences. On the hardware side, there are currently only few controllers that are powerful enough to drive such tests and able to sustain the required temperatures. The described work is based on the XMC4500 microcontroller [4] featuring an ARM Cortex- M4F core running at 120 MHz with 1 MiB program flash and 160 KiB RAM. The controller was selected due to the required automotive temperature operating range of −40 ◦ C to 125 ◦ C and outstanding analog performance. In the next sections, we describe related concepts from literature and previous work followed by a description of our test definition model. The overall system is sketched in Section IV. Finally, first experiences with the approach are discussed in Section V and we give an outlook to future work. l -)))
6
Embed
Executable Test Definition for a State Machine Driven ... · Executable Test Definition for a State Machine Driven Embedded Test Controller Module Benjamin Steinwender∗†, Michael
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Executable Test Definition for a State MachineDriven Embedded Test Controller Module
Benjamin Steinwender∗†, Michael Glavanovics†, Wilfried Elmenreich∗∗Smart Grids Group/Lakeside Labs, Alpen-Adria-Universität Klagenfurt, Austria
†KAI Kompetenzzentrum Automobil- und Industrie-Elektronik GmbH, Villach, Austria
Abstract—Microcontroller modules are introduced to a life testsystem to apply stimuli and stress patterns to the unit under test.The firmware must evaluate the status or operational functionof the tested device for a multitude of different applications. Afinite-state machine design for the microcontroller is presentedthat is configurable via a communication bus. The controller actsaccording to the given test plan description. Various sources cantrigger events to cause a transition in the state machine. CustomLua script code is executed in each state in order to control andcommunicate with the test hardware.
Keywords: microcontroller, Lua, embedded scripting, finite-state machine, life testing
I. INTRODUCTION
Life testing of devices and applications for reliability
assessment purposes requires a large number of units to be
tested in a harsh environment, i.e. temperature ranges up to
125 ◦C or repetitive short circuit testing [1]. The devices and
their application are usually put into a climate chamber, while
the stress test hardware is left outside because it will not sustain
the high temperatures. Traditional systems come with a control
system outside the climate chamber, which requires a large
number of analog signal wires and limits the flexibility of
the test setup. In [2] we proposed a paradigm shift towards a
system of distributed control and test nodes which are located
close to the unit under test (UUT) to enable:
• closed loop control,
• in-situ data acquisition and analysis,
• real-time failure diagnosis, and
• high speed interfaces to the UUT.
A new generation of life test systems for power semicon-
ductor devices and applications is currently developed at the
KAI center of competence. It provides an array of controller
and application modules, linked by a communication bus to
a central host computer [2]. The microcontroller modules are
used to apply stress patterns and monitor the devices on the
application modules. Several of these microcontroller hardware
targets are used to obtain statistical data about multiple tests.
To provide a further advantage, i.e., higher flexibility towards
different test setups, an appropriate configuration approach
for the test software is required. The test procedures can be
defined on the host computer at run-time and transferred to
the microcontroller to be executed there.
During product development and subsequent reliability life
testing, the test requirements change as soon as problems are
identified or superseded by other problems. Thus, not only the
execution of tests takes a significant amount of time, but the
test setup also takes considerable effort. Typically, different
instruments like power supplies, electronic loads, as well
as pattern and waveform generators are used simultaneously.
During tests the engineer needs to change the wiring of the
test setup as well as to modify the test software. By reducing
this setup time, more tests can be performed, providing more
data about the long-term behavior of products and minimizing
their time to market.
To reduce complexity, we propose a modular software
architecture which can be adjusted to the respective hardware
and required test. The modular approach is beneficial, because
it provides several advantages over the previous generations of
monolithic test systems [3], [1]:
• Separate test development from hardware and software
design
• Simplify development, debugging and replacement of
individual hardware modules
• Enable a smaller development team to tackle one problem
at a time while using proven modules for their main code.
The purpose of this paper is to describe and evaluate a
software framework that is able to handle a variety of different
modular hardware setup scenarios. The proposed framework
builds upon the concept of finite state machines and Lua scripts
for executing test routines. The use of the script language
Lua is expected to reduce the cognitive complexity of a test
routine. The finite state machine (FSM) allows for a modular
composition and extension of existing test sequences.
On the hardware side, there are currently only few controllers
that are powerful enough to drive such tests and able to sustain
the required temperatures. The described work is based on
the XMC4500 microcontroller [4] featuring an ARM Cortex-
M4F core running at 120MHz with 1MiB program flash and
160KiB RAM. The controller was selected due to the required
automotive temperature operating range of −40 ◦C to 125 ◦Cand outstanding analog performance.
In the next sections, we describe related concepts from
literature and previous work followed by a description of
our test definition model. The overall system is sketched in
Section IV. Finally, first experiences with the approach are
discussed in Section V and we give an outlook to future work.
test sequences. Incorporating instruments on the host level is
very simple, as is the control of digital and analog signals on the
microcontroller. With the help of a graphical test-plan creation
tool, the product test engineers can describe a test program
flow and add Lua scripts for accessing hardware resources.
A power conversion application life test with four distinct
converters according to Figure 2 has been set up using a
microcontroller-target for each converter. Each microcontroller
successfully runs a closed loop PI control to regulate the con-
verter current. Voltage and temperature measurement values are
monitored live on the host system. The power supply and active
load are shared among the units. Thus, all microcontrollers are
connected to the same host and supervised by one single test
state machine.
The lab engineer is able to autonomously create the proper
ramp-up and turn-off sequences after a short introduction into
the system and explanation of the Lua API, appreciating that
he does not need to change the microcontroller-firmware in
order to modify the test program.
Further work will focus on the scalability of the host system
in order to implement high numbers of microcontrollers and
test applications running in parallel. The system has not been
pushed to its full limits yet, however a significant number of
16 controllers can be handled smoothly so far.
ACKNOWLEDGMENT
The authors would like to thank their colleagues at the KAI
center of competence, Infineon Technologies Austria and the
Klagenfurt University for fruitful discussions.
This work was jointly funded by the Austrian Research
Promotion Agency (FFG, Project No. 846579) and the
Carinthian Economic Promotion Fund (KWF, contract KWF-
1521/26876/38867).
REFERENCES
[1] M. Glavanovics, R. Sleik, and C. Schreiber, “A compact high currentsystem for short circuit testing of smart power switches according toAEC standard Q100-012,” in Proc. IEEE Power Electronics SpecialistsConf. PESC 2008, 2008, pp. 1828–1832.
[2] B. Steinwender, S. Einspieler, M. Glavanovics, and W. Elmenreich,“Distributed power semiconductor stress test & measurement architecture,”in INDIN’13, 2013.
[3] M. Glavanovics, H. Köck, V. Košel, and T. Smorodin, “Flexibleactive cycle stress testing of smart power switches,” MicroelectronicsReliability, vol. 47, no. 9-11, pp. 1790–1794, Sep. 2007. http://linkinghub.elsevier.com/retrieve/pii/S0026271407003216
[5] K. Beck, “Simple Smalltalk Testing,” The Smalltalk Report, vol. 4, no. 2,1994.
[6] P. Fagerburg and A. McInnes, “Develop Robust Firmware Faster WithAutomated Unit Testing,” Synchroness Inc., White Paper, Mar. 2008.
[7] J. Zakizadeh, S. Das, M. Assaf, E. Petriu, M. Sahinoglu, and W.-B. Jone,“Testing Analog and Mixed-Signal Circuits with Built-In Hardware -A New Approach,” in Instrumentation and Measurement TechnologyConference, 2005. IMTC 2005. Proceedings of the IEEE, vol. 1, May2005, pp. 166–171.
[8] E. Schlunder. (2010) High-Speed Serial Bootloader for PIC16and PIC18 Devices. AN1310. Accessed 2015-02. Microchip. http://ww1.microchip.com/downloads/en/appnotes/01310a.pdf
[9] J. Garcia-Zubia, I. Angulo, U. Hernandez, M. Castro, E. Sancristobal,P. Orduña, J. Irurzun, and J. de Garibay, “Easily Integrable platformfor the deployment of a Remote Laboratory for microcontrollers,” inEducation Engineering (EDUCON), 2010 IEEE. IEEE, 2010, pp. 327–334.
python-on-a-chip[12] T. W. Barr, “Microcontroller Programming for the Modern World,” Ph.D.
dissertation, Rice University, 2014.[13] D. George. (2015, Feb.) MicroPython. http://micropython.org/[14] D. Harel, “Statecharts: a visual formalism for complex systems,” Science
of Computer Programming, vol. 8, no. 3, pp. 231–274, Jun. 1987.http://linkinghub.elsevier.com/retrieve/pii/0167642387900359
[15] R. Ierusalimschy, Programming in Lua, 3rd ed., R. Ierusalimschy, Ed.Ierusalimschy, Roberto, 2013.