Forums

Replacing LPC2478 with LPC1788

Started by Jens Gydesen December 12, 2014
Hi,

I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run 
perfect for years.
The SDRAM is 2x  Micron MT48LC16M4A2.

In order to modernize this PCB, the cpu is replaced with the compatible 
LPC1788.

I have problems with the SDRAM, it fails. The program crashes due to 
read/write errors and the LCD shows distorted displays.

Does anyone here have expirencies with similar problems ?

Do you have a code snip for initializing the SD-controller and  SDRAM, so I 
can compare to my own?

Thanks in advance
Regards

Jens



Op Fri, 12 Dec 2014 08:32:20 +0100 schreef Jens Gydesen <jegy@get2net.dk>:
> I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has > run perfect for years. > The SDRAM is 2x Micron MT48LC16M4A2. > > In order to modernize this PCB, the cpu is replaced with the compatible > LPC1788. > > I have problems with the SDRAM, it fails. The program crashes due to > read/write errors and the LCD shows distorted displays.
Are you running the CPU and EMC at the same frequency as with the LPC2478? And is the trace length the same between the two boards? It sounds like your EMC clock signal is unstable or skewed. Try a lower frequency first, then go up and tweak the settings (particularly EMCDELAY to compensate skewing at high frequencies).
> Does anyone here have expirencies with similar problems ?
Yes. For a customer who wanted maximum performance I wrote an SDRAM test function that writes&compares RNG values in display memory at different settings and then prints out the number of verify errors per run. Also we used a heat gun because errors go up with temperature.
> Do you have a code snip for initializing the SD-controller and SDRAM, > so I can compare to my own?
None that I can give you, sorry. -- (Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
On Friday, December 12, 2014 10:00:48 AM UTC+1, Boudewijn Dijkstra wrote:
> Op Fri, 12 Dec 2014 08:32:20 +0100 schreef Jens Gydesen <jegy@get2net.dk>: > > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has > > run perfect for years. > > The SDRAM is 2x Micron MT48LC16M4A2. > > > > In order to modernize this PCB, the cpu is replaced with the compatible > > LPC1788. > > > > I have problems with the SDRAM, it fails. The program crashes due to > > read/write errors and the LCD shows distorted displays. > > Are you running the CPU and EMC at the same frequency as with the > LPC2478? And is the trace length the same between the two boards? It > sounds like your EMC clock signal is unstable or skewed. Try a lower > frequency first, then go up and tweak the settings (particularly EMCDELAY > to compensate skewing at high frequencies). > > > Does anyone here have expirencies with similar problems ? > > Yes. For a customer who wanted maximum performance I wrote an SDRAM test > function that writes&compares RNG values in display memory at different > settings and then prints out the number of verify errors per run. Also we > used a heat gun because errors go up with temperature. > > > Do you have a code snip for initializing the SD-controller and SDRAM, > > so I can compare to my own? > > None that I can give you, sorry. > > > > > -- > (Remove the obvious prefix to reply privately.) > Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Hi, I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run perfect for years. The SDRAM is 2x Micron MT48LC16M4A2. In order to modernize this PCB, the cpu is replaced with the compatible LPC1788. I have problems with the SDRAM, it fails. The program crashes due to read/write errors and the LCD shows distorted displays. Does anyone here have expirencies with similar problems ? Do you have a code snip for initializing the SD-controller and SDRAM, so I can compare to my own? Thanks in advance Regards Jens
On Friday, December 12, 2014 10:00:48 AM UTC+1, Boudewijn Dijkstra wrote:
> Op Fri, 12 Dec 2014 08:32:20 +0100 schreef Jens Gydesen <jegy@get2net.dk>: > > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has > > run perfect for years. > > The SDRAM is 2x Micron MT48LC16M4A2. > > > > In order to modernize this PCB, the cpu is replaced with the compatible > > LPC1788. > > > > I have problems with the SDRAM, it fails. The program crashes due to > > read/write errors and the LCD shows distorted displays. > > Are you running the CPU and EMC at the same frequency as with the > LPC2478? And is the trace length the same between the two boards? It > sounds like your EMC clock signal is unstable or skewed. Try a lower > frequency first, then go up and tweak the settings (particularly EMCDELAY > to compensate skewing at high frequencies). > > > Does anyone here have expirencies with similar problems ? > > Yes. For a customer who wanted maximum performance I wrote an SDRAM test > function that writes&compares RNG values in display memory at different > settings and then prints out the number of verify errors per run. Also we > used a heat gun because errors go up with temperature. > > > Do you have a code snip for initializing the SD-controller and SDRAM, > > so I can compare to my own? > > None that I can give you, sorry. > > > > > -- > (Remove the obvious prefix to reply privately.) > Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Hi, Thanks for your answer! Sorry for the post of the original The PCB's are the same, just the cpu is replaced. I have tried to run the lpc1788 PBC at lower frequency, this makes no differnce. Further i have tried to vary the frequency on the LPC2478 PCB, and this works, nomatter what i do Regards Jens
Op Fri, 12 Dec 2014 12:58:56 +0100 schreef JeGy <gydesen.jens@gmail.com>:
> On Friday, December 12, 2014 10:00:48 AM UTC+1, Boudewijn Dijkstra wrote: >> Op Fri, 12 Dec 2014 08:32:20 +0100 schreef Jens Gydesen >> <jegy@get2net.dk>: >> > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has >> > run perfect for years. >> > The SDRAM is 2x Micron MT48LC16M4A2. >> > >> > In order to modernize this PCB, the cpu is replaced with the >> compatible >> > LPC1788. >> > >> > I have problems with the SDRAM, it fails. The program crashes due to >> > read/write errors and the LCD shows distorted displays. >> >> Are you running the CPU and EMC at the same frequency as with the >> LPC2478? And is the trace length the same between the two boards? It >> sounds like your EMC clock signal is unstable or skewed. Try a lower >> frequency first, then go up and tweak the settings (particularly >> EMCDELAY to compensate skewing at high frequencies). >> >> > Does anyone here have expirencies with similar problems ? >> >> Yes. For a customer who wanted maximum performance I wrote an SDRAM >> test >> function that writes&compares RNG values in display memory at different >> settings and then prints out the number of verify errors per run. Also >> we used a heat gun because errors go up with temperature. >> >> > Do you have a code snip for initializing the SD-controller and SDRAM, >> > so I can compare to my own? >> >> None that I can give you, sorry. >> >> > > Hi, > > Thanks for your answer! > > > The PCB's are the same, just the cpu is replaced. > > I have tried to run the lpc1788 PBC at lower frequency, this makes no > differnce.
Possibly the signal drive strength is too low. What is the lowest EMC frequency that you tried?
> Further i have tried to vary the frequency on the LPC2478 PCB, and this > works, nomatter what i do
That is expected, since that chip runs at 72MHz max. -- (Remove the obvious prefix to reply privately.) Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
Il 12/12/2014 08:32, Jens Gydesen ha scritto:
> Hi, > > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run > perfect for years. > The SDRAM is 2x Micron MT48LC16M4A2. > > In order to modernize this PCB, the cpu is replaced with the compatible > LPC1788. > > I have problems with the SDRAM, it fails. The program crashes due to > read/write errors and the LCD shows distorted displays. > > Does anyone here have expirencies with similar problems ? > > Do you have a code snip for initializing the SD-controller and SDRAM, so I > can compare to my own? > > Thanks in advance > Regards > > Jens
This isn't a really in-topic answer to your OP. I'm starting designing a new board with LPC1788, an external 16-bits SDRAM, a Quad-SPI Flash (for code and data) and a 4.3" 480x272 display with touch panel. Until now I worked with all-in-one microcontroller: integrated Flash and RAM, so I haven't any experience with a memory external bus. Any suggestions how to learn basic and advanced topics about this?
On Friday, December 12, 2014 4:00:47 PM UTC+1, Boudewijn Dijkstra wrote:
> Op Fri, 12 Dec 2014 12:58:56 +0100 schreef JeGy <gydesen.jens@gmail.com>: > > On Friday, December 12, 2014 10:00:48 AM UTC+1, Boudewijn Dijkstra wrote: > >> Op Fri, 12 Dec 2014 08:32:20 +0100 schreef Jens Gydesen > >> <jegy@get2net.dk>: > >> > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has > >> > run perfect for years. > >> > The SDRAM is 2x Micron MT48LC16M4A2. > >> > > >> > In order to modernize this PCB, the cpu is replaced with the > >> compatible > >> > LPC1788. > >> > > >> > I have problems with the SDRAM, it fails. The program crashes due to > >> > read/write errors and the LCD shows distorted displays. > >> > >> Are you running the CPU and EMC at the same frequency as with the > >> LPC2478? And is the trace length the same between the two boards? It > >> sounds like your EMC clock signal is unstable or skewed. Try a lower > >> frequency first, then go up and tweak the settings (particularly > >> EMCDELAY to compensate skewing at high frequencies). > >> > >> > Does anyone here have expirencies with similar problems ? > >> > >> Yes. For a customer who wanted maximum performance I wrote an SDRAM > >> test > >> function that writes&compares RNG values in display memory at different > >> settings and then prints out the number of verify errors per run. Also > >> we used a heat gun because errors go up with temperature. > >> > >> > Do you have a code snip for initializing the SD-controller and SDRAM, > >> > so I can compare to my own? > >> > >> None that I can give you, sorry. > >> > >> > > > > Hi, > > > > Thanks for your answer! > > > > > > The PCB's are the same, just the cpu is replaced. > > > > I have tried to run the lpc1788 PBC at lower frequency, this makes no > > differnce. > > Possibly the signal drive strength is too low. What is the lowest EMC > frequency that you tried? > > > Further i have tried to vary the frequency on the LPC2478 PCB, and this > > works, nomatter what i do > > That is expected, since that chip runs at 72MHz max. > > > -- > (Remove the obvious prefix to reply privately.) > Gemaakt met Opera's e-mailprogramma: http://www.opera.com/mail/
It is a good point with the signal strength, I'l check that. I have tried 48 MHz up to 96 MHz with the 1788. My 2478 runs normally at 72MHz, but 48 will also do it I think that some register in the 1788, different from the 2478, is not initialized correct or forgotten, but I think that I have found the differencies between them. Regards Jens
On Friday, December 12, 2014 4:33:00 PM UTC+1, pozzugno wrote:
> Il 12/12/2014 08:32, Jens Gydesen ha scritto: > > Hi, > > > > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run > > perfect for years. > > The SDRAM is 2x Micron MT48LC16M4A2. > > > > In order to modernize this PCB, the cpu is replaced with the compatible > > LPC1788. > > > > I have problems with the SDRAM, it fails. The program crashes due to > > read/write errors and the LCD shows distorted displays. > > > > Does anyone here have expirencies with similar problems ? > > > > Do you have a code snip for initializing the SD-controller and SDRAM, so I > > can compare to my own? > > > > Thanks in advance > > Regards > > > > Jens > > This isn't a really in-topic answer to your OP. > > I'm starting designing a new board with LPC1788, an external 16-bits > SDRAM, a Quad-SPI Flash (for code and data) and a 4.3" 480x272 display > with touch panel. > > Until now I worked with all-in-one microcontroller: integrated Flash and > RAM, so I haven't any experience with a memory external bus. > > Any suggestions how to learn basic and advanced topics about this?
If I had the possibility to redesign the HW, I would use static RAM... :-) Regards Jens
JeGy <gydesen.jens@gmail.com> writes:

