CH390 調(diào)試問(wèn)題

各位專家您好,我在調(diào)試CH390的時(shí)候,我的SPI接口可以讀出ID號(hào),說(shuō)明接口移植沒(méi)有問(wèn)題。

插上網(wǎng)線之后ping不通,但是有一個(gè)現(xiàn)象如下:

在插上網(wǎng)線之后,串口就一直打印了Receive overflow錯(cuò)誤,在不插上網(wǎng)線的時(shí)候就不會(huì)在打印了,我看了下這個(gè)錯(cuò)誤是在中斷函數(shù)中出現(xiàn)的。我是用的主程序如下:

請(qǐng)專家指導(dǎo),非常感謝。

void?start_net_task(void?*argument)
{
????uint32_t?id=0;
	??printf("start?net?task\r\n");
????ch390_interface_register(ch390_interface);
	??ch390_hardware_reset();
	??
	??HAL_Delay(10);
	//while(1)
	{
		id=ch390_get_vendor_id();
		printf("ch390?vid=%4.4x\r\n",id);
		id=ch390_get_product_id();
		printf("ch390?pid=%4.4x\r\n",id);
	}
	??printf("lwip?init\r\n");
	??init_lwip_netif();
	??printf("dhcp_start\r\n");
????dhcp_start(&ch390_netif);
	??print_self_ip(&ch390_netif);
????/*?We?provide?three?examples?in?this?project.
?????*?Uncomment?one?of?them?below.*/
????tcp_server_init();

????while(1)
????{
????????if(ch390_check_int_status())
????????{
????????????ch390_int_handler();
????????}
????????sys_check_timeouts();
????}
}

void?ch390_int_handler()
{
????uint8_t?int_status?=?ch390_get_int_status();
????//?Link?status?change
????if(int_status?&?ISR_LNKCHG)
????{
????????HAL_Delay(100);
????????if(ch390_get_link_status())
????????{
????????????printf("netif_set_up\r\n");
????????????netif_set_up(&ch390_netif);
????????????ch390_write_reg(CH390_ISR,?ISR_LNKCHG);
????????}
????????else?{
????????????printf("netif_set_down\r\n");
????????????netif_set_down(&ch390_netif);
????????}
????}
????//?Receive?overflow
????if(int_status?&?ISR_ROS)?printf("Receive?overflow\r\n");
????//?Receive?overflow?counter?overflow
????if(int_status?&?ISR_ROO)?printf("Overflow?counter?overflow\r\n");
????//?Packet?received
????if(int_status?&?ISR_PR)
????{
????????struct?ethernetif?*ethernetif?=?ch390_netif.state;
????????do{
????????????ethernetif_input(&ch390_netif);
????????}
????????while(ethernetif->rx_len?!=?0);
????}
}

現(xiàn)象如下:

無(wú)標(biāo)題.png

您好,已有同事聯(lián)系您解決問(wèn)題。


同樣問(wèn)題怎樣解決的



同樣問(wèn)題怎樣解決的



您好,您這邊參考的是哪個(gè)例程呢?產(chǎn)生溢出中斷一般是由于收到的數(shù)據(jù)包過(guò)多且沒(méi)有及時(shí)取走,從而導(dǎo)致溢出??梢栽谝绯鲋袛嘀欣^續(xù)執(zhí)行取數(shù)據(jù)的操作??梢詫⒛臏y(cè)試代碼發(fā)來(lái)看一下(郵箱:lq@wch.cn)


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频