想法是stm32f407IGT6中使用硬件定时器的回调,在触发特定条件后更改该定时器的回调,跳转执行别的动作。在第一个回调中,触发条件后把新的回调函数传入hwtimer_init()来修改原定时器回调,结果在hwtimer_init()中执行rt_device_find后程序直接跳入rt_assert_handle()中.
查看更多
find函数 不可以在中断中使用。定时器回调实在中断中调用的。
rt_object_t rt_object_find(const char *name, rt_uint8_t type){ struct rt_object *object = RT_NULL; struct rt_list_node *node = RT_NULL; struct rt_object_information *information = RT_NULL; information = rt_object_get_information((enum rt_object_class_type)type); /* parameter check */ if ((name == RT_NULL) || (information == RT_NULL)) return RT_NULL; /* which is invoke in interrupt status */ RT_DEBUG_NOT_IN_INTERRUPT; /* enter critical */ rt_enter_critical();
rt_object_t rt_object_find(const char *name, rt_uint8_t type)
{
struct rt_object *object = RT_NULL;
struct rt_list_node *node = RT_NULL;
struct rt_object_information *information = RT_NULL;
information = rt_object_get_information((enum rt_object_class_type)type);
/* parameter check */
if ((name == RT_NULL) || (information == RT_NULL)) return RT_NULL;
/* which is invoke in interrupt status */
RT_DEBUG_NOT_IN_INTERRUPT;
/* enter critical */
rt_enter_critical();
能软件调试吗,排查内存异常
欢迎发表与嵌入式相关的技术分享、开发技巧、工具介绍、技术设想、职业心得、行业评论等对他人有启发,排版优雅的文章
回到 顶部
发布 问题
分享 好友
手机 浏览
投诉 建议
回到 底部