> On Friday, December 12, 2014 4:33:00 PM UTC+1, pozzugno wrote: >> Il 12/12/2014 08:32, Jens Gydesen ha scritto: >> > Hi, >> > >> > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run >> > perfect for years. >> > The SDRAM is 2x Micron MT48LC16M4A2. >> > >> > In order to modernize this PCB, the cpu is replaced with the compatible >> > LPC1788. >> > >> > I have problems with the SDRAM, it fails. The program crashes due to >> > read/write errors and the LCD shows distorted displays. >> > >> > Does anyone here have expirencies with similar problems ? >> > >> > Do you have a code snip for initializing the SD-controller and SDRAM, so I >> > can compare to my own? >> > >> > Thanks in advance >> > Regards >> > >> > Jens >> >> This isn't a really in-topic answer to your OP. >> >> I'm starting designing a new board with LPC1788, an external 16-bits >> SDRAM, a Quad-SPI Flash (for code and data) and a 4.3" 480x272 display >> with touch panel. >> >> Until now I worked with all-in-one microcontroller: integrated Flash and >> RAM, so I haven't any experience with a memory external bus. >> >> Any suggestions how to learn basic and advanced topics about this? > > If I had the possibility to redesign the HW, I would use static RAM... :-)
AFAIK the gotcha with SDRAM on those is the slow speed if you want to execute from it. Perhaps 6 times slower than from flash I think. It is OK for TFT frame buffers. The new M7 should be a big improvement here with its caches, perhaps NXP will make an M7 version of your device too. -- John Devereux
John Devereux <john@devereux.me.uk> writes:

