EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC1788 versus LPC2478

Started by JeGy February 26, 2013
Hi,

I have a project running on a LPC2478 with a QVGA LCD, similar to the Olimex 
LPC2478-STK (a subset ). It runs at 72MHz.

The size of my code is approaching the 500k limit, so I have tried to cross 
load the code from a serial flash to external SD-RAM and execute the code 
from the external SD-RAM.
In this way my code can exceed the 500k limit.

Unfortunately, the execution speed is slower when running from the SD-RAM. 
It runs app. tree times slower.
The speed reduction comes probably because the LCD uses the SD-RAM, and 
therefore occupies the bus, resulting in reduced access speed for normal 
read/write operations.

Does anybody know if the LPC1788 have similar speed reduction on executing 
code from the external bus?
Or has NXP solved this infirmity in the LPC1788?

Thanks in advance!

Regards Jens 


On 02/26/2013 03:44 PM, JeGy wrote:
> Hi, > > I have a project running on a LPC2478 with a QVGA LCD, similar to the Olimex > LPC2478-STK (a subset ). It runs at 72MHz. > > The size of my code is approaching the 500k limit, so I have tried to cross > load the code from a serial flash to external SD-RAM and execute the code > from the external SD-RAM. > In this way my code can exceed the 500k limit.
Are you using Thumb ?
> Unfortunately, the execution speed is slower when running from the SD-RAM. > It runs app. tree times slower. > The speed reduction comes probably because the LCD uses the SD-RAM, and > therefore occupies the bus, resulting in reduced access speed for normal > read/write operations. > > Does anybody know if the LPC1788 have similar speed reduction on executing > code from the external bus? > Or has NXP solved this infirmity in the LPC1788? >
How can they "solve" this ? If both LCD and your program need access to external SDRAM, there's no way they can make it fast. How about only moving part of the code to SDRAM, and keep all timing critical stuff in Flash ?
Arlet Ottens <usenet+5@c-scape.nl> writes:

> On 02/26/2013 03:44 PM, JeGy wrote: >> Hi, >> >> I have a project running on a LPC2478 with a QVGA LCD, similar to the Olimex >> LPC2478-STK (a subset ). It runs at 72MHz. >> >> The size of my code is approaching the 500k limit, so I have tried to cross >> load the code from a serial flash to external SD-RAM and execute the code >> from the external SD-RAM. >> In this way my code can exceed the 500k limit. > > Are you using Thumb ? > >> Unfortunately, the execution speed is slower when running from the SD-RAM. >> It runs app. tree times slower. >> The speed reduction comes probably because the LCD uses the SD-RAM, and >> therefore occupies the bus, resulting in reduced access speed for normal >> read/write operations. >> >> Does anybody know if the LPC1788 have similar speed reduction on executing >> code from the external bus? >> Or has NXP solved this infirmity in the LPC1788? >> > > How can they "solve" this ? If both LCD and your program need access > to external SDRAM, there's no way they can make it fast.
Well that depends on the details doesn't it? QVGA should not have *that* high a bandwidth, I am running "full" VGA on a LPC2478, so there is at least 3/4 left over on his! :) I think the reason is more likely that SDRAM code execution is simply slower, even with no bandwidth consumed by the LCD.
> How about only moving part of the code to SDRAM, and keep all timing > critical stuff in Flash ?
Yes, good idea, that should be a good solution. -- John Devereux
In article <512ccf71$0$6848$e4fe514c@news2.news.xs4all.nl>, usenet+5@c-
scape.nl says...
> > On 02/26/2013 03:44 PM, JeGy wrote: > > Hi, > > > > I have a project running on a LPC2478 with a QVGA LCD, similar to the Olimex > > LPC2478-STK (a subset ). It runs at 72MHz. > > > > The size of my code is approaching the 500k limit, so I have tried to cross > > load the code from a serial flash to external SD-RAM and execute the code > > from the external SD-RAM. > > In this way my code can exceed the 500k limit. > > Are you using Thumb ? > > > Unfortunately, the execution speed is slower when running from the SD-RAM. > > It runs app. tree times slower. > > The speed reduction comes probably because the LCD uses the SD-RAM, and > > therefore occupies the bus, resulting in reduced access speed for normal > > read/write operations. > > > > Does anybody know if the LPC1788 have similar speed reduction on executing > > code from the external bus? > > Or has NXP solved this infirmity in the LPC1788? > > > > How can they "solve" this ? If both LCD and your program need access to > external SDRAM, there's no way they can make it fast. > > How about only moving part of the code to SDRAM, and keep all timing > critical stuff in Flash ?
On the STM32, accesses to external memory go through the external bus a word at a time. Internal Flash uses wider-bus accesses and runs more quickly. Is it possible that the LPC chips do something similar? The contention with other devices using DMA on the same bus is going to have the same penalty on all chips, unless you have separate buses for different memory segments. When you set up your external SDRAM, you may also have to specify wait states depending on the speed of the SDRAM. It's been a year or so since I worked with LCD and camera code, so the details are a bit fuzzy in my mind. Mark Borgerson

The 2024 Embedded Online Conference