下载此文档

stm32开发问题集锦.doc


文档分类:IT计算机 | 页数:约5页 举报非法文档有奖
1/5
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/5 下载此文档
文档列表 文档介绍
[本文摘自:http://hi./govern/blog/category/it%CE%C4%D5%C2]
1 在flash中跑程序时,能进入中断,但在ram中跑时,进不了中断的原因。
看以下的中断配置函数可以知道,要在ram中调试程序,需要定义VECT_TAB_RAM。
定义方法a:在Project\Options for taget 'xxx' 的对话框的c/c++中定义宏VECT_TAB_RAM
定义方法b:在程序中直接定义
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
/* Configure and enable ADC interrupt */
= ADC1_2_IRQChannel;
= 0;
= 0;
= ENABLE;
NVIC_Init(&NVIC_InitStructure);
}
2 SysTickHandler 函数不能进入。
原先初始化的语句为
SysTick_Config();
修改为以下时可以进入
SysTick_Config();
SysTick_CounterCmd(SysTick_Counter_Enable);
3 如何解决链接时错误"..\obj\: Error: L6218E: Undefined symbol assert_failed (referred from )."?
(即调试模式库),则需要在无论什么得放添加函数定义
void assert_failed(u8* file, u32 line)
{
/* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ /* Infinite loop */
while (1)
{
}

stm32开发问题集锦 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数5
  • 收藏数0 收藏
  • 顶次数0
  • 上传人wc69885
  • 文件大小0 KB
  • 时间2015-09-19