"Houston, we have a problem."
OK, technically it's "Pasadena, we have a problem," because the Jet Propulsion Lab (JPL) is located there, and that's where the Curiosity Mars rover phones home to when it's in trouble -- the Mars Science Laboratory (MSL) project team at JPL. Unfortunately, Curiosity is in trouble, at least temporarily.
Last Wednesday, February 27, Curiosity phoned home with a status report -- an empty status report followed by "Rover Insomnia" (Curiosity failed to switch into sleep mode after making its empty report).
"Ruh-roh!"
It seems a corrupted file stored in the Flash memory of Curiosity's A-side main flight computer -- one of a matched/redundant pair of PowerPC-based RAD750 computer boards -- caused the failure, so the flight controllers put Curiosity into safe mode as a precaution. Switch to "Plan B" -- or, in this case, the B-side backup computer.
By Tuesday of this week, Curiosity was no longer in safe mode and is continuing to operate under control of the B-side RAD750 computer board as the Earth-side project team remotely tells the B-side computer about the Rover's current state, "The position of the arm, the position of the mast..." and scrubs the A-side computer's Flash memory. The glitch may have been caused by a radiation-induced SEU (single event upset). We don't know yet.
While Curiosity's getting better, I want to talk about a very cool programmable-logic application running on Curiosity that's got nothing to do with the current problem. The application is image processing for the MAHLI hand camera. MAHLI is an abbreviation for the "Mars Hand Lens Imager," which is a very versatile camera system mounted at the end of a robotic arm. MAHLI can capture images at distances as small as 2.1cm, and as far away as infinity using an autofocus lens system.
Here's a photo of the MAHLI camera:
Photo courtesy of NASA
(Note: the pocket knife is for scale -- it didn't go to Mars as far as I know)
The imager used in the MAHLI camera is a Kodak KAI-2020CM interline transfer CCD with 1600x1200 active pixels, digitized to 12 bits with an effective 11-bit dynamic range after correlated double sampling. The CCD sensor is covered with microlenses and color lens filters in a conventional Bayer RGB filter. Digitized CCD data travels over a 6-bit parallel link operating at 30/60/120Mbits/sec to a Digital Electronics Assembly (DEA) residing in the Curiosity rover's main chassis. The MAHLI DEA communicates with the Curiosity rover's main computers over dual-redundant, synchronous LVDS (low-voltage differential signaling) running at 8Mbits/sec from DEA to rover, and 2Mbits/sec from rover to DEA.
Here's a block diagram of the MAHLI camera head and the DEA:
As shown in the diagram, the DEA consists of 8Gbytes of NAND-Flash memory and 128Mbytes of SDRAM-based memory, set up as separate image buffers and operated under the control of a Xilinx Virtex-II FPGA. The DEA implements an image-processing pipeline with 11-to-8-bit image companding, horizontal sub-framing, and lossless predictive or lossy JPEG compression. The pipeline can also interpolate colors from the Bayer-patterned raw image, and can reorder the image bits into a luminance/chrominance block format. The DEA's image-processing pipeline implemented in the Xilinx Virtex-II FPGA can run at the full image speed of camera head input.
The large, Flash-based image buffer permits image acquisition without use of rover memory resources at the maximum camera data rate. The SDRAM buffer is typically used as a scratchpad and to store file system information, but can also be used as a small image buffer.
All local DEA functions operate under the control of a MicroBlaze soft microprocessor implemented within the FPGA. All interface, compression, and timing functions are implemented as logic peripherals of the Microblaze soft processor core. The processor runs about 10,000 lines of code written in ANSI C.
You can read all about this fascinating programmable-logic application in a paper titled "Curiosity's Mars Hand Lens Imager (MAHLI) Investigation" written by Kenneth Edgett and a long list of contributing authors. The report contains extensive descriptions of all aspects of the MAHLI imaging system, far more than I can handle in a simple blog post.
Meanwhile, here's wishing Curiosity a quick and full recovery. It's a remarkable machine.
And, on a very related note, my good friend Jack Ganssle will be teaching the following class at DESIGN West in April: "Mars ate my Spacecraft." This is the latest, Mars-friendly version of Jack's talk on embedded firmware quality and how the lack of it gets us into all kinds of trouble. Very timely and highly recommended.
But wait, there's more, because Max -- our illustrious editor in chief here on All Programmable Planet (APP) -- will also be presenting a pertinent paper at DESIGN West: "Danger Will Robinson! How Radiation Can Affect Your Embedded Systems," which (Max assures me) will discuss things like radiation-induced SEUs in excruciating detail.
Editor's Note: One of the keynote speakers at the forthcoming DESIGN West Conference and Exhibition will be Luke Dubord -- an Avionics System Engineer at JPL. Luke was the system engineer on console for both MSL launch and Entry Descent and Landing, which involved every pyrotechnic device firing correctly to land Curiosity on Mars. Luke's keynote presentation will be open to all attendees, including those holding Free Expo Only passes (bounce over to the Registration Page for more details).
Related posts: