Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Rowley LPC2368 on MCB2360 demo problem

Posted by DeeAitch on February 24, 2009
Dear FreeRTOS users

I got the demo, mentioned in the subject, to work but I experience a strange problem....

When I have started the debugging process as described on the demo web page, it should be possible to enter the web server page to view the contents. But I cannot get the etnernet connection to work. What happens is that the LINK LED on the development board blinks now and then and the PC shows "100Mbit connection established" for a second. Then the connection is lost again. This repeats over and over again.

Now. If I halt the debugger for a few seconds and then continue the dugging, the LINK LED stays litten and I can connect to the web server via IE.

So, it is only possible to establish ethernet connection if I first start the debugging, then pause it, then continue it again.

After a closer look, I see that the problem starts when the vTaskStartScheduler() is called. If I pause the debugger for a short while, then the connection works.

What is the reason, and possible solution, for this problem?

/Dee

RE: Rowley LPC2368 on MCB2360 demo problem

Posted by Dave on February 24, 2009
The hardware you are using is not quite the same as used by the standard demo. Is the PHY used on the MCB2360 the same as the one used on the MCB2368?

RE: Rowley LPC2368 on MCB2360 demo problem

Posted by Dave on February 24, 2009
Also the code contains some delays used to wait for the ethernet link to be established. Maybe the delays need to be longer on your hardware or network. Search for vTaskDelay in the ethernet source code and increase the times a bit.

RE: Rowley LPC2368 on MCB2360 demo problem

Posted by Grigore-Mihai Dobra on February 24, 2009
Don't know anything about your board, but the "This repeats over and over again" phrase sounds like a reset from some reason. Is your debugger stopping some timers/watchdogs/etc?

RE: Rowley LPC2368 on MCB2360 demo problem

Posted by DeeAitch on February 24, 2009
Hi davedoors.

Your idéa is correct!
I had a look in emac.c and notice the hardware init function. Inside I changed the delay time in the following part:



/* Wait for hardware reset to end. */
for (tout = 0; tout < 100; tout++) {
vTaskDelay( 1000 );
regv = read_PHY (PHY_REG_BMCR);
if (!(regv & 0x8000)) {
/* Reset complete */
break;
}
}

I changed vTaskDelay( 1 ); to vTaskDelay( 1000 );

Now it works!

Thanks a bunch.

/Dee

RE: Rowley LPC2368 on MCB2360 demo problem

Posted by DeeAitch on February 24, 2009
Hello again....

I would like to add that this part is perhaps more interesting

/* Check the link status. */
if( xReturn == pdPASS )
{
xReturn = pdFAIL;
for (tout = 0; tout < 10; tout++) {
vTaskDelay( 1000 );
regv = read_PHY (PHY_REG_STS);
if (regv & 0x0001) {
/* Link is on. */
xReturn = pdPASS;
break;
}
}
}

I changed vTaskDelay( 100 ); to vTaskDelay( 1000 );

This solution works also. =)

/Dee


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists