參數(shù)資料
型號: AN2848
英文描述: Programming the eTPU
中文描述: 編程的eTPU
文件頁數(shù): 11/16頁
文件大小: 528K
代理商: AN2848
Host Interface Design
Programming the eTPU, Rev. 0
Freescale Semiconductor
11
Optimize your source. The compiler has a sophisticated system of optimizers, but it cannot
always rewrite inefficiently written code. We will try to provide specific examples of this in a
separate application note.
The design of an eTPU function should follow some general guidelines for best results:
The compiler recognizes code for the unique architecture of the eTPU when it encounters the
following statement:
#pragma ETPU_function name standard/alternate @functionnum
The function is divided into threads which are distinguished by the source of the service request
that initializes the thread. The thread entries are established by a string of
if…else if…else
if……else
statements. The conditions in the if statements must uniquely define one or more entry
conditions according to whether the standard or alternate entry table is selected in the
#pragma
statement. All entries in the table must be provided for. All entries not explicitly covered by the if
statements will be directed to the trailing
else
.One thread, normally entered by an initialization
HSR, sets up the channel for the function. This includes selecting the channel mode, the TCRs to
be used, and the initial input and/or output pin actions.
If the channel is to be used to request service, the thread must enable channel service requests.
In threads which are entered in response to channel or link service requests, the flag requesting the
service should be cleared before exiting the thread. If the flag is not cleared, the channel will
immediately be rescheduled for service when the thread ends. Note that exiting a thread
(executing an
end
) will automatically clear the HSR bits.
Use the Simulator for debugging and analyzing your code. In the situation described in the
previous bullet, the simulator will provide a warning if a channel constantly requests service due
to an un-cleared flag.
6
Host Interface Design
The eTPU is a peripheral device within a microcontroller and is completely controlled by the host CPU.
The system engineer needs to provide a number of setup and control functions for eTPU operation. Details
of these operations are given in the Reference Manual and in the example functions. The operations
include the following steps:
Write the code image to the eTPU Shared Code Memory.
Configure the MCU ports as required to enable the selected eTPU pins.
Set up the global eTPU registers. This includes pin filter control and Timer/ Counter Register
prescaler and control. Global interrupts may be enabled if necessary and the MISC can be setup at
this time, although it is not necessary to use the MISC during function development.
Setup the function that is assigned to each channel. This includes writing the compiler generated
function number and the initial parameters to the local function frame for the channel. The
compiler can provide all addresses automatically.
Select a high, medium, or low priority for each function. Note that this operation allows a function
to be scheduled and execute service threads. The only certain means for the host to disable an
eTPU channel is to set the priority to zero.
相關(guān)PDF資料
PDF描述
AN2897 Using the eTPU Angle Clock
AN2904FHQ AN2904FHQ - Sound input/output interface IC for digital still camera
AN2933 Understanding the eTPU Channel Hardware
AN30210A Analog IC
AN304 Single Differential Amplifier
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
AN-2850 功能描述:罩類、盒類及殼類產(chǎn)品 3.54 x 1.42 x 1.18" NATURAL FINISH ALUM RoHS:否 制造商:Bud Industries 產(chǎn)品:Boxes 外部深度:6.35 mm 外部寬度:6.35 mm 外部高度:2.56 mm NEMA 額定值: IP 等級: 材料:Acrylonitrile Butadiene Styrene (ABS) 顏色:Red
AN-2850-A 功能描述:BOX ALUM NATURAL 3.54"L X 1.42"W 制造商:bud industries 系列:AN-A 零件狀態(tài):有效 容器類型:帶安裝法蘭的盒子 大小/尺寸:3.540" 長 x 1.420" 寬(89.92mm x 36.07mm) 高度:1.180"(29.97mm) 面積(L x W):5.03"(32.5cm) 設(shè)計:包含蓋 材料:金屬 - 鋁 顏色:自然色 厚度:0.110"(2.79mm) 特性:PCB 支座,防水 等級:IP67, IP68, NEMA 4X,6,6P,12,13 材料可燃性等級:- 發(fā)貨信息:從 Digi-Key 運送 重量:0.375 磅(170.1g) 標(biāo)準(zhǔn)包裝:1
AN-2850-AB 功能描述:BOX ALUM BLACK 3.54"L X 1.42"W 制造商:bud industries 系列:AN-A 零件狀態(tài):有效 容器類型:帶安裝法蘭的盒子 大小/尺寸:3.540" 長 x 1.420" 寬(89.92mm x 36.07mm) 高度:1.180"(29.97mm) 面積(L x W):5.03"(32.5cm) 設(shè)計:包含蓋 材料:金屬 - 鋁 顏色:黑 厚度:0.110"(2.79mm) 特性:PCB 支座,防水 等級:IP67, IP68, NEMA 4X,6,6P,12,13 材料可燃性等級:- 發(fā)貨信息:從 Digi-Key 運送 重量:0.375 磅(170.1g) 標(biāo)準(zhǔn)包裝:1
AN-2850-B 功能描述:罩類、盒類及殼類產(chǎn)品 3.54 x 1.42 x 1.18" BLACK ALUMINUM RoHS:否 制造商:Bud Industries 產(chǎn)品:Boxes 外部深度:6.35 mm 外部寬度:6.35 mm 外部高度:2.56 mm NEMA 額定值: IP 等級: 材料:Acrylonitrile Butadiene Styrene (ABS) 顏色:Red
AN-2851 功能描述:罩類、盒類及殼類產(chǎn)品 2.52 x 2.28 x 1.38" NATURAL FINISH ALUM RoHS:否 制造商:Bud Industries 產(chǎn)品:Boxes 外部深度:6.35 mm 外部寬度:6.35 mm 外部高度:2.56 mm NEMA 額定值: IP 等級: 材料:Acrylonitrile Butadiene Styrene (ABS) 顏色:Red