Solution to the network problem of s3c2410+cs8900 board under WINCE

Publisher:创意狂想Latest update time:2016-11-27 Source: eefocusKeywords:WINCE  s3c2410  cs8900 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

CS8900+s3c2410 Internet disconnection problem and its solution

My understanding is that when the system is running the network, it often enables network interruption, causing the network to reset.

Find E:\WINCE420\WINCE420\PLATFORM\SMDK2410\KERNEL\HAL\cfw.c 
and find BOOL OEMInterruptEnable() function case SYSINTR_ETHER:

Make the network card initialization appear only once, because after each initialization, the connection will be disconnected

Add a global variable Inited == FALSE


case SYSINTR_ETHER: // Ethernet on EINT9. 
  
      if(Inited == FALSE) // edit by andy

   { 
    s2410IOP->rEINTPEND = 0x200; 
    s2410INT->rSRCPND = BIT_EINT8_23; // by shim 
    if (s2410INT->rINTPND & BIT_EINT8_23) 
     s2410INT->rINTPND = BIT_EINT8_23; 
    Inited = TRUE;
   } 
   s2410IOP->rE INTMASK &= ~0x200; 
   s2410INT ->rINTMSK &= ~BIT_EINT8_23; 
   break;


http://hi.baidu.com/fei_chen/blog/item/c961e933ff04d342ac4b5f3c.html


Solution to the network problem of s3c2410+cs8900 board under WINCE

The network ping connection under WINCE is disconnected after a while. The fundamental reason for the solution 
is that the interrupt flag that has been generated is cleared in the interrupt processing service! 
In this way, an interrupt is lost. Because the interrupt is configured as a rising edge trigger in the original driver! Once an interrupt is lost, the interrupt signal will not jump again, because the next interrupt will only be generated after the interrupt status queue register of cs8900 is read in the interrupt service! (See the explanation about INTRQ on page 14 of the cs8900 datasheet! 
As to why, the original driver clears the interrupt flag that has been generated! You can track the process of turning on and off interrupts in the interrupt service of the cs8900 driver! Solve the problem of network disconnection on the cs8900+s3c2410+wince platform! and find BOOL OEMInterruptEnable() function case SYSINTR_ETHER: 
if(Inited == FALSE) s2410IOP->rEINTPEND = 0x200; s2410INT->rSRCPND = BIT_EINT8_23; // by shim
if (s2410INT->rINTPND & BIT_EINT8_23) s2410INT->rINTPND = BIT_EINT8_23; Inited = TRUE; s2410IOP->rEINTMASK &= ~0x200; s2410INT->rINTMSK &= ~BIT_EINT8_23; break; Global definition: BOOL Inited = FALSE; After this modification! You may need to recompile everything, clean and then rebuild! ! Test the network again! There will be no problem!


Repost, tested correctly

Solution: 
Find E:\WINCE420\WINCE420\PLATFORM\SMDK2410\KERNEL\HAL\cfw.c 
and find BOOL OEMInterruptEnable() function case SYSINTR_ETHER: 
if(Inited == FALSE) 

s2410IOP->rEINTPEND = 0x200; 
s2410INT->rSRCPND = BIT_EINT8_23; // by shim 
if (s2410INT->rINTPND & BIT_EINT8_23) 
s2410INT->rINTPND = BIT_EINT8_23; 
Inited = TRUE; 

s2410IOP->rEINTMASK &= ~0x200; 
s2410INT->rINTMSK &= ~BIT_EINT8_23; 
break;

Define globally: BOOL Inited = FALSE;


Keywords:WINCE  s3c2410  cs8900 Reference address:Solution to the network problem of s3c2410+cs8900 board under WINCE

Previous article:The spca5xx driver is loaded into the S3C2410 board
Next article:ucos II+ucGUI+s3c2410+LCD+touch screen integration

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号