Microcontrollers + linux - Page 1
Forum section: electronics / general

author: jpelczar
author_rank: Contributor
timestamp: March 28, 2012, 09:38:10 am
content: Hi,Finally I've got a chance to design an embedded system which is capable of running Linux kernel + some userland apps. I know there are several uCs that are capable of running Linux, but the packages (BGA) are usually the things that can screw the designer who begins to work in wonderful world of BGA.I've searched for several uCs capable of doing the job:1. AVR32 (AT32AP700X) - I've used them successfully before. They're available in quite friendly packages (*QFP), support external SDRAM, there's Linux port. Atmel doesn't recommend using them in new designs, though.2. ARM - well, there are tons of different chips. As usual, the ones that can run Linux require BGA board.3. Microblaze - throw the FPGA + soft processor onto the boardThere are other choices:4. Single-Board-Computers - e.g. Embest Mini2410-II5. ? - I've found some strange looking Chinese chips, which (as they claim) are capable of doing the job6. Not use Linux/NetBSD, but use chips with less power + some embedded RTOS as a last resort.I could include the SBC module in the design, but one has to learn the BGA and/or multilayer (>2) PCB layout someday.I'm a bit afraid to use the BGA chips - I don't know if I should go for using it, there are pitfalls when using them. *QFP packages are more friendly - but there's lack of the microcontrollers which would run Linux. Again, there are traps when routing traces for DRAMs. Does anyone have an experience with developing such designs or can share some tips (or chips) ?Jarek

author: Psi
author_rank: Super Contributor
timestamp: March 28, 2012, 11:38:42 am
content: What about the raspberry pi, its cheap and already runs linux.Also, i think someone on this forum said there are TQFP ARM chips coming that run linux?

author: Bored@Work
author_rank: Super Contributor
timestamp: March 28, 2012, 12:14:23 pm
content: Quote from: Psi on March 28, 2012, 11:38:42 amUnavailable. If not to say almost Vapourware.My recommendation would be to buy a board, instead of developing your own. There are tons of ARM boards on the market. If they don't do, there are also lots of tiny Intel boards on the market. Make sure there is already a Linux port for the system. Otherwise you can have a lot of fun bringing a Linux up on a naked board.

author: Gall
author_rank: Frequent Contributor
timestamp: March 28, 2012, 12:22:21 pm
content: How much power do you need?Tiny210 is quite cheap (about $100 for stamp module only, $220 for complete devkit). This is a stamp module with CPU, RAM, Flash and minimal power circuits. It is 1 GHz Cortex A8. Less powerful stamp modules (i.e. ARM9) are available too.

author: jpelczar
author_rank: Contributor
timestamp: March 28, 2012, 01:35:12 pm
content: I know it will be faster just to throw some Single Board Computer into the design, but I also want to learn proper multilayer PCB routing. As I said before - at some point I will have to, so why not do it now, as I get paid for it :]There's also AT91RM9200 chip, which seems to do the job. It's in PQFP-208 package, so it won't be that hard to solder. The final product will be machine mounted anyway - small run, around 50 (max 100) devices. I think I'll stick to the QFP AT91RM9200 for now (and maybe include some smaller BGA, e.g. flash memory).

author: rsjsouza
author_rank: Super Contributor
timestamp: March 28, 2012, 02:17:29 pm
content: Hi,I agree with a post above regarding the use of a board, but you can also check the option of using modules.Since it is a small batch, these modules already have every high density device mounted on them (the processor, the flash, the DDR/SDRAM). They can be pricey and frequently use these super high-density connectors, but get the job done. I worked with LogicPD and Gumstix, but I am pretty sure there are others.Also, since you are using embedded Linux check if the device of choice has device driver support for all peripherals you want to use - something that is frequently overlooked in the selection and becomes a nightmare along the road. Unfortunately not all Linux distributions are created equal - don't ask me how I know this...One last detail is to check if the Linux runs at an adequate speed on the device, especially if you are using any sort of graphics screen. There's no way to know this from the datasheets, as this is heavily dependent on the application, but again the boards may help you. I've seen my share of devices that promise the world but really struggle to keep up with even moderate ethernet speeds.--Rafael

author: jpelczar
author_rank: Contributor
timestamp: March 28, 2012, 03:34:28 pm
content: The project's scope is mostly high level stuff, and for various reasons there's got to be customized Linux kernel. The external hardware is connected merely through Ethernet, serial port, I2C bus and managed by software stack, so all the drivers are already there. The whole thing will work just fine using 100MHz CPU, 32 MB SDRAM and 32MB NAND flash (no ls,cp,etc. - only minimal kernel and few userland apps), but the CPU stuff will have to be shielded from RF.

