中级会员
 
- 积分
- 200
- 威望
- 106
- 贡献
- 56
- 兑换币
- 63
- 注册时间
- 2013-3-19
- 在线时间
- 19 小时
- 毕业学校
- njupt
|
野火 发表于 2013-4-16 19:15 ![]()
你好,请用我们最新提供的代码。
不需要用到 行中断
这么写中断服务函数
void PORTB_IRQHandler(void)//功 能:PORTB 外部中断服务
{
u8 i=9;
if((PORTB->ISFR>>i)==1)
{
NVIC_DisableIRQ(PORTB_IRQn);//场
DMA_Init(0,DMA_PORTC,GPIOD_IDR_Addr,(u32)ImageBuf[0],1,0,0,1,0,1,CAMERA_SIZE);
LED3=!LED3;LED2=!LED2;
PORTB->ISFR|=(1<<i); //清除标志位 参见k10手册241页
SampleFlag = 1;
}
}
老是跳到HardFault_Handler\,数组越界,看了一晚上都不知道为什么
|
|