标题:
不太理解CW中中断asm文件的写法,恳请好心人指点
[打印本页]
作者:
dotaforgod
时间:
2009-11-2 15:09
标题:
不太理解CW中中断asm文件的写法,恳请好心人指点
谢谢好心人能进来看贴,希望您能够指点下我
1.在CW MC***_VECTOR.ASM中有, jsr >Finit_MC56F803x_这样一跳汇编语句,查找了一下init_MC56F803x是服务程序标识符,那前面的>F是什么意思?在书中也没看过调用子程序要加这两个符号
2.在CW初始化的ASM与中断等ASM文件中,都有定义段,可以我没看到将该段定义在程序存储器的具体位置。比如我认为中断是0-7F的空间,但在ASM中只是定义了一个section interrupt_vectors
org p:
难道在CW中interrupt_vectors就已经表明了空间地址了?也就是说是CW中固定的关键字?
3.在中断的服务子程序是否只要将标识符注明,可以写到一个工程里面其他任意.C或则.asm中?
我是一个新手,希望知道的工程师能解答我的疑惑,谢谢了
作者:
dotaforgod
时间:
2009-11-2 16:00
在CW工程的MC***_VECTOR.ASM文件中, jsr >Finit_MC56F803x可以去掉 >,不过不能去掉F,弄不明白init_MC56F803X本来就是个服务子程序的标识,干嘛调用的时候要加F
作者:
dotaforgod
时间:
2009-11-2 16:20
section interrupt_vectors
org p:
global FMC56F803x_intVec
FMC56F803x_intVec:
jsr Finit_MC56F803x_ ; RESET 0($00)
jsr MC56F803x_intRoutine ; COP Watchdog reset 1($02)
jsr MC56F803x_illegal ; illegal instruction 2($04)
jsr MC56F803x_intRoutine ; software interrupt 3 3($06)
jsr MC56F803x_HWSOverflow ; hardware stack overflow 4($08)
jsr MC56F803x_misalign ; misaligned long word access 5($0A)
jsr MC56F803x_intRoutine ; EOnCE step counter 6($0C)
jsr MC56F803x_intRoutine ; EOnCE breakpoint unit 0 7($0E)
jsr MC56F803x_intRoutine ; EOnCE trace buffer 8($10)
jsr MC56F803x_intRoutine ; EOnCE transmit register empty 9($12)
jsr MC56F803x_intRoutine ; EOnCE receive register full 10($14)
jsr MC56F803x_intRoutine ; software interrupt 2 11($16)
jsr MC56F803x_intRoutine ; software interrupt 1 12($18)
jsr MC56F803x_intRoutine ; software interrupt 0 13($1A)
jsr MC56F803x_intRoutine ; reserved 14($1C)
jsr MC56F803x_intRoutine ; Low Voltage Detector (power sense) 15($1E)
jsr MC56F803x_PLL ; PLL 16($20)
jsr MC56F803x_intRoutine ; HFM Error Interrupt 17($22)
jsr MC56F803x_intRoutine ; HFM Command Complete 18($24)
jsr MC56F803x_intRoutine ; HFM Command, Data, and Address Buffers Empty 19($26)
jsr MC56F803x_intRoutine ; MSCAN Error 20($28)
jsr MC56F803x_intRoutine ; MSCAN Rx 21($2A)
jsr MC56F803x_intRoutine ; MSCAN Tx 22($2C)
jsr MC56F803x_intRoutine ; MSCAN Wake-up 23($2E)
jsr MC56F803x_intRoutine ; GPIO D 24($30)
jsr MC56F803x_intRoutine ; GPIO C 25($32)
jsr MC56F803x_intRoutine ; GPIO B 26($34)
jsr MC56F803x_intRoutine ; GPIO A 27($36)
jsr FoffLLED ; SPI0 Receiver
jsr MC56F803x_intRoutine ; SPI0 Transmtter Empty 29($3A)
jsr MC56F803x_intRoutine ; SPI1 Receiver Full 30($3C)
jsr MC56F803x_intRoutine ; SPI1 Transmtter Empty 31($3E)
jsr MC56F803x_intRoutine ; SCI0 Transmitter Empty 32($40)
jsr MC56F803x_intRoutine ; SCI0 Transmitter Idle 33($42)
jsr MC56F803x_intRoutine ; SCI0 Receiver Error 34($44)
jsr MC56F803x_intRoutine ; SCI0 Receiver Full 35($46)
jsr MC56F803x_intRoutine ; SCI1 Transmitter Empty 36($48)
jsr MC56F803x_intRoutine ; SCI1 Transmitter Idle 37($4A)
jsr MC56F803x_intRoutine ; SCI1 Receiver Error 38($4C)
jsr MC56F803x_intRoutine ; SCI1 Receiver Full 39($4E)
jsr MC56F803x_intRoutine ; I2C Error 40($50)
jsr MC56F803x_intRoutine ; I2C General 41($52)
jsr MC56F803x_intRoutine ; I2C Receive 42($54)
jsr MC56F803x_intRoutine ; I2C Transmit 43($56)
jsr MC56F803x_intRoutine ; I2C Status 44($58)
jsr FisrTimerA0Compare ; TimerA Channel 0 45($5A)
jsr MC56F803x_intRoutine ; TimerA Channel 1 46($5C)
jsr MC56F803x_intRoutine ; TimerA Channel 2 47($5E)
jsr MC56F803x_intRoutine ; TimerA Channel 3 48($60)
jsr MC56F803x_intRoutine ; TimerB Channel 0 49($62)
jsr MC56F803x_intRoutine ; TimerB Channel 1 50($64)
jsr MC56F803x_intRoutine ; TimerB Channel 2 51($66)
jsr MC56F803x_intRoutine ; TimerB Channel 3 52($68)
jsr MC56F803x_intRoutine ; Comparator A 53($6A)
jsr MC56F803x_intRoutine ; Comparator B 54($6C)
jsr MC56F803x_intRoutine ; Interval Timer 0 55($6E)
jsr MC56F803x_intRoutine ; Interval Timer 1 56($70)
jsr MC56F803x_intRoutine ; Interval TImer 2 57($72)
jsr MC56F803x_intRoutine ; ADCA Conversion Complete 58($74)
jsr MC56F803x_intRoutine ; ADCB Conversion Complete 59($76)
jsr MC56F803x_intRoutine ; ADC Zero Crossing or Limit Error 60($78)
jsr MC56F803x_intRoutine ; Reload PWM 61($7A)
jsr MC56F803x_intRoutine ; PWM fault 62($7C)
jsr MC56F803x_intRoutine ; SW interrupt Low Priority 63($7E)
endsec
第一个向量就是复位初始化,不知道为什么要加一个F在要跳转的子程序前
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/)
Powered by Discuz! 7.0.0