I'm porting Windows CE 5.0 MainStone BSP to a board based on PXA270.

I'm trying to port the Eboot to this board.

The Ethernet Controller is mapped on nCS4 (0x1000_0000).

In developement kit MSC1 register value is 0aCCD1 i have not changed it in
my board also.

But when I try to apply it the driver in the board I am working now it
appears to start ok, but it does not communicate well. The driver
detects the Ethernet Controllet ok on SMCInit() routine, but It appears
to fail on SCMSendFrame() or SMCGetFrame() routines.

both chips have the same revision?

My board doesn't have an EEPROM and I have wr0te MAC Address by hand in
LAN91CInit() like

// Gouri
mac[0] = 0x0080;
mac[1] = 0x263E;
mac[2] = 0x5D0A;


I am getting the following Debugg messages in the hyper terminal.


Ethernet Boot Loader Configuration:

0) IP address: 0.0.0.0
1) Subnet mask: 0.0.0.0
2) Boot delay: 3 seconds
3) DHCP: (Enabled)
4) Reset to factory default configuration
5) Download new image at startup
6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
7) Debug serial port: FFUART
D) Download image now
L) Launch existing flash resident image now


Enter your selection: d
INFO: Trying to initialize the built-in SMSC NIC...
BANKSEL = 3302
MT - 0 = 3332
MT - 1 = 8000
MT - 2 = 8080
MT - 3 = 0
MGMT = d199
REV = 2dba
ERDV = 4
LAN91Cxxx: Chip Id 11 Revision 10
TCR = 3332
TCR = 3332
INFO: SMSC LAN91C111 Ethernet controller initialized.
INFO: MAC address: 0-E-C-80-7B-71

after that it is proceeding to next.Here it self hanging.

Can anybody help me in this regard.

Thanks,
Gouri

Re: LAN91C111 on PXA270 by voidcoder

voidcoder
Tue Nov 28 03:06:50 CST 2006


Make sure your I/O routines (OUT/INPORTx, WRITE/READ_PORT_x or
whatever is used there) are ok as well. For example, try to read
back just written MAC and print it out to see if it is actually
written correctly...


gouri wrote:
> I'm porting Windows CE 5.0 MainStone BSP to a board based on PXA270.
>
> I'm trying to port the Eboot to this board.
>
> The Ethernet Controller is mapped on nCS4 (0x1000_0000).
>
> In developement kit MSC1 register value is 0aCCD1 i have not changed it in
> my board also.
>
> But when I try to apply it the driver in the board I am working now it
> appears to start ok, but it does not communicate well. The driver
> detects the Ethernet Controllet ok on SMCInit() routine, but It appears
> to fail on SCMSendFrame() or SMCGetFrame() routines.
>
> both chips have the same revision?
>
> My board doesn't have an EEPROM and I have wr0te MAC Address by hand in
> LAN91CInit() like
>
> // Gouri
> mac[0] = 0x0080;
> mac[1] = 0x263E;
> mac[2] = 0x5D0A;
>
>
> I am getting the following Debugg messages in the hyper terminal.
>
>
> Ethernet Boot Loader Configuration:
>
> 0) IP address: 0.0.0.0
> 1) Subnet mask: 0.0.0.0
> 2) Boot delay: 3 seconds
> 3) DHCP: (Enabled)
> 4) Reset to factory default configuration
> 5) Download new image at startup
> 6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
> 7) Debug serial port: FFUART
> D) Download image now
> L) Launch existing flash resident image now
>
>
> Enter your selection: d
> INFO: Trying to initialize the built-in SMSC NIC...
> BANKSEL = 3302
> MT - 0 = 3332
> MT - 1 = 8000
> MT - 2 = 8080
> MT - 3 = 0
> MGMT = d199
> REV = 2dba
> ERDV = 4
> LAN91Cxxx: Chip Id 11 Revision 10
> TCR = 3332
> TCR = 3332
> INFO: SMSC LAN91C111 Ethernet controller initialized.
> INFO: MAC address: 0-E-C-80-7B-71
>
> after that it is proceeding to next.Here it self hanging.
>
> Can anybody help me in this regard.
>
> Thanks,
> Gouri

Re: LAN91C111 on PXA270 by gouri

gouri
Tue Nov 28 08:01:02 CST 2006

Hi ,

I have tested as u said but i am not getting the same values.

