English
Language : 

AN2618 Datasheet, PDF (1/23 Pages) STMicroelectronics – eTPU host interface
AN2618
Application note
eTPU host interface
Introduction
The eTPU is the new generation of Time Processing Unit (TPU). Besides the hardware
enhancement, significant improvements have been made to the accompanying software
development tools; these tools make the enhanced Time Processing Unit (eTPU) easy to
use. A high level language (C) compiler has been developed to allow the user to program
the eTPU by using C language instead of microcode.
To program the eTPU effectively, the programmer still needs to have a clear understanding
of how the eTPU hardware works. Coding in C, the programmer can focus more on the
application logic and leave the mechanics of the eTPU programming to the compiler (i.e.,
register usage and tracking, parameter packing, micro-instruction packing, etc.). With the
help of the eTPU simulator and debugger, eTPU software can be developed much like the
software for the host CPU. Productivity of software development can be significantly
improved.
The introduction of the eTPU C compiler also changes the way the host interfaces to the
eTPU functions. With the help of the compiler, the same symbol can be referenced by the
both eTPU and host software. The host software can interface with eTPU functions via API
functions, instead of accessing physical memory locations and registers. For each eTPU
function, a host interface API function can now be developed as a part of the eTPU C
program. The host application can call these API functions to interface with the eTPU. The
references to these API functions and symbols for parameters are resolved at compile time.
The implementation details of the eTPU functions are hidden from the host application. This
design improves the flexibility of the eTPU functions’ implementation and the portability of
the host application code. This application note discusses how to build the host interface for
eTPU functions.
This application note shows how to build the host interface to access eTPU functions. The
eTPU PWM driver is used as an example to illustrate what the host needs to do to configure
eTPU module, channel and initialize PWM function. The appRev 2lication note also
describes the details of how to export eTPU software information to the host compiler. The
working code example is presented in the Appendix. The user can compile both host and
eTPU code, then download to actual hardware for testing.
September 2013
Rev 2
1/23
www.st.com