Advice on designing an ARM Linux board (with MMU)

I’m looking to get started with doing my own PCB that runs embedded Linux. My needs are not particularly demanding beyond that, so I suspect there are a lot of potential solutions that could work. I’m hoping someone with the experience here can provide some quick answers and save me pain, trouble, and heartache chasing dead-ends. (Well, avoid major show-stoppers - I anticipate a good amount of work getting things functional).

  1. What would be some good microcontrollers to look at? At the moment I’ve been looking at Atmel AT91SAM9260. I’m looking for microcontrollers with MMU (i.e. no ucLinux). How has the experience been with using Linux on that uC? Any other suggested vendors / uCs that have been known to work well? I don’t want to spend too much time bringing up the board so a uC that has been shown to run Linux on a reference board is a big plus. If there’s a lower pin count ARM out there that has MMU (i.e. runs standard Linux) and SDRAM interface that would be very interesting, as the SDRAM is by far my largest IO requirement. Also must not be BGA package, I don’t have capabilities to solder that right now.

  2. Probably my biggest question: is it practical for me to design this board? My plan is to use gEDA / PCB tool suite, which I’m still just learning. (Most of my boards have been done in EAGLE but I’ve decided I don’t like that because of the binary / proprietary file format and vendor lock-in). I’ve done lots of boards of various sizes with various peripherals, but nothing faster than what 8-bit microcontrollers (AVR, PIC) can do. From the Atmel application note on interfacing SDRAM with AT91SAM9260:

"For proper SDRAM operation at 100 Mhz, 10 to 30 Ohm series resistors can be placed on all

the switching signals to limit the current flow into each of the outputs. The resistor placement

is to be located near the processor. The need and specific value of series termination

resistors on the signals is best determined by simulation using IBIS models and the specific

design PCB layout."

Eesh. I’m a little lost here. It’s really so fast I have to put termination resistors on … everything …? Let alone the fact that whatever software to do that simulation I’m sure is not inexpensive. (Then again, as mentioned I’ve only done slower boards with microcontroller clock rates a tenth of what the AT91SAM9260 can do and generally didn’t have to worry about speed/impedance when doing layout besides a few special traces, like Ethernet PHY in/out to RJ45). I’m quite sure I can get a PCB laid out for this, but what I don’t know is if it will work. My fear is that the fast clock rates will prevent the SDRAM (and quite possibly other things) from working. Just how justified is this? Are there some relatively easy ways to make sure the design will work without spending the money on fancy PCB design software?

  1. Can it be done with only a 2 layer PCB? (Remember all there would be mainly is an SDRAM and an SPI DataFlash). I have access to equipment capable of fabricating my own 2 layer PCB (8 mil clearance / trace widths, potentially less if I use different [more expensive] tools), if 4 layers are required that will make things way more unpleasant and expensive.

I’ve successfully done many 2-layer PCBs but they were slower speeds / less complicated processors than this for the most part. This will be breaking new ground for me (when I make it, it will be my first Linux board and first board with SDRAM). I do want to do it though as they are skills I would like to learn.

I wouldn’t even think of using a double-sided PCB for a system like that, you will need at least four layers - more if you have BGA parts.

It’s going to be quite challenging unless you have a good PCB package. You might be able to get it working with free software, but it will take a great deal of work.You might have to use trial and error, redesigning the board several times until it works. On the other hand, it might work first time if you know what you are doing. You will also need good test equipment; a really good scope, at least, and maybe a fast logic analyser.

Leon

I noticed the Olimex AT91SAM9260 schematic looks suspiciously like it was drawn in EAGLE? (on one page too, no less… ugh…) Obviously this board works, so they must have managed, somehow… (I don’t envy the person who had to route it though). I’m sure it’s multilayer but of course there are many, many more peripherals on it than I will have.

To clarify, the only high pin count devices would be the microcontroller (LQFP) and single SDRAM chip. So no BGA. What unworkable problems would a 2-layer board present in that scenario? It seems to me that the only major complexity presented would be routing the nets between SDRAM and uC (and of course maintaining a proper ground plane as much as possible). Other parts would be e.g. some RS485 / an LVDS transceivers hooked to the UARTs. A 1-wire bus. Slow / low pin count stuff like that which should be easy to route on a 2 layer board (I’ve done it many times). For calculating trace capacitances (for lack of a better PCB package) it seems there are online calculators to do a quick check on that, as a starting point. My (basic, as I’ve not designed one yet) understanding of a 4-layer board is that the middle two layers are power/ground planes. If those can be safely sacrificed in the section of board between the uC and SDRAM where the address/data lines are routed…