but same I/O routines i am using in the developement kit there i didn't get
any problem.

I am using following routines can u check once is there any wrong.


void WRITE_PORT_USHORT(UINT16 *pAddr, UINT16 Data)
{
UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);

if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
longword?
{
// Yes - write a longword with data in the upper word.
*(volatile UINT32 *)nAlignedAddr = (READ_PORT_USHORT(pAddr) | (Data
<< 16));
}
else
{
// No - write single word.
*(volatile UINT16 *)pAddr = Data;
}
}


UINT16 READ_PORT_USHORT(UINT16 *pAddr)
{
UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);

if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
longword?
{
// Yes - read a longword and data is in the upper word.
return((UINT16) ((*(volatile unsigned long *)nAlignedAddr) >> 16));
}
else
{
// No - read single word.
return(*(volatile unsigned short *)nAlignedAddr);
}
}

is there any static memory control register settings i to have follow?

I have configure MCS2 register to 0x0000B884 because we r using chip select
4 for ethernet.

Help me in this regard.

Thanks,
Gouri


"voidcoder" wrote:

>
> Make sure your I/O routines (OUT/INPORTx, WRITE/READ_PORT_x or
> whatever is used there) are ok as well. For example, try to read
> back just written MAC and print it out to see if it is actually
> written correctly...
>
>
> gouri wrote:
> > I'm porting Windows CE 5.0 MainStone BSP to a board based on PXA270.
> >
> > I'm trying to port the Eboot to this board.
> >
> > The Ethernet Controller is mapped on nCS4 (0x1000_0000).
> >
> > In developement kit MSC1 register value is 0aCCD1 i have not changed it in
> > my board also.
> >
> > But when I try to apply it the driver in the board I am working now it
> > appears to start ok, but it does not communicate well. The driver
> > detects the Ethernet Controllet ok on SMCInit() routine, but It appears
> > to fail on SCMSendFrame() or SMCGetFrame() routines.
> >
> > both chips have the same revision?
> >
> > My board doesn't have an EEPROM and I have wr0te MAC Address by hand in
> > LAN91CInit() like
> >
> > // Gouri
> > mac[0] = 0x0080;
> > mac[1] = 0x263E;
> > mac[2] = 0x5D0A;
> >
> >
> > I am getting the following Debugg messages in the hyper terminal.
> >
> >
> > Ethernet Boot Loader Configuration:
> >
> > 0) IP address: 0.0.0.0
> > 1) Subnet mask: 0.0.0.0
> > 2) Boot delay: 3 seconds
> > 3) DHCP: (Enabled)
> > 4) Reset to factory default configuration
> > 5) Download new image at startup
> > 6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
> > 7) Debug serial port: FFUART
> > D) Download image now
> > L) Launch existing flash resident image now
> >
> >
> > Enter your selection: d
> > INFO: Trying to initialize the built-in SMSC NIC...
> > BANKSEL = 3302
> > MT - 0 = 3332
> > MT - 1 = 8000
> > MT - 2 = 8080
> > MT - 3 = 0
> > MGMT = d199
> > REV = 2dba
> > ERDV = 4
> > LAN91Cxxx: Chip Id 11 Revision 10
> > TCR = 3332
> > TCR = 3332
> > INFO: SMSC LAN91C111 Ethernet controller initialized.
> > INFO: MAC address: 0-E-C-80-7B-71
> >
> > after that it is proceeding to next.Here it self hanging.
> >
> > Can anybody help me in this regard.
> >
> > Thanks,
> > Gouri
>

Re: LAN91C111 on PXA270 by voidcoder

voidcoder
Wed Nov 29 02:51:01 CST 2006


Is the chip physically connected in the same exactly
way (bus width) as on your other board where it is
working? All LAN91 registers are word aligned so you
don't need any smart READ/WRITE_PORT_USHORT wrappers.
It should be fine with

void WRITE_PORT_USHORT(UINT16 *pAddr, UINT16 Data)
{
*(volatile UINT16 *)pAddr = Data;
}

UINT16 READ_PORT_USHORT(UINT16 *pAddr)
{
return *(volatile UINT16 *)pAddr;
}


