LPC1788 SDRAM PCB layout

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1788 SDRAM PCB layout

1,179 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iamzhangyong on Fri Sep 13 08:57:24 MST 2013
Hello  everyone!
    I use LPC1788 in my project,but the sdram does not work well.It usually bus fault.What I should pay attention in the layout of sdram ? Thanks...
Labels (1)
0 Kudos
7 Replies

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iamzhangyong on Sun Sep 15 08:03:06 MST 2013
Thanks everyone!especially MC and Pacman
  I think I found the problem.I made a mistake in PLL setting.According to what MC said ,I tried to reduce the clock frequency.It is normally.When I try to set the PLL to 120MHz,I found the FCCO I have set before was not in the range of 156-320MHz.Thanks Pacman,the article is useful to me.This board is the second version .The SDRAM can't work in the first version because of the layout.I didn't keep the data-bus track in the same length,then I modified in the second version .Now it can work well at 60Mhz.The interface of LCD may have to be redesigned.The TFT is flickering.I'm not sure whether the problem is caused by the power supply of TFT.
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sat Sep 14 13:54:00 MST 2013
Hi iamzhangyong,
There is a priority for each bus master and access won't happen at the same time. You can also allocate priority to bus masters according to your need by configuring Matrix Arbitration register (MATRIXARB- 0x400F C188). Please check at page 37/1108 of LPC178x_7x user manual Rev. 2.1 — 6 March 2013

Please use debugger and try to find the reason of the hard-fault, also look signal integrity at high speed compared to low speed as suggested before. I assume you have already configured microcontroller's pins connected to SDRAM in high speed mode.

MC
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Pacman on Sat Sep 14 09:18:38 MST 2013
I'd like to recommend looking at this thread:
http://www.lpcware.com/content/forum/dram-pcb-layout-works-only-60-mhz

-The first thing I would do is to make sure you have a ground-plane below the microcontroller, the clock lines, address lines and data lines.
Also that your decoupling is good. If you aren't using ferrite beads, this might improve your stability too.
There is a lot of useful information in the PDF Dave linked to.
Also pay close attention to what wmues says.

Quickies:
A ground plane is good.
Short traces are good.
Pull up GND from the ground-plane using VIAs right where you need the GND, do not make long GND traces.
Avoiding VIAs on the clock line is highly recommended. If you must have one, my best bet is to place it close to the microcontroller.
If you have a 4-layer PCB, a power plane is good too.
Keep the address and bus-lines (lanes) the same length (as far as possible). Also keep the data lines the same length. This is not vital, but can improve stability by the weight of a few electrons.

Did I remember to mention the ground plane ? :)
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iamzhangyong on Sat Sep 14 08:51:05 MST 2013
Thank you very much! mc
  I have do the SDRAM read and write test in 60MHz.There is no problems during the test.There is a 800x480 TFT LCD on my board,I use the sdram to be the frame buffer.I can fill the sdram to display different color.It is normal.Strangely,I call the GUI_DispDecAt(...) (I used emwin 5.20)in my main loop to test the speed of the lcd controller,then the cpu get a hardfault.The debug tool I used is Jlink.It is so strange!I guess the problem will be the initialization of SDRAM.I try all of the parameters it can be.The board can work longer than before,but still can't working right.If the LCD controller DMA and CPU access the SDRAM at the same time,there will be a hardfault?Thanks for you reply.
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sat Sep 14 07:54:16 MST 2013
Hi iamzhangyong,
I think you can start debugging by slowing down the system clock and SDRAM clock. Layout related issues will not impact that much at low frequency. You can also check trace lengths.Use high impedance probe to measure ringing,clock shape and if possible setup time and hold time. You can always play with Delays to manage setup time and hold time.

Hope it helps.

MC
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by iamzhangyong on Sat Sep 14 05:01:57 MST 2013
NO~ I do not have a Eval-Board.Do you have the pcb file of the eval-board , or other you designed ? Thanks for your reply.Thanks!
0 Kudos

876 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Martin84 on Sat Sep 14 02:20:01 MST 2013
Have you tried your Software on an Eval-Board?
0 Kudos