author: Gall
author_rank: Frequent Contributor
timestamp: March 28, 2012, 07:09:20 pm
content: Some kind of Cortex M probably?

author: T4P
author_rank: Super Contributor
timestamp: March 28, 2012, 08:04:43 pm
content: Cortex-M4 will run at 186MHz and has 210DMIPS but of course that wouldn't run linux probably .Cortex A8 ... 1GHz but of course all are BGA packages the next problem is ... does a 600MHz MSM7227 run linux properly won't ever know .An Intel board might probably do you fine

author: Psi
author_rank: Super Contributor
timestamp: March 28, 2012, 10:10:34 pm
content: how about a ATMega1284 in DIP package emulating an ARM core with some old 30pin SIMM memory tacked onto the side?Only takes two hours to reach bash loginhttp://hackaday.com/2012/03/28/building-the-worst-linux-pc-ever/

author: jpelczar
author_rank: Contributor
timestamp: March 29, 2012, 07:04:00 am
content: One guy on Polish EE forum (elektroda.pl) presented this project some time ago:http://www.elektroda.pl/rtvforum/viewtopic.php?t=2160923http://obrazki.elektroda.net/7_1268172507.jpghttp://www.twarm.pelos.pl/so I'm going to go for this chip.

author: amyk
author_rank: Super Contributor
timestamp: March 29, 2012, 12:57:44 pm
content: Quote from: Psi on March 28, 2012, 10:10:34 pmThis shows that with emulation, almost anything is possible given enough memory and time. But I don't think the OP wants emulation

author: Psi
author_rank: Super Contributor
timestamp: March 30, 2012, 11:43:39 pm
content: yeah, i wasn't being serious

author: slateraptor
author_rank: Frequent Contributor
timestamp: March 31, 2012, 05:57:07 am
content: Quote from: BoredAtWork on March 28, 2012, 12:14:23 pmI'm surprisedbunnie's Chumbyhasn't been suggested yet. Not as cheap as Rasberry Pi, but it isn't vaporware either.EDIT:Quote from: jpelczar on March 28, 2012, 01:35:12 pmI hope you're well aware that if you've never designed an embedded system of comparable complexity before, you'll be opening a potentially nasty bag of worms.

author: jpelczar
author_rank: Contributor
timestamp: March 31, 2012, 01:49:03 pm
content: Quote from: slateraptor on March 31, 2012, 05:57:07 amI've done embedded systems before, but using 8-bit micros. How else am I supposed to learn routing for high-speed PCB ? You don't learn how to drive by playing computer games.

author: Psi
author_rank: Super Contributor
timestamp: April 01, 2012, 11:41:35 am
content: Quote from: jpelczar on March 31, 2012, 01:49:03 pmI don't think the routing will be that hard, its a ~180mhz ARM not a 4ghz i7I'd be more worried about debugging and getting the kernel to boot.

author: bingo600
author_rank: Super Contributor
timestamp: April 04, 2012, 07:41:45 pm
content: Quote from: jpelczar on March 28, 2012, 09:38:10 amDidn't ATMEL discontinue the full 7000 series ?/Bingo

