dsp中断的c语言程序设计,C6743串口接收中断在给DSP发送数之后能观察到CSR的GIE变为0,在中断向量表里设置断点也能跳进去,但是继续运行程序后又返回主函数里啦,不进中断服务程序????...

*------------------------------------------------------------------------------

* Global symbols defined here and exported out of this file

*------------------------------------------------------------------------------

.global _vectors

.global _c_int00

.global _vector1

.global _vector2

.global _vector3

.global _vector4

.global _vector5

.global _UART_ISR

.global _vector7

.global _vector8

.global _vector9

.global _vector10

.global _vector11

.global _vector12

.global _vector13

.global _vector14  ; Hookup the c_int14 ISR in main()

.global _vector15

*------------------------------------------------------------------------------

* Global symbols referenced in this file but defined somewhere else.

* Remember that your interrupt service routines need to be referenced here.

*------------------------------------------------------------------------------

.ref _c_int00

.ref _UART_ISR

*------------------------------------------------------------------------------

* This is a macro that instantiates one entry in the interrupt service table.

*------------------------------------------------------------------------------

VEC_ENTRY .macro addr

STW   B0, * --B15

MVKL  addr,B0

MVKH  addr,B0

B     B0

LDW   * B15++,B0

NOP   2

NOP

NOP

.endm

*------------------------------------------------------------------------------

* This is a dummy interrupt service routine used to initialize the IST.

*------------------------------------------------------------------------------

_vec_dummy:

B    B3

NOP  5

*------------------------------------------------------------------------------

* This is the actual interrupt service table (IST). It is properly aligned and

* is located in the subsection .text:vecs. This means if you don't explicitly

* specify this section in your linker command file, it will default and link

* into the .text section. Remember to set the ISTP register to point to this

* table.

*------------------------------------------------------------------------------

.sect ".vectors"

.align 1024

_vectors:

_vector0:   VEC_ENTRY _c_int00    ;RESET

_vector1:   VEC_ENTRY _vec_dummy  ;NMI

_vector2:   VEC_ENTRY _vec_dummy  ;RSVD

_vector3:   VEC_ENTRY _vec_dummy

_vector4:   VEC_ENTRY _vec_dummy

_vector5:   VEC_ENTRY _vec_dummy

_vector6:   VEC_ENTRY _UART_ISR

_vector7:   VEC_ENTRY _vec_dummy

_vector8:   VEC_ENTRY _vec_dummy

_vector9:   VEC_ENTRY _vec_dummy

_vector10:  VEC_ENTRY _vec_dummy

_vector11:  VEC_ENTRY _vec_dummy

_vector12:  VEC_ENTRY _vec_dummy

_vector13:  VEC_ENTRY _vec_dummy

_vector14:  VEC_ENTRY _vec_dummy  ; Hookup the c_int14 ISR in main()

_vector15:  VEC_ENTRY _vec_dummy

*------------------------------------------------------------------------------

interrupt void UART_ISR() //中断响应函数

{

CSR&=0xfffffffe; // 关中断 GIE=0

asm(" NOP 1 ");

ICR = 0xfff0;                // 清除中断标志ICR

flag=0;

asm(" NOP 1 ");

CSR=CSR|1;    // 开中断

printf("hello");

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值