Requirements
The microcontroller for the node front-end must meet the following requirements:
Architecture
- Must be >= 32 bits.
- Should have many implementations, by more than one manufacturer if possible.
- Should have decent integer math ALU (e.g., 32 x 32 -> 64, MAC, etc).
Development Tools
- Must have current and active OSS tools: gcc, gdb, binutils, etc.
- Must have useful open debugger protocol (e.g., JTAG)
Packaging
- Must have "usable" packaging: packaging that can be used on two layer boards.
- Must be a "Quad Flat Pack" (or QFP, e.g. a TQFP or LQFP), or possibly a BGA with < 32 pins.
- QFP should have <= 64 pins. >= 100 pins is possible but a pain. 144 pins absolute maximum.
Peripherals
- Must have on board memory: >= 128 KB flash, >= 32 KB SRAM.
- Must have necessary communication buses (CAN and/or USB).
- Should have one or more serial buses: UART, SPI, etc.
- Should have a >= 10 bit ADC.
- Should have >= 3 PWMs.
- Should have a watchdog timer.
- Should have brown out reset.
Computational Horsepower
- Must have > 10 MIPS, but should have >= 60 MIPS.
Power Consumption
- Should have reasonable voltage requirements (e.g., 3.3V only (best) or 3.3V/5V).
- Should have low power modes.
Cost
- Should be relatively low cost in small quantities.
32-bit Microcontrollers considered
There were two microcontroller architectures considered initially: ARM (Advanced RISC Machine) and PPC (Power PC). ARMs are popular microcontrollers with good open source support. On the other hand, PSAS has a grant from IBM to use Power PC microcontrollers on the rocket. A quick look at PPC manufactures revealed the microcontrollers did not meet our package size requirements; the smallest package size available was a 168 pin BGA.
ARM Comparison
The capstone team searched the websites of over 34 companies that license the ARM core. Of those companies, only five had microcontrollers with CAN or USB: Atmel, Freescale, Philips, STMicroelectronics, and Texas Instruments.
There were roughly 30 chips that met our requirements. We compared the 30 chips, looking at various characteristics, such as package size, speed, memory, and peripherals. For the full comparison chart, see the file ARMs.xls
There were 11 microcontrollers that best met our requirements: 5 had both CAN and USB, 3 had CAN only, and 3 had USB only. The microcontrollers that had both CAN and USB were all 100 pin packages from Atmel. Once we looked at drawings of pin package sizes compared to our required board size, we realized that we simply couldn't fit a 100 pin package on the board. That only left the 64-pin CAN only or USB only microcontrollers.
When the decision was made to use USB in the next generation rocket, we took a look at the USB only ARM chips. There were three top choices: an Atmel AT91SAM7S256, the Philips LPC2148, and the STM STR711FR2T6.
Comparison Chart
Characteristic |
Atmel |
Philips |
STM |
production status |
production |
sampling |
active |
SRAM (KB) |
64 |
40 |
64 |
flash (KB) |
256 |
512 |
256 |
frequency (MHz) |
55 |
60 |
66 |
JTAG |
Y |
Y |
Y |
serial boot |
N |
Y |
? |
A/D bits |
10 |
10 |
12 |
number of ADCs |
8 |
14 |
4 |
max number of GPIO pins |
32 |
45 |
30 |
UARTs |
3 |
2 |
4 |
SPIs |
1 |
2 |
2 |
I2C |
1 |
2 |
2 |
16 bit timers |
3 |
4 |
4 |
PWM channels |
4 |
3 |
4 |
Watch dog reset |
Y |
Y |
Y |
brown out reset |
Y |
Y |
? |
power on reset |
Y |
Y |
? |
RTC |
Y |
Y |
N |
Miscellaneous "Warts" Found
Atmel
To use USB, the system designer is forced to under clock the microcontroller at 48MHz. It also doesn't have a real-time clock (only a real-time timer). The Atmel chip was discarded early in the selection process because of USB issues (see below).
Philips
Philips was lacking in memory, and the quoted SRAM size of 40KB is deceptive. There is 32KB of SRAM for general use, but 8KB of that is reserved for USB. That puts it on the lower limits of our memory requirements.
The Philips part exclusively uses an internal 1.8V voltage regulator, which means we can't hook up our switching power supply. This increases the power consumption of the system.
Also, the pin multiplexing may prove troublesome. When PSAS designs a self-correcting rocket, all three PWMs will be used on a node to control motor servos. The PWMs on the LPC2148 conflict with other devices we want to use, such as SPI and UART0. However, this need is far in the future and we may switch to a new microcontroller before then.
STM
The STM part also requires the microcontroller to be run at 48MHz to use USB.
Another wart was that the ADC conversion time is listed as 1ms. This was unacceptable, considering that the other two microcontrollers listed 2us conversion times. The PLL lock time also seemed to be a bit long; it was listed as 600us, while Philips listed a 100us lock time. Further, the internal oscillator takes 2.5 seconds to start up. If the microcontroller has to do a hard restart in flight, we would lose half of the apogee window to oscillator initialization.
Also, the data sheet was vague about whether the internal voltage regulator could be bypassed in Standby mode.
USB Considerations
The STM documentation for USB was severely lacking. Their datasheet did not indicate how many of each type of USB endpoint were available. The lack of documentation made this an unacceptable choice.
The Atmel part only had four USB endpoints; two endpoints could be configured to be isochronous endpoints. They also listed endpoint 0 as being able to send control, bulk, or interrupt transfers. This seemed to be an indication they were doing something out of spec with their USB controller, since the USB specification clearly states that endpoint 0 must be reserved for control transfers from the host.
The Philips chip had the best documentation of the three chips, and it had the most endpoints. The LPC2148 had 16 USB endpoints and 4 endpoints could be configured to be isochronous endpoints.
Final Choice
In the end, we decided to choose the Philips LPC2148 chip because of its great documentation and USB support.