今年还有一篇核心论文任务呢,这都6月了,还不知道写啥,感脚要来不及了。:'(
今年还有一篇核心论文任务呢,这都6月了,还不知道写啥,感脚要来不及了。:'(
自己做好保护就行,所以“支持”,:lol
读比较简单啊,sfud就可以直接读,写复杂一点,应为要整个扇区擦除
不配置管脚就应该是高阻态,可以检查一下是否对该引脚进行了配置
好闲,:o
跟踪调试一下,看看是不是没设置进去,芯片应该不会出这么大的篓子
调戏,继续调戏,看看哪里重置了时间
查呗,看看任务为啥没有切换
要精确计时就不能用系统节拍,我的理解是:如果你用系统节拍,误差就会是1个系统节拍。要高精度的计时通常使用硬件定时器来实现,硬件定时器可以是产生系统节拍的,也可以是其它定时器。
高优先级的运行条件是什么?有没有主动让出处理器,比如调用delay函数?
hbaokw 发表于 2018-10-21 20:49
有可能如兄台你所说,不过最新用GCC编译器整的工程使用2.0.2没有这个问题了。 ...
中断中使用了rt_mutex_take?中断中不能使用可能使系统挂起的函数。
rt_err_t eth_device_init(struct eth_device * dev, char *name)
{
rt_uint16_t flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | dev->flags;
#if LWIP_IGMP
/* IGMP support */
flags |= NETIF_FLAG_IGMP;
#endif
return eth_device_init_with_flag(dev, name, flags);
}
static void tcpip_init_done_callback(void *arg)
{
rt_device_t device;
struct eth_device *ethif;
ip4_addr_t ipaddr, netmask, gw;
struct rt_list_node* node;
struct rt_object* object;
struct rt_object_information *information;
LWIP_ASSERT("invalid arg.\n",arg);
IP4_ADDR(&gw, 0,0,0,0);
IP4_ADDR(&ipaddr, 0,0,0,0);
IP4_ADDR(&netmask, 0,0,0,0);
/* enter critical */
rt_enter_critical();
/* for each network interfaces */
information = rt_object_get_information(RT_Object_Class_Device);
RT_ASSERT(information != RT_NULL);
for (node = information->object_list.next;
node != &(information->object_list);
node = node->next)
{
object = rt_list_entry(node, struct rt_object, list);
device = (rt_device_t)object;
if (device->type == RT_Device_Class_NetIf)
{
ethif = (struct eth_device *)device;
/* leave critical */
rt_exit_critical();
LOCK_TCPIP_CORE();
netif_add(ethif->netif, &ipaddr, &netmask, &gw,
ethif, netif_device_init, tcpip_input);
if (netif_default == RT_NULL)
netif_set_default(ethif->netif);
#if LWIP_DHCP
/* set interface up */
netif_set_up(ethif->netif);
/* if this interface uses DHCP, start the DHCP client */
dhcp_start(ethif->netif);
#else
/* set interface up */
netif_set_up(ethif->netif);
#endif
if (ethif->flags & ETHIF_LINK_PHYUP)
{
netif_set_link_up(ethif->netif);
}
UNLOCK_TCPIP_CORE();
/* enter critical */
rt_enter_critical();
}
}
/* leave critical */
rt_exit_critical();
rt_sem_release((rt_sem_t)arg);
}
问 发论文,题目基于RT-Thread...有什么创新点可以挖掘吗?