1421 views|0 replies

2015

Posts

0

Resources
The OP
 

TMS320C2X/C5X application interrupt function [Copy link]

Interrupt Functions In a fixed-point C compiler, interrupts can be handled directly using C functions. Each interrupt uses a fixed program name. As shown below c_int0 System reset interrupt c_int1 External interrupt 0 c_int2 External interrupt 1 c_int3 External interrupt 2 c_int4 Internal timer interrupt C_int5 Serial port receive interrupt c_int6 Serial port send interrupt c_int7 TDM port receive interrupt c_int8 TDM port send interrupt c_int9 External interrupt 3 When the above interrupt program is called, a subroutine named I$$SAVE is called first. This subroutine protects all registers. Similarly, when the function returns, a subroutine named 1$$REST is called to restore the protected registers. When writing interrupt programs in C language, the following points must be noted: (1) The word pointed to by SP (AR1) may be in use by the compiler, so it must be protected. (2) The interrupt mask and enable must be set by the programmer by modifying the IMR register using embedded assembly statements. This modification will not damage the C environment or C pointer. (3) Interrupt programs do not have parameter passing, and even if they are specified, they will be ignored. (4) Since all registers need to be protected when writing interrupt programs in C, the efficiency is not high. (5) When associating a program with an interrupt, a jump instruction must be placed at the corresponding interrupt vector. This function can be achieved by using the .sect assembly instruction to create a simple jump instruction table. (6) In assembly language, note that a hyphen must be added before the interrupt program name. For example, c_int1 in C language is _c_int1 in assembly language. (7) Interrupt programs or programs that need to be called in interrupt programs cannot be compiled with the _oe option for optimization.

This post is from DSP and ARM Processors
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list