Application Development
4
4.1
4.2
Application Development
There are three paths that can be taken using the Small Engine Reference Design for application
development: 1) Ground up custom code can be written. 2) The example applications can be modified.
3) A ground up application can be written using the low level drivers and operating system used in the
example applications. If a ground up software project is selected, it may be beneficial to use various
aspects of the example application for working with the S12 MCU and the other various components in
the design. The example application will also be a benefit when using the low level drivers as it serves as
an example for using these pieces of code. At the very least, customizing of the example application will
be required. This section will focus on customizing the example application to a specific engine.
Example Application Architecture Overview
The example application is designed to run a one or two cylinder engine using a hybrid operating system.
A hybrid operating system is important to engine control as all engine control events are based on the
rotation (angle domain) of the engine and user control processing and data collection must be performed
periodically (time domain). Additionally, the example application reduces complexity through a hardware
abstraction layer (HAL). Through the HAL, software complexity is reduced by using application level
signal names instead of native control names for the MCU. The combination of these two software
techniques produces an example that is configurable through a single header file and reduces user
implemented code to three main functions.
User functions are split into three main activities. In Data_Management(), all data is collected and
processed in the system. This includes analog and digital information and any filter functions that are to
be performed. Engine_Management() is called to calculate raw fuel and spark parameters for running the
engine. This includes table look up of hard data values based on current engine RPM and load as well
as factoring in fuel and spark modifiers. In User_Management(), the engine control strategy is run. It
includes interpretations of user control inputs and control strategies for loads. The primary goal of the
User Management function is to handle user controls, determine fuel modifiers, and calculate engine
load. Each of these functions are performed at various rates and configured through the Application
Definitions.h header file. These functions do not directly control the engine fuel and spark events. These
are performed by low level functions that react to the rotation of the engine through the engine position
data. The low level engine control events use the latest parameters passed to fuel and spark controllers
by the user functions. Additional information is provided in Software Reference Manual found in Appendix
B.
Configuring the Application
The first step in working with the example software is to configure the code to be generated through the
Application Definitions.h file. In this file are definitions used to conditionally compile code based on the
user defined system. This is done to create an application that only uses the memory required for the
specific application, demonstrate flexible software design through conditional compiling, and create a
framework for a custom implementation using various types of hardware. The file is designed to be simple
and allow decisions to which definitions to select by using the completed Load Worksheet, discussed
earlier, and knowledge of the application.
While the software provides a signal abstraction layer, configuration of the low level software must be
performed through an application header file, “Application Definitions.h”. This file defines what signals are
used in system and provides parameters that lead to conditionally compiled code. Example of configuring
the software is provided in the demo application. The header file gives you detailed description on how
to choose what options you want in your system. Configuring the system through the application header
file is done by modifying system parameters by adding or removing specific lines through the comment
Freescale Semiconductor
15
相关PDF资料
KIT33812EKEVBE BOARD EVALUATION FOR MC33812
KIT33879AEKEVBE BOARD EVALUATION FOR MC33879
KIT33880DWBEVB KIT EVAL FOR MC33880 8X SW W/SPI
KIT33886DHEVB KIT EVAL FOR MC33886 H-BRIDGE
KIT33887EKEVBE BOARD EVALUATION FOR MC33887
KIT33887PNBEVB KIT EVAL 33887 5A H-BRIDGE PQFN
KIT33905D5EKEVBE KIT EVALUATION FOR MC33905
KIT33912EVME KIT EVALUATION FOR MC33912
相关代理商/技术参数
KIT33812ECUEVME 制造商:Freescale Semiconductor 功能描述:Small Engine Control Reference Design
KIT33812EKEVBE 功能描述:电源管理IC开发工具 INTEGRATED DUAL LOW & HI RoHS:否 制造商:Maxim Integrated 产品:Evaluation Kits 类型:Battery Management 工具用于评估:MAX17710GB 输入电压: 输出电压:1.8 V
KIT33813AEEVBE 功能描述:电源管理IC开发工具 2 Cylinder Small Engine RoHS:否 制造商:Maxim Integrated 产品:Evaluation Kits 类型:Battery Management 工具用于评估:MAX17710GB 输入电压: 输出电压:1.8 V
KIT33814AEEVBE 功能描述:交换机 IC 开发工具 2 Cylinder Small Engine RoHS:否 制造商:Maxim Integrated 产品:Evaluation Kits 类型:USB Power Switches 工具用于评估:MAX4984E 工作电源电压:2.8 V to 5.5 V
KIT33816AEEVM 功能描述:电源管理IC开发工具 Engine Control Module RoHS:否 制造商:Freescale Semiconductor 产品: 类型: 工具用于评估: 输入电压: 输出电压:
KIT33879AEKEVBE 功能描述:电源管理IC开发工具 CONFIGURABLE OCTAL RoHS:否 制造商:Maxim Integrated 产品:Evaluation Kits 类型:Battery Management 工具用于评估:MAX17710GB 输入电压: 输出电压:1.8 V
KIT33880DWBEVB 功能描述:电源管理IC开发工具 33880DWB COSS KIT RoHS:否 制造商:Maxim Integrated 产品:Evaluation Kits 类型:Battery Management 工具用于评估:MAX17710GB 输入电压: 输出电压:1.8 V
KIT33883DWEVB 功能描述:KIT EVAL FOR MC33883 PRE-DRIVER RoHS:否 类别:编程器,开发系统 >> 过时/停产零件编号 系列:- 标准包装:1 系列:- 传感器类型:CMOS 成像,彩色(RGB) 传感范围:WVGA 接口:I²C 灵敏度:60 fps 电源电压:5.7 V ~ 6.3 V 嵌入式:否 已供物品:成像器板 已用 IC / 零件:KAC-00401 相关产品:4H2099-ND - SENSOR IMAGE WVGA COLOR 48-PQFP4H2094-ND - SENSOR IMAGE WVGA MONO 48-PQFP