In terms of “might work first time if you know what you are doing” - this is where I would like to learn a few things on this project, in case there are some things I should add to my mental checklist for this higher-speed board. :slight_smile: Any specific (hopefully concise) pointers to references?

For equipment, I have access to some very nice, new (1 - 2 years old at most) digital Tektronix oscilloscopes, logic analyzers, function generators that are more than capable for the job. I don’t foresee any problems with figuring out what’s going on due to lack of test equipment.

Olimex uses Eagle for all their designs. They don’t make multi-layer boards AFAIK so it is either double-sided or they get them made outside

I didn’t say it couldn’t be done with cheap or free software, it’s just going to be difficult and take a long time. A four-layer board will make the layout much easier and avoid a lot of potential problems.

Leon

I’m working on a similar project, and have poured over years worth of forum posts over the last several weeks on topics such as these. As far as I can tell, a successful 2-layer AT91SAM9260 board hasn’t been created – people typically can’t read from the memory, if i remember correctly – but similarly layed out boards that are 4 layers work.

The AT91RM9200, a similar processor (available in a 208-pin PQFP package), has several successful examples of 2-layer boards running linux. This is the processor I’ve chosen to use for my first linux project, given that there are (i) examples of working 2-layer boards, (ii) a good selection of people you can talk to who use the same processor if you run into trouble, (iii) a tool-chain for initially loading bootroms into the processor/flash, to get up and running quickly, and (iv) pretty good linux support. Atmel’s page for the processor is here:

http://www.atmel.com/dyn/products/produ … rt_id=2983

I’m designing my board in Eagle, too, and routed the signals between the 32 meg SDRAM and the AT91RM9200 the other day. It took a few tries to get what looks to be a good, clean, low-travel route – but with a little luck this one might work out okay. Here’s a screenshot from Eagle:

http://cogsci.mcmaster.ca/~peter/notes1 … yroute.jpg

The lines from the top are data, where the lines from the side are for the address. I’m also working on bringing the data lines out to the connector for the 2.8" OLED display:

http://cogsci.mcmaster.ca/~peter/notes1 … _early.jpg

This one’s a little more tricky, since you’re essentially extending the data lines, which adds the potential for noise. While the OLED operates much slower than the memory, I imagine having these tiny little antennas going towards the OLED won’t help when you’re accessing the SD :). I’ve tried to keep the clearences a little extra wide: 10-12 mil for the signal lines, and 14-16 mil between signal lines and vias. Overall the traces don’t seem to be more than 20-30 mm from the AT91RM9200 pins, which will hopefully be okay.


Some other examples you may want to look at include the Linux Stamp board, which has an AT91RM9200, 32meg SDRAM, 8meg SPI flash, 10/100 ethernet, etc., on a 2-layer board with full Eagle schematics:

http://www.opencircuits.com/Linuxstamp

(I have always worried when I look at that board though – it doesn’t have a ground plane!)

It sounds like you had planned on using a PCB mill to make a first board? If so, that may be a very bad idea – I think you’re definitely going to want to have a pretinned, solder-masked board to solder those 208 pins… (which is not to mention plating that you would have to plate the VIAs by hand!). :slight_smile:

I hope that helps

Very interesting - thanks for the response! I was not aware of an existing 2-layer PCB with Linux design. Certainly encouraging to know it can be done for something simple. (And I would be stripping out the Ethernet PHY, secure digital, so arguably simpler as e.g. the PHY has a lot of pins as well).

I would just love to know why AT91RM9200 works and the AT91SAM9260 does not. (And if “people typically can’t read” that sounds like more than one person has attempted this - bad sign). I guess I’ll have to take a very close look at the datasheet’s timings, try to see why that is. I don’t really see what the AT91RM9200 offers that the AT91SAM9260 does not, besides a higher price. Also although I haven’t searched on the AT91RM9200 it seems that people are successfully loading Linux on the SAM9 and there are commercial / non-commercial BSPs so I think it would be possible once SDRAM is shown to work.

