| Electronic Components Datasheet Search |
|
AN2618 Datasheet(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2618 Datasheet(HTML) 7 Page - STMicroelectronics |
|
7 / 23 page ![]() AN2618 Host interface software 7/23 3.3 eTPU channel initialization After the eTPU module is configured, each channel on the eTPU module can be configured. eTPU channel initialization includes the following tasks: 1. eTPU channel configuration registers initialization – Assign eTPU function to a channel – Setup channel priority – Configure interrupt/DMA/Output enable – Select eTPU function entry table encoding – Assign the function frame to a channel 2. eTPU channel status control register initialization – Set up eTPU function mode The eTPU channel assignment and the channel priority determination are a part of the host software architecture design. They are independent of the eTPU functions implementation. The information for the configuration is provided by the host software design. During the channel initialization, a section of eTPU data memory is assigned to each channel. This memory section is called the “function frame”. The function frame contains all the function parameters and static local variables used by the eTPU function. The starting address of the function frame is assigned to the channel at initialization. The function frame assignment can be static or dynamic. Dynamic allocation assigns the function frame to the channel based on the next available memory space. The availability of the eTPU data memory depends on the number of functions that have been assigned and the number of parameters the function is using. Dynamic allocation can reduce the eTPU data memory consumption by minimizing unused memory ‘holes’. To allocate the function frame dynamically, the host must know the function frame consumption by a particular eTPU function. The eTPU_C compiler provides a macro (::ETPUram) to report the number of parameters and static local variables used by a function at compile time (Appendix C on page 13). The eTPU function table entry encoding, interrupt enable, DMA enable, output enable, output polarity, and function mode are constants specific to the eTPU function software implementation. It is a good practice to define them only once in the eTPU code and export the configuration information at compile time. Once the host interface macros are added to the eTPU code (Appendix C on page 13), the #pragma write statements will generate a header file that contains all the eTPU function configuration and software symbol information at compile time (Appendix E on page 17). The header file can be included in the host interface code to resolve symbol references. 3.4 eTPU function initialization The eTPU function initialization is the last step of the eTPU initialization process. During the eTPU function initialization, the host is responsible for passing the parameters to the eTPU functions and initiating the eTPU function execution by issuing a host service request. Once the host service request for initialization is recognized, the eTPU will transition to the initialization state. Unlike in the host CPU, the eTPU function parameters passed from host are not placed on the stack. Instead, memory in the function frame is allocated to accommodate every function parameter. The host passes the eTPU function parameters by writing directly to the eTPU |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |