初学 刚写个中断分频程序 请高手看看问题处在哪里 不能进中断 .title "pint.asm" .global _c_int00 .mmregs .def _c_int00 .def _ISR ;SWWCR .set 0x002B ;设置"SWWCR"寄存器的地址 .sect ".vectors" rst: B _c_int00 NOP NOP .space 15*4*16 int0: B _ISR ; NOP NOP int1: B _ISR NOP NOP int2: B _ISR NOP NOP .space 13*4*16
.text _c_int00: ssbx INTM ld #0,DP stm #0x2000,SP ;设置堆栈指针SP=2000,栈底 nop stm #0,CLKMD Statu1: ldm CLKMD, A and #01b, A bc Statu1, ANEQ ;检查是否已经切换到分频模式? stm #0x07ff,CLKMD ;设置DSP 时钟 10MHZ nop ; stm #0x3FF2,PMST ; stm #0x7FFF,SWWSR ; stm #0x0001,SWWCR ; stm #0xF800,BSCR stm #0xFFFF, IFR ; 请中断标志 ssbx XF STM #IMR,AR0 ORM #0007H,*AR0 RSBX INTM nop nop rsbx XF nop loop?: nop b loop? _ISR: ldm ST1,A and #2000h,A bc set_1?,AEQ set_0?: rsbx XF rete set_1?: ssbx XF rete .end
相关链接:https://bbs.21ic.com/upfiles/img/200712/20071221181026158.rar |