Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1119648
  • 博文数量: 141
  • 博客积分: 2853
  • 博客等级: 少校
  • 技术积分: 2266
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-04 12:03
文章分类

全部博文(141)

文章存档

2014年(3)

2013年(12)

2012年(126)

分类: 嵌入式

2013-03-19 15:43:16

用于映射中断的处理函数,就知道这么多,不求甚解呀,
void NVIC_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;

#ifdef  VECT_TAB_RAM 
  /* Set the Vector Table base location at 0x20000000 */
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else  /* VECT_TAB_FLASH  */
  /* Set the Vector Table base location at 0x08000000 */
  NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);  
#endif

NVIC_InitStructure.NVIC_IRQChannel = TIM2_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);

}

阅读(17723) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~