author: DrGeoff
author_rank: Frequent Contributor
timestamp: April 04, 2012, 08:55:52 pm
content: Without an MMU you probably want to run uCLinux. Atmel have a module that does this (http://www.atmel.com/tools/NGW100MKIINETWORKGATEWAYKIT.aspx) and you find uCLinux embedded in all sorts of Chinese products these days, from IP cameras to NAS boxes. How much processing power and memory you need depends entirely on the application.

author: jpelczar
author_rank: Contributor
timestamp: April 06, 2012, 06:18:39 am
content: Quote from: bingo600 on April 04, 2012, 07:41:45 pmI think that they did. I don't know why. They're quite good chips to run Linux. I think that they were just marketed poorly.Quote from: DrGeoff on April 04, 2012, 08:55:52 pmThanks, I'll check out uCLinux. ATNGW100 runs on AT32AP7000 which does have MMU (software assisted, though).

author: Entropia
author_rank: Regular Contributor
timestamp: April 10, 2012, 07:27:29 am
content: One possibility is Freescale i.MX233 (MCIMX233CAG4B). It's an ARM9 device that runs at 450 MHz, has MMU and most importantly comes in TQFP package guaranteed to stay in production for years. Combine with 64MB DDR SDRAM and you have a nice full Linux system that boots from SD card. It also has an LCD controller so you can run Android on it.

author: nemik
author_rank: Newbie
timestamp: April 11, 2012, 01:11:18 am
content: Quote from: jpelczar on March 28, 2012, 03:34:28 pmFor these small requirements, unless you insist on building on your own, consider using cheap routers and put OpenWRT on them. If cost is any consideration anyway, these things are produced in the hundreds of thousands and the economies of scale make them pretty cheap.http://www.alibaba.com/product-gs/505152995/TP_LINK_TL_WR703N_150M_11N.htmlfor example and it can be even cheaper. It could communicate with another board/micro using some serial lines or even the USB port if you don't want to modify it. I run OpenWRT on these for small projects and they're awesome.

author: free_electron
author_rank: Super Contributor
timestamp: April 13, 2012, 04:42:45 am
content: The delivery problems with the rberry are because Broadcom is overloaded. They allocated all production of that chip for one customer, so distribution channels get zilch...This is a common pitfall. Designers find a cool chip, design it in and assume it is going to be availble...Take a look at ST spear 320. Arm9 dualcore, runs linuc, wince ,vxworx and others. Slap on some sdram and off you go. Lots of peripherals. Proven design. ( used in the agilent 2000 and 3000 scopes. )

author: T4P
author_rank: Super Contributor
timestamp: April 13, 2012, 06:01:28 am
content: Quote from: free_electron on April 13, 2012, 04:42:45 amAhh .. ST Spear320 the ARM926EJ-S , have seen them around for a long time ( In my very old Asus P320 phone with a TI 200MHz core )It's in my epson laser printer and so on ... seen it in so many modems .But yeah , it's been there done that , proven platform .

author: nctnico
author_rank: Super Contributor
timestamp: April 13, 2012, 07:53:32 pm
content: I really wonder why nobody has mentioned the Beagle board so far (beagleboard.org). Its cheap, mature, offers loads of CPU horse power and has a huge support community.

author: T4P
author_rank: Super Contributor
timestamp: April 13, 2012, 11:00:26 pm
content: Quote from: nctnico on April 13, 2012, 07:53:32 pmYep . Genuinely Surprised .

author: slateraptor
author_rank: Frequent Contributor
timestamp: April 13, 2012, 11:34:09 pm
content: Quote from: Dave.S on April 13, 2012, 11:00:26 pmQuote from: jpelczar on March 31, 2012, 01:49:03 pmThe OP has clarified that he simply wishes to focus on high-speed PCB layout; ripping his hair out troubleshooting an embedded OS on an untested platform is merely of secondary concern.

author: jpelczar
author_rank: Contributor
timestamp: April 14, 2012, 08:27:04 pm
content: Quote from: slateraptor on April 13, 2012, 11:34:09 pmI'm well aware of Beagleboard and other ready to use PCBs. The project I'm gonna work on, in reality, has no hard budget constraints and specific deadline, so I wanted to take the chance and learn some stuff

author: slateraptor
author_rank: Frequent Contributor
timestamp: April 14, 2012, 11:32:29 pm
content: Quote from: jpelczar on April 14, 2012, 08:27:04 pmIndeed, those are the best kinds of projects. Can't say that I'm not a bit jealous. Best of luck.

author: nctnico
author_rank: Super Contributor
timestamp: April 15, 2012, 12:50:39 am
content: Quote from: jpelczar on April 14, 2012, 08:27:04 pmThat is a very good goal. I also try to do projects to gain more hands-on knowledge. Its never a waste of time or money.Concerning the Beagle board: last year I designed a board based on the Omap (or whatever TI calls them this week) used on the Beagle board for one of my customers. The customer used the Beagle board to prototype their software. Once they got to the point where they needed their own hardware they called me. These kind of boards are not easy to get right though. You'll need to read a lot about routing high speed signals and the routing guidelines of the chip. The next step is to think about how to organize the layers of the PCB and how the power is distributed. It is good to work out placement of major components before entering the diagram in a CAD package. On top of all that you'll find that most quick turnover / pooling PCB manufacturers can't make boards with traces/clearances less then 0.1mm. You'll need to choose the packages carefully.Another thing is getting the right equipment. You'll find frequencies up to 200MHz on these kind of boards. Having a >300MHz oscilloscope (even if its analog) will help a lot.