gouri wrote:
> Hi ,
>
> I have tested as u said but i am not getting the same values.
>
> but same I/O routines i am using in the developement kit there i didn't get
> any problem.
>
> I am using following routines can u check once is there any wrong.
>
>
> void WRITE_PORT_USHORT(UINT16 *pAddr, UINT16 Data)
> {
> UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);
>
> if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
> longword?
> {
> // Yes - write a longword with data in the upper word.
> *(volatile UINT32 *)nAlignedAddr = (READ_PORT_USHORT(pAddr) | (Data
> << 16));
> }
> else
> {
> // No - write single word.
> *(volatile UINT16 *)pAddr = Data;
> }
> }
>
>
> UINT16 READ_PORT_USHORT(UINT16 *pAddr)
> {
> UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);
>
> if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
> longword?
> {
> // Yes - read a longword and data is in the upper word.
> return((UINT16) ((*(volatile unsigned long *)nAlignedAddr) >> 16));
> }
> else
> {
> // No - read single word.
> return(*(volatile unsigned short *)nAlignedAddr);
> }
> }
>
> is there any static memory control register settings i to have follow?
>
> I have configure MCS2 register to 0x0000B884 because we r using chip select
> 4 for ethernet.
>
> Help me in this regard.
>
> Thanks,
> Gouri
>
>
> "voidcoder" wrote:
>
>> Make sure your I/O routines (OUT/INPORTx, WRITE/READ_PORT_x or
>> whatever is used there) are ok as well. For example, try to read
>> back just written MAC and print it out to see if it is actually
>> written correctly...
>>
>>
>> gouri wrote:
>>> I'm porting Windows CE 5.0 MainStone BSP to a board based on PXA270.
>>>
>>> I'm trying to port the Eboot to this board.
>>>
>>> The Ethernet Controller is mapped on nCS4 (0x1000_0000).
>>>
>>> In developement kit MSC1 register value is 0aCCD1 i have not changed it in
>>> my board also.
>>>
>>> But when I try to apply it the driver in the board I am working now it
>>> appears to start ok, but it does not communicate well. The driver
>>> detects the Ethernet Controllet ok on SMCInit() routine, but It appears
>>> to fail on SCMSendFrame() or SMCGetFrame() routines.
>>>
>>> both chips have the same revision?
>>>
>>> My board doesn't have an EEPROM and I have wr0te MAC Address by hand in
>>> LAN91CInit() like
>>>
>>> // Gouri
>>> mac[0] = 0x0080;
>>> mac[1] = 0x263E;
>>> mac[2] = 0x5D0A;
>>>
>>>
>>> I am getting the following Debugg messages in the hyper terminal.
>>>
>>>
>>> Ethernet Boot Loader Configuration:
>>>
>>> 0) IP address: 0.0.0.0
>>> 1) Subnet mask: 0.0.0.0
>>> 2) Boot delay: 3 seconds
>>> 3) DHCP: (Enabled)
>>> 4) Reset to factory default configuration
>>> 5) Download new image at startup
>>> 6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
>>> 7) Debug serial port: FFUART
>>> D) Download image now
>>> L) Launch existing flash resident image now
>>>
>>>
>>> Enter your selection: d
>>> INFO: Trying to initialize the built-in SMSC NIC...
>>> BANKSEL = 3302
>>> MT - 0 = 3332
>>> MT - 1 = 8000
>>> MT - 2 = 8080
>>> MT - 3 = 0
>>> MGMT = d199
>>> REV = 2dba
>>> ERDV = 4
>>> LAN91Cxxx: Chip Id 11 Revision 10
>>> TCR = 3332
>>> TCR = 3332
>>> INFO: SMSC LAN91C111 Ethernet controller initialized.
>>> INFO: MAC address: 0-E-C-80-7B-71
>>>
>>> after that it is proceeding to next.Here it self hanging.
>>>
>>> Can anybody help me in this regard.
>>>
>>> Thanks,
>>> Gouri

Re: LAN91C111 on PXA270 by voidcoder

voidcoder
Fri Dec 01 02:11:40 CST 2006


Wait a little with DHCP. Set a static IP and add some
debug printing to your Send/GetFrame routines to find
what is going on.


