EasyWeb on LPC1769 + EA Base Board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

EasyWeb on LPC1769 + EA Base Board

2,505件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ypsilon on Wed May 08 07:14:39 MST 2013
Hi everyone. I'm trying to execute the EasyWeb example on my LPC1769. I'm using the EA Base Board, so I'm using directly the example that comes with the rest of the Base Board examples. The example seems to run fine on the board, as it shows the IP address on the OLED screen, but the problem is that my computer doesn't seem to recognize the device plugged in through the ethernet card, so I can't access the webpage.

Does the example need some further configuration? IP configuring maybe? Any help would be very much appreciated.

Thanks!
0 件の賞賛
返信
6 返答(返信)

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by magicdim on Wed Feb 19 10:45:25 MST 2014
Hi Ypsilon,

Did you make Easyweb working with EA Basebard?

I think I found the solution, so there are several mistakes in EA code....

Fisrt of all, configure your web browser with NO PROXY, no firewall, no software for web protection, and deactivate all network boards of your PC (wifi...) other than the ethernet connected to the EA baseboard (to make sure that none of these parameters will  have any influence)
Configure your Ethenet board as follow (in "Local Network Connections" ==> Properties ==> TCP/IPv4):

Tick "Use the following IP adress":

IP adress: 192.168.0.20
Subnet mask: 255.255.255.0

AND THAT'S ALL!
Click OK to all opened dialog box for the parameters to apply.


Then correct the following files:

tcpip.c: line 54

 
 
.
.
...
Init8900();
*/
  [s]LPC_GPIO1->FIODIR = 1 << 25;               // P1.25 defined as Output (LED)[/s]

[color=#0c0]LPC_GPIO0->FIODIR = 1 << 22;               // P0.22 defined as Output (LED)
[/color]
  Start_SysTick10ms();// Start SysTick timer running (10ms ticks)
  
  Init_EthMAC();[
....
.
.


in ew_systick.c: line45

.
.
...
// After 100 ticks (100 x 10ms = 1sec)
if (TimeTick >= 100) {
  TimeTick = 0;// Reset counter
  [s]LPC_GPIO1->FIOPIN ^= 1 << 25;// Toggle user LED[/s]
                  [color=#0c0]LPC_GPIO0->FIOPIN ^= 1 << 22;// Toggle user LED
[/color]
}
// After 20 ticks (20 x 10ms = 1/5sec)
...
.
.


and the most important, in ethmac.c lines 230 to 260:

.
.
...
   case LAN8720_ID:

[color=#0c0] //   value = ReadFromPHY (PHY_REG_SCSR);/* PHY Extended Status Register  */
[/color]    // Now configure for full/half duplex mode
[color=#0c0] //   if (value & (1<<4)) {/* bit 4: 1 = Full Duplex, 0 = Half Duplex  */
[/color]                                  
[color=#0c0]                  if ( value & 0x0004 ){
[/color]      // We are in full duplex is enabled mode
    LPC_EMAC->MAC2    |= MAC2_FULL_DUP;
    LPC_EMAC->Command |= CR_FULL_DUP;
    LPC_EMAC->IPGT     = IPGT_FULL_DUP;
    }else {
         // Otherwise we are in half duplex mode
      LPC_EMAC->IPGT = IPGT_HALF_DUP;
    }

    // Now configure 100MBit or 10MBit mode
[color=#9c0] //   if (value & (1<<3)) {/* bit 3: 1 = 100Mbps, 0 = 10Mbps  */
[/color]                                 [color=#0c0]if ( value & 0x0002 ){
   // 10MBit mode
      LPC_EMAC->SUPP = 0;
    }else {
      // 100MBit mode
      LPC_EMAC->SUPP = SUPP_SPEED;
    }
[/color] 

    break;

  }
...
.
.


After having compiled the program, plug a USB cable to supply the power of the Baseboard, plug another one to the LPC1769 board debug port...DON'T connect the Ethernet cable yet! (in most of cases I issued more troubles in dowloading the prgram on the chip when it was connected...)
Click the Debug icon to download the program to the chip, then run Debug ==> you shoul see the LED2 of the LPC1769 blinking (about 5s ON, 5s OFF)
Then plug the Ethernet cable to the Baseboard ==> you should see the two LEDS on the left of LED2 lighting, the right one is steady, and the left one blinking fast
[color=#0c0]Then open your web browser and type the adress in tcpip.h (default 192.168.0.200) ==> YOU SHOULD SEE THE WEBPAGE APPEARING!!!  
[/color]


I didn't have enough time to find the reason for which reading other registers than PHY_REG_BMSR doesn't work, but this is what is made in the program you can find at:
C:\Program Files\...\lpcxpresso\Examples\NXP\LPC1000\LPC17xx\LPCXpresso176x_cmsis2.zip\LPCX176x_cmsis2_EasyWeb

So in case you still have problem, you can also try this program, it will display some information in the Debug Console instead of on the Oled screen!

Hope this will help.
0 件の賞賛
返信

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ypsilon on Thu Jun 13 13:01:18 MST 2013

Quote: R2D2
I'm not familiar with this EA Base Board and their samples. RDB Easy-Web sample from LPCXpresso is a working example. There you can compare your Init_EthMAC() function. Of course this init has to be successful (with your PHY = LAN8720).
So it's a good idea to debug there.



Thanks for the answer, R2D2. I'll have a look at that sample.
0 件の賞賛
返信

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Jun 13 12:44:50 MST 2013

Quote: ypsilon
I'm a beginner and really don't know what may be happening. Any help would be very much appreciated.



I'm not familiar with this EA Base Board and their samples. RDB Easy-Web sample from LPCXpresso is a working example. There you can compare your Init_EthMAC() function. Of course this init has to be successful (with your PHY = LAN8720).
So it's a good idea to debug there.
0 件の賞賛
返信

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ypsilon on Thu Jun 13 12:34:49 MST 2013
I found this post:

http://mbed.org/forum/mbed/topic/2220/


Quote:
However, the EasyWebCR does NOT work, and as stated earlier, it hangs the system during the TCPLowLevelInit.

This program example is not strictly needed, but I would like to know the reason for it's failure to run.

Any ideas?

0 件の賞賛
返信

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ypsilon on Thu Jun 13 11:26:03 MST 2013
So, I'm still struggling to get this thing working. After trying without success to connect the board directly to my computer, I have connected the EA Base Board to my router, and the oled screen shows the board's IP. My default gateway is 192.168.1.1 and the mask is 255.255.255.0, so I've setted the board's IP to 192.168.1.237 (default was 192.168.5.237).

From the router statistics, it seems that the packets are being sent to the board, but I get no answer from the board. Also, the two leds in the lpc1769 close to the connector are blinking at steady intervals (3s on, 1s off)

I'm a beginner and really don't know what may be happening. Any help would be very much appreciated. Thanks!

Edit: I was debugging the code. I don't know why, but inside the TCPLowLevelInit() function, and trying to step into Init_EthMAC(), I loose control of the debugger as if I had selected just to resume execution. And if I set a breakpoint inside Init_EthMAC(), it is ignored.
0 件の賞賛
返信

1,678件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed May 08 07:38:54 MST 2013
See: http://knowledgebase.nxp.com/showthread.php?t=4313
0 件の賞賛
返信