EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC24xx Ethernet (errata, reliability, compatibility to LPC23xx)

Started by Mark Butcher June 20, 2009
Hi All

I have the following Ethernet problem with the LPC2478 (on Olimex LPC-2478-STK):
- Note 1: the Ethernet driver is the same as the one used for the LPC23XX (RMII mode)
- Note 2: the same test works without any problems on the LPC2378 on Keil MCB2300 and Olimex LPC2378-STK (tested at 10M and 100M)
- Note 3: the test can be seen at http://demo.uTasker.com (not on the LPC24XX at the moment but very similar web pages).
- Note 4: the test consists of refreshing web pages (eg. the first with a couple of images)
- THE PROBLEM is that when the pages are refreshed it may work correctly 3 or 4 times but then every now and again it will seemingly miss some Ethernet rx frames and the images are then delayed due to the need to repeat.

What I have seen is that, in fact, it looks like every now and again 2 Ethernet rx frames are lost by the LPC2478 (2 fast ones after another!). This is identical at 10M and 100M.
So my questions are:
- I don't see any errata to the LPC24XX MAC and all other drivers that I have found are identical for the LPC23XX and the LPC24XX. Is there any known reason why the behavior would be different - i.e basically working but not reliable?

- I did play around with the number of rx and tx buffers (the rx buffers are limited in the first LPC23XX to 5 as in the corresponding errata). However if I tried to increase the rx buffers to 7 it wouldn't work at all [7 rx and 3 tx would be my ideal setting]. Again this questions the state of errata for the LPC24xx.(?)

Any one with experience of the Ethernet performance on the LPC24X with some ideas of what may be going on?

Thanks in advance.

regards

Mark
www.uTasker.com

An Engineer's Guide to the LPC2100 Series

Mark,

I don't know your code (although I suppose the Ethernet part is
interrupt driven) and I've not run any other Ethernet code on the
LPC2478 yet. But as I learned much about the LPC2478 beast meanwhile I
suppose you should try to stop frame refresh and retest your original
LPC2378 code again.

If the Ethernet code runs fine then (this is what I expect) this would
validate my general assumptions about the DMA engine of the LPC2478
doing the frame refresh:
It looks like DMA sometimes blocks all other things (including
interrupts) for a serious amount of time. I've some other indications
pointing to this behavior: Running an interrupt driven serial port with
460,800 baud seems to cause problems and I remember a posting in this
group (although I could not find it again) about testing the interrupt
latency on a LPC2478 by running a fast timer loop with about 10 us
giving very inconsistent response times when the DMA is on.

So if your code works without frame refresh DMA enabled, you possibly
can play around with the AHBCFG1 register to get your code working again
when DMA is enabled. On the other hand you have to mention that doing
the frame refresh uses a serious amount a processing power (depending on
the pixel clock speed of your LCD) which is not available for the main
task anymore then.

Please keep us informed.

Best regards
Herbert

Mark Butcher schrieb:
> Hi All
>
> I have the following Ethernet problem with the LPC2478 (on Olimex LPC-2478-STK):
> - Note 1: the Ethernet driver is the same as the one used for the LPC23XX (RMII mode)
> - Note 2: the same test works without any problems on the LPC2378 on Keil MCB2300 and Olimex LPC2378-STK (tested at 10M and 100M)
> - Note 3: the test can be seen at http://demo.uTasker.com (not on the LPC24XX at the moment but very similar web pages).
> - Note 4: the test consists of refreshing web pages (eg. the first with a couple of images)
> - THE PROBLEM is that when the pages are refreshed it may work correctly 3 or 4 times but then every now and again it will seemingly miss some Ethernet rx frames and the images are then delayed due to the need to repeat.
>
> What I have seen is that, in fact, it looks like every now and again 2 Ethernet rx frames are lost by the LPC2478 (2 fast ones after another!). This is identical at 10M and 100M.
> So my questions are:
> - I don't see any errata to the LPC24XX MAC and all other drivers that I have found are identical for the LPC23XX and the LPC24XX. Is there any known reason why the behavior would be different - i.e basically working but not reliable?
>
> - I did play around with the number of rx and tx buffers (the rx buffers are limited in the first LPC23XX to 5 as in the corresponding errata). However if I tried to increase the rx buffers to 7 it wouldn't work at all [7 rx and 3 tx would be my ideal setting]. Again this questions the state of errata for the LPC24xx.(?)
>
> Any one with experience of the Ethernet performance on the LPC24X with some ideas of what may be going on?
>
>

--

demmel products
Radnitzkygasse 43
A-1100 Vienna / Austria / Europe
Voice: +43-1-6894700-0
Fax: +43-1-6894700-40
Email: d...@demmel.com
WWW: http://www.demmel.com


Mark Butcher wrote:
> Hi All
>
> I have the following Ethernet problem with the LPC2478 (on Olimex LPC-2478-STK):
> - Note 1: the Ethernet driver is the same as the one used for the LPC23XX (RMII mode)
> - Note 2: the same test works without any problems on the LPC2378 on Keil MCB2300 and Olimex LPC2378-STK (tested at 10M and 100M)
> - Note 3: the test can be seen at http://demo.uTasker.com (not on the LPC24XX at the moment but very similar web pages).
> - Note 4: the test consists of refreshing web pages (eg. the first with a couple of images)
> - THE PROBLEM is that when the pages are refreshed it may work correctly 3 or 4 times but then every now and again it will seemingly miss some Ethernet rx frames and the images are then delayed due to the need to repeat.
>
> What I have seen is that, in fact, it looks like every now and again 2 Ethernet rx frames are lost by the LPC2478 (2 fast ones after another!). This is identical at 10M and 100M.
>

I had an Olimex board that had exactly the same problem, I got random
CRC errors. Didn't happen on any Keil bord or EA board; I arranged a
swap with Olimex and the board that they returned was OK, no problem.
Didn't hear about the non-functional board again.

Rgds,

-- Paul.

Hi Mark,

There is an hardware error on the Olimex 2478 startkit concerning Ethernet.
If you will not find by yourself, I will search for details on Monday.
I don't use Ethernet, so I haven't noted.

Regards
Vladimir
----- Original Message -----
From: Mark Butcher
To: l...
Sent: Sunday, June 21, 2009 1:11 AM
Subject: [lpc2000] LPC24xx Ethernet (errata, reliability, compatibility to LPC23xx)

Hi All

I have the following Ethernet problem with the LPC2478 (on Olimex LPC-2478-STK):
- Note 1: the Ethernet driver is the same as the one used for the LPC23XX (RMII mode)
- Note 2: the same test works without any problems on the LPC2378 on Keil MCB2300 and Olimex LPC2378-STK (tested at 10M and 100M)
- Note 3: the test can be seen at http://demo.uTasker.com (not on the LPC24XX at the moment but very similar web pages).
- Note 4: the test consists of refreshing web pages (eg. the first with a couple of images)
- THE PROBLEM is that when the pages are refreshed it may work correctly 3 or 4 times but then every now and again it will seemingly miss some Ethernet rx frames and the images are then delayed due to the need to repeat.

What I have seen is that, in fact, it looks like every now and again 2 Ethernet rx frames are lost by the LPC2478 (2 fast ones after another!). This is identical at 10M and 100M.

So my questions are:
- I don't see any errata to the LPC24XX MAC and all other drivers that I have found are identical for the LPC23XX and the LPC24XX. Is there any known reason why the behavior would be different - i.e basically working but not reliable?

- I did play around with the number of rx and tx buffers (the rx buffers are limited in the first LPC23XX to 5 as in the corresponding errata). However if I tried to increase the rx buffers to 7 it wouldn't work at all [7 rx and 3 tx would be my ideal setting]. Again this questions the state of errata for the LPC24xx.(?)

Any one with experience of the Ethernet performance on the LPC24X with some ideas of what may be going on?

Thanks in advance.

regards

Mark

www.uTasker.com



Thanks Herbert

> I don't know your code (although I suppose the Ethernet part is
> interrupt driven)
Yes, interrupt driven.

> It looks like DMA sometimes blocks all other things (including
> interrupts) for a serious amount of time.
I did some statistical tests.
1) 200 web refreshes with the LCD controller operating - 84.0% of refreshes were good (16.0% has a pause somewhere)

2) 200 web refreshes with disabled LCD controller not powered up and therefore also neither configured nor operating). Same result 84,5% were good (15.5% had a pause)

Therefore it doesn't seem to be a problem due to the LCD operation resp. DMA.

I noted that sometimes 20 to 40 refreshes after another were fine and then there would be 5 pauses in the next 10 attempts. The errors thus seem to come in groups, but over the complete tests average out to very similar numbers.

Regards

Mark

PS. I put the board online at http://demo.uTasker.com
On the TFT page the present image on the LCD is displayed and new images can be posted to the board.

--- In l..., Paul Curtis wrote:

> I had an Olimex board that had exactly the same problem, I got random
> CRC errors.

Hi Paul

Thanks. Yes, this is something that I am not excluding yet but will need a second board to prove anything.

Regards

Mark

PS. I put the board online at http://demo.uTasker.com
On the TFT page the present image on the LCD is displayed and new images can be posted to the board.

--- In l..., "Vladimir Ljaschko" wrote:

> There is an hardware error on the Olimex 2478 startkit concerning Ethernet.

Thanks Vladimir

I will look into this. If I don't report back in the mean time (probably because of no progress) I would be very grateful for specific details.

Regards

Mark
PS. I put the board online at http://demo.uTasker.com
On the TFT page the present image on the LCD is displayed and new images can be posted to the board.

Hi Mark,

I had occasion to look for this "feature".
I've found this information on the one from Russian-language forum:

Во всех китах Olimex и Starterkit для чипов LPC23xx и LPC24xx ошибка в подключении PHY KS8721BL в RMII Mode. К контроллеру подключен сигнал CRS (Carrier Sense), а не RXDV(CRS_DV - Carrier Sense/Data Valid). Результат плачевен - все фреймы принимаются с якобы битой CRC. Кстати, там по хорошему надо-бы этот сигнальчик к земле подтянуть, а то со встроенной в LPC PU подтяжкой при Reset потенциально могут быть проблемы.

I think I need to translate it to English ;)

"In all kits of Olimex and Starterkit [it is Russian manufacture of starterkits] for LPC23XX and LPC24XX there is an error in connection of PHY LS8721BL in RMII mode. Signal CRS(Carrier Sense) is connected to the controller instead RXDV (CRS_DV - Carrier Sense/Data Valid). The result is deplorable - all frames are received with CRC as if it wrong. By the way it would be nice to pull this signal down, because it could be problems with integrated into LPC PU when Reset is active."

Best regards
Vladimir

----- Original Message -----
From: Mark Butcher
To: l...
Sent: Sunday, June 21, 2009 4:17 PM
Subject: [lpc2000] Re: LPC24xx Ethernet (errata, reliability, compatibility to LPC23xx)

--- In l..., "Vladimir Ljaschko" wrote:

> There is an hardware error on the Olimex 2478 startkit concerning Ethernet.

Thanks Vladimir

I will look into this. If I don't report back in the mean time (probably because of no progress) I would be very grateful for specific details.

Regards

Mark

PS. I put the board online at http://demo.uTasker.com
On the TFT page the present image on the LCD is displayed and new images can be posted to the board.





Vladimir Ljaschko wrote:
> Hi Mark,
>
> I had occasion to look for this "feature".
> I've found this information on the one from Russian-language forum:
>
> Во всех китах Olimex и Starterkit для чипов LPC23xx и LPC24xx ошибка в подключении PHY KS8721BL в RMII Mode. К контроллеру подключен сигнал CRS (Carrier Sense), а не RXDV(CRS_DV - Carrier Sense/Data Valid). Результат плачевен - все фреймы принимаются с якобы битой CRC. Кстати, там по хорошему надо-бы этот сигнальчик к земле подтянуть, а то со встроенной в LPC PU подтяжкой при Reset потенциально могут быть проблемы.
>
> I think I need to translate it to English ;)
>
> "In all kits of Olimex and Starterkit [it is Russian manufacture of starterkits] for LPC23XX and LPC24XX there is an error in connection of PHY LS8721BL in RMII mode. Signal CRS(Carrier Sense) is connected to the controller instead RXDV (CRS_DV - Carrier Sense/Data Valid). The result is deplorable - all frames are received with CRC as if it wrong. By the way it would be nice to pull this signal down, because it could be problems with integrated into LPC PU when Reset is active."
>

Hi Vladimir,

Ok, this is exactly what I was seeing. Just looked back at my mail to
Olimex and every frame was a CRC error, so I assume this is not what
Mark is seeing. Olimex shipped a new board and that one was OK.

-- Paul.

--- In l..., Paul Curtis wrote:
> so I assume this is not what

Thanks Paul / Vladimir

It sounds as though this is not my problem since the CRC error would stop any correct operation. It would however be interesting to verify on a different board sometime.

I have made an announcement about imminent release of the project: http://www.utasker.com/forum/index.php?topica8.0 where also some background is explained. Since it is 'usable' it will then give others the opportunity to test it to see whether there are HW dependencies or not. Maybe a patch can be identified...

regards

Mark


The 2024 Embedded Online Conference