參數(shù)資料
型號(hào): AN2848
英文描述: Programming the eTPU
中文描述: 編程的eTPU
文件頁(yè)數(shù): 10/16頁(yè)
文件大?。?/td> 528K
代理商: AN2848
Programming the eTPU, Rev. 0
Function Design – Software
Freescale Semiconductor
10
The Applications Programmers Interface (API) needs to be designed as part of the eTPU function.
An eTPU function cannot be considered complete without the means to initialize and exchange
data with the host. Remember that the eTPU is a 24-bit processor while the host and memory
system is organized around 32 bits.
Use 24-bit data types if possible, particularly when indirectly referenced. The eTPU does not have
a byte size addressing mode. Significant code is generated by the compiler to dereference byte
pointers. An array of (int24) words will take up more data memory, but save significant program
space and execution time. Note, however, that the machine can handle arrays of bits quite
efficiently.
The eTPU data memory can be read by the host in two locations. One of these locations returns
the 24-bit data automatically sign extended. Accesses by the host to these addresses will not affect
the upper 8 bits of the parameter. Using this alternate address space can simplify parameter
passing between eTPU and host.
Reconsider the use of nested subroutines. The eTPU has a single return address register and must
store off the value the when a second call is made.
Use the library functions where possible. They have been designed to balance proper operation
with minimum code size. If you find a source code change in a library that reduces the code size,
it possibly has an undesirable side effect. Proceed only if you understand the consequences.
Reconsider parameter-driven channel configurations. The TPU had a convenient instruction:
config := p
. The eTPU does not an equivalent instruction, mainly because the channel
configuration options are much more numerous than in the TPU. If you need the option to invert
your pulse from high going to low going, implement that option. However to replicate the original
config
subinstruction has been found to be expensive on the eTPU.
Be careful about auto variables (in the current version of the compiler). These are the non-static
temporary variables declared within a function. A problem arises when the function can be
instantiated on both eTPU engines. The compiler will allocate an absolute address for these
variables, and if one instance of the function is running on each engine simultaneously, there is a
possible collision in accessing the variable and consequent corruption of the data. If a function
can be instantiated to run on either engine, the only work around at this time is to declare all local
variables as
static
. A compiler extension is currently being reviewed to correct this problem.
Another compiler extension is under construction to modify the scoping of variables for groups of
functions. When a user tries to group a number of channels to perform one coordinated function
on several pins, for example an H-driver, and then instantiates a number of these groups, the C
language does not provide a convenient scoping for the variables local to a group. The Byte Craft
eTPU_C compiler will provide an extension to handle this situation. Details of the extension will
be provided in a later note.
Whenever a thread is entered or the CHAN register is written by the eTPU code, the ERTx
registers are updated from the channel capture registers. Since these registers are also used to read
and write the match registers, the user should take care in all accesses of the channel match and
capture registers.
相關(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 等級(jí): 材料: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" 長(zhǎng) x 1.420" 寬(89.92mm x 36.07mm) 高度:1.180"(29.97mm) 面積(L x W):5.03"(32.5cm) 設(shè)計(jì):包含蓋 材料:金屬 - 鋁 顏色:自然色 厚度:0.110"(2.79mm) 特性:PCB 支座,防水 等級(jí):IP67, IP68, NEMA 4X,6,6P,12,13 材料可燃性等級(jí):- 發(fā)貨信息:從 Digi-Key 運(yùn)送 重量: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" 長(zhǎng) x 1.420" 寬(89.92mm x 36.07mm) 高度:1.180"(29.97mm) 面積(L x W):5.03"(32.5cm) 設(shè)計(jì):包含蓋 材料:金屬 - 鋁 顏色:黑 厚度:0.110"(2.79mm) 特性:PCB 支座,防水 等級(jí):IP67, IP68, NEMA 4X,6,6P,12,13 材料可燃性等級(jí):- 發(fā)貨信息:從 Digi-Key 運(yùn)送 重量: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 等級(jí): 材料: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 等級(jí): 材料:Acrylonitrile Butadiene Styrene (ABS) 顏色:Red