> JeGy <gydesen.jens@gmail.com> writes: > >> On Friday, December 12, 2014 4:33:00 PM UTC+1, pozzugno wrote: >>> Il 12/12/2014 08:32, Jens Gydesen ha scritto: >>> > Hi, >>> > >>> > I have a lpc2478 PCB, with 16M SDRAM, 1/4 VGA LCD i. a. This board has run >>> > perfect for years. >>> > The SDRAM is 2x Micron MT48LC16M4A2. >>> > >>> > In order to modernize this PCB, the cpu is replaced with the compatible >>> > LPC1788. >>> > >>> > I have problems with the SDRAM, it fails. The program crashes due to >>> > read/write errors and the LCD shows distorted displays. >>> > >>> > Does anyone here have expirencies with similar problems ? >>> > >>> > Do you have a code snip for initializing the SD-controller and SDRAM, so I >>> > can compare to my own? >>> > >>> > Thanks in advance >>> > Regards >>> > >>> > Jens >>> >>> This isn't a really in-topic answer to your OP. >>> >>> I'm starting designing a new board with LPC1788, an external 16-bits >>> SDRAM, a Quad-SPI Flash (for code and data) and a 4.3" 480x272 display >>> with touch panel. >>> >>> Until now I worked with all-in-one microcontroller: integrated Flash and >>> RAM, so I haven't any experience with a memory external bus. >>> >>> Any suggestions how to learn basic and advanced topics about this? >> >> If I had the possibility to redesign the HW, I would use static RAM... :-) > > AFAIK the gotcha with SDRAM on those is the slow speed if you want to > execute from it. Perhaps 6 times slower than from flash I think. It is > OK for TFT frame buffers.
Oh I should have said that it should be fine for your retrofit application, it should be significantly faster than the ARM7. I am looking at doing exactly the same thing on my LPC2478 boards at some point so please let us know what you find!
> The new M7 should be a big improvement here with its caches, perhaps NXP > will make an M7 version of your device too.
-- John Devereux