void?WCHNET_ETHIsr(?void?) { ????uint8_t?eth_irq_flag,?estat_regval; ????eth_irq_flag?=?R8_ETH_EIR;???? ????if(eth_irq_flag&RB_ETH_EIR_RXIF)????????????????????????????????//Receive?complete ????{ ????????R8_ETH_EIR?=?RB_ETH_EIR_RXIF;????????/*?Check?if?the?descriptor?is?owned?by?the?ETHERNET?DMA?*/ ????????if(?DMARxDescToGet->Status?&?ETH_DMARxDesc_OWN?) ????????{ ????????????estat_regval?=?R8_ETH_ESTAT;???????????? ????????????if(estat_regval?&?\ ????????????????????(RB_ETH_ESTAT_BUFER?|?RB_ETH_ESTAT_RXCRCER?|?RB_ETH_ESTAT_RXNIBBLE?|?RB_ETH_ESTAT_RXMORE)) ????????????{????????????????return; ????????????}???????????? ????????????if(?((ETH_DMADESCTypeDef*)(DMARxDescToGet->Buffer2NextDescAddr))->Status&?ETH_DMARxDesc_OWN?) ????????????{ ????????????????DMARxDescToGet->Status?&=?~ETH_DMARxDesc_OWN; ????????????????DMARxDescToGet->Status?&=?~ETH_DMARxDesc_ES; ????????????????DMARxDescToGet->Status?|=?(ETH_DMARxDesc_FS|ETH_DMARxDesc_LS); ????????????????DMARxDescToGet->Status?&=?~ETH_DMARxDesc_FL; ????????????????DMARxDescToGet->Status?|=?((R16_ETH_ERXLN+4)<Buffer2NextDescAddr); ????????????????R16_ETH_ERXST?=?DMARxDescToGet->Buffer1Addr; ????????????????} ??????????????}
在這個中斷里面接收PHY的數(shù)據(jù),每次接收幾次之后就無法觸發(fā)
if(?DMARxDescToGet->Status?&?ETH_DMARxDesc_OWN?)
接收檢查通過不了,但是接收是完成的,這個是什么原因造成的?
熱門產(chǎn)品 :
CH585: 集成高速USB和NFC的藍牙MCU