gouri wrote:
> Hi voidcoder,
>
> Yes correct chip is not physically connected due to that only I/o routines
> r not working.
> I have fix that one but now i am getting problem in receive.U can see the
> follwing Debugg messages
>
> Ethernet Boot Loader Configuration:
>
> 0) IP address: 10.100.132.221
> 1) Subnet mask: 255.255.255.0
> 2) Boot delay: 3 seconds
> 3) DHCP: (Enabled)
> 4) Reset to factory default configuration
> 5) Download new image at startup
> 6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
> 7) Debug serial port: FFUART
> D) Download image now
> L) Launch existing flash resident image now
>
>
> Enter your selection: d
> INFO: FlashErase: erasing flash BAA40000 to BAA7FFFF. Please wait...
> .
> INFO: FlashWrite: writing to flash...
> INFO: FlashWrite: verifying the data written to flash...
> INFO: FlashWrite: flash programmed successfully!
> INFO: Trying to initialize the built-in SMSC NIC...
> BANKSEL3 is = 3303
> LAN91Cxxx: Chip Id 9 Revision 2
> BANKSEL1 = 3301
> MAC = 00:0e:0c:80:7b:70
> CTR is = 1230
> BANKSEL0 is = 3300
> MCRPCR is = 800
> BANKSEL0 is = 3300
> TCR is = 8081
> BANKSEL2 is = 3302
> INTR is = 4
> BANKSEL0 is = 3300
> RCR is = 3fa
> INFO: SMSC LAN91C111 Ethernet controller initialized.
> INFO: MAC address: 0-E-C-80-7B-70
> System ready!
> Preparing for download...
> INFO: Using device name: 'MAINSTN31600'
> IP address: 0.0.0.0
> InitDHCP():: Calling ProcessDHCP()
> ProcessDHCP()::DHCP_INIT
> BANKSEL0 is = 3300
> BANKSEL2 is = 3302
> PNRARR is = 100
> PTR is = 4001
> DATA is = f1bf
> bufferSize is = f1bf
> BANKSEL2 is = 3302
> FIFO is = 0
> PNRARR is = 200
> PTR is = 6001
> INTR is = c
> BANKSEL is = 3300
> BANKSEL0 is = 3300
> BANKSEL2 is = 3302
> PNRARR is = 300
> PTR is = 4001
> DATA is = 5858
> bufferSize is = 5858
> BANKSEL2 is = 3302
> FIFO is = 0
> PNRARR is = 8300
> PTR is = 6001
> INTR is = c
> BANKSEL is = 3300
> BANKSEL0 is = 3300
> BANKSEL2 is = 3302
> BANKSEL2 is = 3302
> BANKSEL2 is = 3302
> PNRARR is = 100
> PTR is = 4001
> DATA is = ffff
> bufferSize is = ffff
> BANKSEL2 is = 3302
> FIFO is = 0
> PNRARR is = 200
> PTR is = 6001
> INTR is = c
> BANKSEL is = 3300
> BANKSEL0 is = 3300
> BANKSEL2 is = 3302
> PNRARR is = 300
> PTR is = 4001
> DATA is = 4848
> bufferSize is = 4848
> BANKSEL2 is = 3302
> FIFO is = 0
> PNRARR is = 8300
> PTR is = 6001
> INTR is = c
> BANKSEL is = 3300
>
> I enabled the DHCP server for getting the IP address.After entering into the
> BOOL EbootGetDHCPAddr () function it is trying to get the IP address but it
> is not getting IP packet thats why while loop is going on indefinitely.
>
> Can u help me in this regard.
>
> Thanks,
> Gouri.
>
> "voidcoder" wrote:
>
>> Is the chip physically connected in the same exactly
>> way (bus width) as on your other board where it is
>> working? All LAN91 registers are word aligned so you
>> don't need any smart READ/WRITE_PORT_USHORT wrappers.
>> It should be fine with
>>
>> void WRITE_PORT_USHORT(UINT16 *pAddr, UINT16 Data)
>> {
>> *(volatile UINT16 *)pAddr = Data;
>> }
>>
>> UINT16 READ_PORT_USHORT(UINT16 *pAddr)
>> {
>> return *(volatile UINT16 *)pAddr;
>> }
>>
>>
>> gouri wrote:
>>> Hi ,
>>>
>>> I have tested as u said but i am not getting the same values.
>>>
>>> but same I/O routines i am using in the developement kit there i didn't get
>>> any problem.
>>>
>>> I am using following routines can u check once is there any wrong.
>>>
>>>
>>> void WRITE_PORT_USHORT(UINT16 *pAddr, UINT16 Data)
>>> {
>>> UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);
>>>
>>> if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
>>> longword?
>>> {
>>> // Yes - write a longword with data in the upper word.
>>> *(volatile UINT32 *)nAlignedAddr = (READ_PORT_USHORT(pAddr) | (Data
>>> << 16));
>>> }
>>> else
>>> {
>>> // No - write single word.
>>> *(volatile UINT16 *)pAddr = Data;
>>> }
>>> }
>>>
>>>
>>> UINT16 READ_PORT_USHORT(UINT16 *pAddr)
>>> {
>>> UINT32 nAlignedAddr = ((UINT32)pAddr & ~0x3);
>>>
>>> if ((UINT32)pAddr & 0x2) // Is the address an "odd" word within a
>>> longword?
>>> {
>>> // Yes - read a longword and data is in the upper word.
>>> return((UINT16) ((*(volatile unsigned long *)nAlignedAddr) >> 16));
>>> }
>>> else
>>> {
>>> // No - read single word.
>>> return(*(volatile unsigned short *)nAlignedAddr);
>>> }
>>> }
>>>
>>> is there any static memory control register settings i to have follow?
>>>
>>> I have configure MCS2 register to 0x0000B884 because we r using chip select
>>> 4 for ethernet.
>>>
>>> Help me in this regard.
>>>
>>> Thanks,
>>> Gouri
>>>
>>>
>>> "voidcoder" wrote:
>>>
>>>> Make sure your I/O routines (OUT/INPORTx, WRITE/READ_PORT_x or
>>>> whatever is used there) are ok as well. For example, try to read
>>>> back just written MAC and print it out to see if it is actually
>>>> written correctly...
>>>>
>>>>
>>>> gouri wrote:
>>>>> I'm porting Windows CE 5.0 MainStone BSP to a board based on PXA270.
>>>>>
>>>>> I'm trying to port the Eboot to this board.
>>>>>
>>>>> The Ethernet Controller is mapped on nCS4 (0x1000_0000).
>>>>>
>>>>> In developement kit MSC1 register value is 0aCCD1 i have not changed it in
>>>>> my board also.
>>>>>
>>>>> But when I try to apply it the driver in the board I am working now it
>>>>> appears to start ok, but it does not communicate well. The driver
>>>>> detects the Ethernet Controllet ok on SMCInit() routine, but It appears
>>>>> to fail on SCMSendFrame() or SMCGetFrame() routines.
>>>>>
>>>>> both chips have the same revision?
>>>>>
>>>>> My board doesn't have an EEPROM and I have wr0te MAC Address by hand in
>>>>> LAN91CInit() like
>>>>>
>>>>> // Gouri
>>>>> mac[0] = 0x0080;
>>>>> mac[1] = 0x263E;
>>>>> mac[2] = 0x5D0A;
>>>>>
>>>>>
>>>>> I am getting the following Debugg messages in the hyper terminal.
>>>>>
>>>>>
>>>>> Ethernet Boot Loader Configuration:
>>>>>
>>>>> 0) IP address: 0.0.0.0
>>>>> 1) Subnet mask: 0.0.0.0
>>>>> 2) Boot delay: 3 seconds
>>>>> 3) DHCP: (Enabled)
>>>>> 4) Reset to factory default configuration
>>>>> 5) Download new image at startup
>>>>> 6) Boot device order: SMSC -> PCMCIA0 -> PCMCIA1
>>>>> 7) Debug serial port: FFUART
>>>>> D) Download image now
>>>>> L) Launch existing flash resident image now
>>>>>
>>>>>
>>>>> Enter your selection: d
>>>>> INFO: Trying to initialize the built-in SMSC NIC...
>>>>> BANKSEL = 3302
>>>>> MT - 0 = 3332
>>>>> MT - 1 = 8000
>>>>> MT - 2 = 8080
>>>>> MT - 3 = 0
>>>>> MGMT = d199
>>>>> REV = 2dba
>>>>> ERDV = 4
>>>>> LAN91Cxxx: Chip Id 11 Revision 10
>>>>> TCR = 3332
>>>>> TCR = 3332
>>>>> INFO: SMSC LAN91C111 Ethernet controller initialized.
>>>>> INFO: MAC address: 0-E-C-80-7B-71
>>>>>
>>>>> after that it is proceeding to next.Here it self hanging.
>>>>>
>>>>> Can anybody help me in this regard.
>>>>>
>>>>> Thanks,
>>>>> Gouri