5秒后页面跳转
AN2821 PDF预览

AN2821

更新时间: 2022-01-21 20:09:00
品牌 Logo 应用领域
其他 - ETC /
页数 文件大小 规格书
24页 547K
描述
eTPU Host Interface

AN2821 数据手册

 浏览型号AN2821的Datasheet PDF文件第2页浏览型号AN2821的Datasheet PDF文件第3页浏览型号AN2821的Datasheet PDF文件第4页浏览型号AN2821的Datasheet PDF文件第6页浏览型号AN2821的Datasheet PDF文件第7页浏览型号AN2821的Datasheet PDF文件第8页 
Host Interface Software  
4.2 eTPU Module Initialization  
At the power up initialization, the eTPU peripheral hardware is configured by the host. The eTPU module  
initialization includes the following steps:  
1. Initialize eTPU global registers  
— eTPU MISC Compare Register (ETPU_MISCCMPR)  
— eTPU Module Configuration Register (ETPU_MCR)  
— eTPU Time Base Configuration Register (ETPU_TBCR)  
— eTPU STAC Bus Configuration Register (ETPU_STACR)  
— eTPU Engine Configuration Register (ETPU_ECR)  
2. Load eTPU code from flash memory to eTPU code RAM  
3. Copy initial values of eTPU code global variables to eTPU data memory  
Most of the information required to configure the eTPU global registers are not dependent on the eTPU  
software implementation (i.e., time base, clock frequency, entry table address, etc.). The configuration  
information is determined during the host peripheral configuration and resource allocation. Only the MISC  
value depends on the actual eTPU software implementation; it has to be exported to the host program after  
the eTPU code is compiled. The eTPU_C compiler provides a macro (::ETPUmisc) to calculate the MISC  
value of the eTPU code image (see Code Example 3).  
The eTPU code image is generated when the eTPU C program is compiled. To use this code in the host  
program, the eTPU code image can be exported as an array of constant values. The eTPU_C compiler  
provides a macro (::ETPUcode) to generate and export the eTPU code image (see Code Example 3). The  
eTPU code image constant array is suitable to be included in the host source code. The host compiler  
locates the eTPU code image array in the flash memory at host source code compile time. Since the eTPU  
micro-engine can only fetch micro-instructions out of eTPU code memory (RAM), at the power up  
initialization, the eTPU code image has to be loaded to eTPU code memory.  
As it is in the standard C syntax, when the eTPU code is compiled, the global variables are allocated to the  
eTPU data memory and the initial values are assigned to the corresponding memory locations. The  
standard C syntax requires that all global variables are declared outside of any function. For eTPU, this  
means that all global variables have to be declared outside of any execution thread. Since only the code in  
a thread can be executed on eTPU, the global variable initial value assignment statements will not be  
executed. The global variables cannot be initialized in the eTPU code; they must be initialized by the host.  
The software statements have to be added to the host code to initialize the eTPU global variables. The  
initialization values have to be exported from the eTPU compiler to host compiler. The eTPU_C compiler  
provides a macro (::ETPUglobalimage) to capture initial values for all global variables and exports them as  
a constant array (Code Example 4). At power up initialization, the global variable initial values are loaded  
to the eTPU data memory for global variables.  
The host interface macros have to be added to the eTPU code in #pragma writestatements to export  
the eTPU software information to the host compiler (Code Example 3). These statements will generate  
header files that contain the MISC value, eTPU code image and global variable memory image (Code  
Example 4).  
eTPU Host Interface, Rev. .1  
Freescale Semiconductor  
5

与AN2821相关器件

型号 品牌 描述 获取价格 数据表
AN2848 ETC Programming the eTPU

获取价格

AN2861K PANASONIC Consumer Circuit, Bipolar, PDIP28, DIL-28

获取价格

AN2897 ETC Using the eTPU Angle Clock

获取价格

AN28F010-120 ETC x8 Flash EEPROM

获取价格

AN28F010-150 ETC x8 Flash EEPROM

获取价格

AN28F256-200P1C2 INTEL Flash, 32KX8, 200ns, PQCC32

获取价格