Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner