| 数据搜索系统,热门电子元器件搜索 |
|
AN3129 数据表(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3129 数据表(HTML) 4 Page - STMicroelectronics |
|
4 / 12 page ![]() FIQ handler environment AN3129 4/12 Doc ID 16927 Rev 1 3 FIQ handler environment The FIQ registration, the ISR function and the runtime environment of a FIQ handler are different from a standard IRQ handler. A working example of an FIQ handler can be found in latency measurement module in Section 4: IRQ latency measurement. 3.1 FIQ registration For FIQ registration ‘set_fiq_handler’ API is used. The two arguments of this API are: ● Function pointer ● Size of handler function in bytes This handler function is copied to the FIQ vector reserved area. The FIQ vector area is last in the memory area reserved for interrupt vectors. About five hundred (500) bytes are available in this area for copying the ISR. In the SPEAr Linux Support Package (LSP), the following API must be used to select the configuration of the IRQ source: ● vic_unmask_irq(int number) – enables interrupt source on VIC as IRQ ● vic_select_fiq(int number) – selects interrupt source on VIC as FIQ instead of IRQ 3.2 FIQ mode registers setup When the FIQ handler runs, it utilizes FIQ mode-specific registers (r8-r14) and general mode registers (r0-r7). This set of FIQ mode registers is exclusive to FIQ mode and not available to other handlers. To pass any information to the FIQ handler, the FIQ mode registers have to be set using the call: ‘set_fiq_regs’. 3.3 Return from FIQ mode To return from FIQ mode on completion of the code, use the following assembly instruction: subs pc, lr, #4; This command restores the instruction pointer to the original location it was before FIQ arrived. 3.4 FIQ ISR in C Writing the FIQ handler function in ARM assembly language can be cumbersome, so it is highly recommended to use C language instead. This is especially true for large functions when the handler function is larger than the maximum size available for FIQ vector (500 bytes). In such cases branching to the C function can be possible. This involves saving of the register context (r0-r12 general mode registers) and initialization of the function frame pointer. |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |