Trying to get the uIP IAR port going

baxsie wrote on Sunday, November 13, 2005:

I am trying to get the IAR uIP port going.

First I verified that my AT91SAM7X-EK was working by doing the "getting started" exercise for it at The "LED Swing" application seemed to run fine (blinky, blinky).

I then tried the "rtosdemo.eww" project in "uIP_Demo_IAR_ARM7" directory. The build seems to go fine (0 warnings 0 errors), download is OK, but there are no LED blinks as I expected.

If I click on the "halt" button, it always stops here on the line "while(!(pPMC->PMC_SR & AT91C_PMC_MCKRDY));" in "Cstartup_SAM7.c"

Here is a screenshot:

Is there some configuration or jumper or something that I need to do to the AT91SAM7X-EK to get the demo to work?

Thanks in advance for your help.

baxsie wrote on Sunday, November 13, 2005:

Update: I manually skipped over the line it was stuck on and now the 3 LEDs are blinking at different rates as I would expect. The 4th LED is toggling every 3 seconds as expected.

However, I do not get any "link" lights on the (known good port of a know good) ethernet switch that the AT91SAM7X-EK is plugged into (I did double-check the cables).  The "link/act (green) on the AT91SAM7X-EK is on solid, the "speed" and "full duplex" are off.

Any ideas?

baxsie wrote on Sunday, November 13, 2005:

Update: This gets weirder.

At some point I reached over and clicked "reset" button on the  AT91SAM7X-EK. After a short pause the LEDs started blinking (without manually skipping the line as above). Still no ethernet lights.

Then I mashed the reset button for like a second. Now the LEDs were blinking, AND the link, speed, and duplex lights came on. The ethernet switch then saw the AT91SAM7X-EK. Woah.

I had to set the IP address (look for UIP_IPADDR0, UIP_NETMASK0, and UIP_DRIPADDR0 in uipopt.h) for my LAN, then I could at least sometines load the page.

The pages did seem to load deathly slow when they did load. Pings seem to be returned about 50% of the time.

I wonder if I have a clock setting or something else configured wrong somewhere?

Any ideas?

baxsie wrote on Sunday, November 13, 2005:

OK. I think I figured it out. I had the USB cable plugged into a powered port, which was plugged into the PC. This USB connection was powering the AT91SAM7X-EK. When I moved the cable to the wall-bug that was suplpied with the AT91SAM7X-EK, and reset the AT91SAM7X-EK, things suddenly looked a lot better.

Maybe the PC was putting traffic on the USB that was confusing FreeRTOS–or using a lot of resources.

In any case, it looks like it is all good now:

Tests of embedding an image:

<IMG SRC=‘’>

rtel wrote on Sunday, November 13, 2005:

Excellent - useful information regarding the USB connection possibly causing a problem.

You will notice that the page showing the RTOS stats will load much more quickly then any of the others (eg the page showing the file stats).  This is because the cgi script is set to send all the data in one frame.  The other pages are set to send a single line at a time.  This is relevant to your previous question regarding the memory usage.  If the uIP buffers were much smaller then you would not be able to send all the RTOS stats in a single packet, so this page would also be slower.