在线时间0 小时
UID334891
ST金币0
蝴蝶豆0
注册时间2007-7-25
新手上路
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2012-4-23 09:19:13
|
显示全部楼层
a0a.1 0b0c
RE:捕获中断设置
中断部分是这样的:
uint16_t Mt,St,tmpcntr;
INTERRUPT_HANDLER(TIM1_CAP_COM_IRQHandler, 12)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
int d,l,j,e,f;
static int o=0,bs=0;
extern uchar Xsbuf[];
uchar h,i,b,Status[8],yxtrx[12],pluscode;
static uint16_t G32Tosc=0;
if(TIM1_GetITStatus(TIM1_IT_CC1))
{
TIM1_ClearITPendingBit(TIM1_IT_CC1);
if(GPIOC->IDR&0x40) TIM1->CCER1|=0X02;//ch1 下降沿触发
else TIM1->CCER1&=0XEC;//CH1 上升沿触发
tmpcntr=TIM1_GetCapture1();
TIM1_Cmd(ENABLE);//使能计数
}测试结果好象不能进入中断.请高手解答 |
|