Yes I’m using a PCB mill on this. My prototyping costs are very low if I can use that, and I can actually progress in my project vs. e.g. waiting a long time for a 4-layer PCB from batchpcb.com (as well as the high cost). (Could do multiple boards revisions in a day if I have to). I don’t think soldering it will be a problem, despite the lack of tinning and solder mask. I’ve done projects that used 100-pin LQFP processors, tiny leadless QFN packages, etc. with my process - all have worked fine. I’ve had plenty of people look at me with expressions of “you can do that?” so I’m not easily dissuaded. In fact OSP finish (copper with very very thin preservative) is often used in production for leadless packages (BGA, QFN, etc.) due to its thinness and RoHS compliance.

I’m not entirely sure why the 9200 will work, and the 9260 doesn’t seem to. The 9260’s clock is a tiny bit faster, so that might have something to do with it – although if you’re willing to take the performance hit, you might be able to solve that problem by adding some setup/hold delays for the memory device.

I think the main hardware differences between the 9200 and 9260 are that the 9200 has more program/boot flash and onboard RAM, where the 9260 has more peripherals (including an image sensor interface).

Performance isn’t critical in this application, if it was possible with the uC I could slow the clock of the entire design down to 50 MHz and do just fine (although faster is nicer). My understanding though is that it’s the slew rate of the changing signals that can cause a big problem (transmission line effects and reflections), especially for edge-sensitive signals like clocks.

I notice that the SDRAM application note suggested adding the 10 to 30 ohm source termination resistors while no design I’ve seen actually uses that? I wonder if it would help on a 2-layer design… I’m thinking of building in the pads just in case.

Maybe I should just go to the library and find a good book on high-speed digital design to better understand what’s going on here… :lol:

I don’t quite see the point of going with more onboard memory if you’re hooking up 32 MB of SDRAM and 8 MB of flash. heh…

Why not use a AT91SAM7SE then ? 50MHz allright, and seems a lot easier to make a board with…

No MMU; can’t run standard Linux.

Why not LH79525? it’s a 75MHz ARM720T CPU, plus MMU, SDRAM interface and LCD controller, may be easier to route the circuit, since it’s slower.

Or if you need more power why not EP9302? This is a very powerful 200MHz ARM9 CPU

Actually that LH79525 looks great ! Anyone know of a board made with that ? I’ve been planning for a AT91SAM7SE for my next project, but that NXP part looks a lot better…

The LH79525 seems a great chip, but apparently for no reason, looks like nobody is using it :frowning:

I can’t understand why, since it seems to have many nice features, including MMU, internal cache, SDRAM controller, LCD controller, ethernet, USB…

Anyway I’m planning to do a board with it in the next months, anybody knows if its JTAG interface is supported by openocd? without that it would be hard to program the (external) flash, since it does not seem to have a bootloader, unlike the LPC seriers of MCU…

LH79525 definately looks interesting, if I can just find a Linux BSP for it…

I got the impression one was on the way… a few years ago. I didn’t find it. Eh. Maybe I’ll have to dig deeper.

Well I’ve definitely interested if you find anything about it; it is bizarre that such a good looking part is not in use… there is very little on it on google it seems. maybe it went under the radar ? lack of marketting ?

It’s not intended for the embedded systems market. A few customers probably buy very large quantities of them for use in PDAs and the like.

Leon

Found this : has the BSP:

http://www.standardics.nxp.com/support/ … pe=LH79525

The LH79525 seems a great chip, but apparently for no reason, looks like nobody is using it

NXP’s LH product line was aquired from SHARP which has been long time player of ARM derivates on market. I can imagine the reason why NXP needs to do so.

Toru Nishimura / ALKYL Technology

Anyone interested in using that part ? maybe we could create a separate topic and pool the information.

Anyone interested in using that part ? maybe we could create a separate topic and pool the information.

I have no handon experiences on SHARP LH series ARM7/ARM9 derivatives. As one of fronteering company of electronics calculator makers, it has been in production of _a lot of_ ARM abacus/pocket-something/PDA for years. Some of them can run Linux and the source code is the most valuable resources to learn LH internal peripherals.

Toru Nishimura / ALKYL Technology