Updated

The pilots on NASA's last space shuttle flight fixed another one of their main computers Friday after it failed and set off an alarm that shattered their sleep.

NASA declared all five of Atlantis' primary computers to be working, pending evaluation of the latest shutdown.

Computer failures like this are extremely rare in orbit, said lead flight director Kwatsi Alibaruho. The two problems appear to be quite different, he noted. The first was caused by a bad switch throw; the second possibly by cosmic radiation.

"The fact that we did have two computer failures on a same flight on a spacecraft that's otherwise performing beautifully, that's not at all lost on me," Alibaruho told reporters.

"I do have a saying that you're not paranoid if they really are after you, so I am cautiously optimistic that we'll have a healthy data-processing system" for Atlantis' undocking and return to Earth next week, he added. "But we will be watching closely."

Atlantis' commander, Christopher Ferguson, said the alarm sounded an hour or so after the four astronauts had gone to bed, during the deepest part of their sleep.

"We all woke up and looked at one another, and we were wondering really what was going on," he said in an interview with The Associated Press on Friday morning. The astronauts rushed to the flight deck and switched to a backup computer. Within a half-hour they were back in bed.

The first computer failure occurred just before Sunday's docking by Atlantis to the International Space Station. New software loads took care of both problems, at least for now.

The five computers are critical for a space shuttle's return to Earth -- so crucial that multiple shutdowns, in certain circumstances, could prompt an early return home. Atlantis is due to make the last landing of the 30-year space shuttle era next Thursday.

President Barack Obama made note of the historic journey Friday in a call from the Oval Office to space. He thanked everyone at NASA and the "thousands who have poured their hearts and souls into America's shuttle program over the last three decades."

Ferguson told the president that the 10 space travelers will mark the occasion right before the hatches close between the two craft early next week. He will hand over a U.S. flag that flew on the very first shuttle flight in 1981 -- and returned to orbit aboard Atlantis. The flag will remain aboard the outpost until Americans are launched again from U.S. soil by one of the private companies competing to develop a spacecraft to replace the shuttle.

"I understand it's going to be sort of like a capture-the-flag moment here for commercial spaceflight," Obama replied, "so good luck to whoever grabs that flight."

Ferguson said he hopes it happens soon. NASA estimates five years.

On Friday night, the shuttle crew was awakened to "Run the World (Girls)" by Beyonce who also recorded a special message that singled out Sandy Magnus, the last woman shuttle astronaut.

Obama's intent for U.S. space exploration, post shuttle, is to put orbital launches in the hands of private companies, and get NASA working on human expeditions to an asteroid and Mars.

Earlier in the day, Ferguson and his co-pilot, Douglas Hurley, told reporters they're still too busy moving items back and forth between the linked Atlantis and space station to dwell on the looming end of the shuttle program. The shuttle delivered several tons of food, clothes and other household goods for the station; it will return loaded with old station equipment and trash.

The topic came up at Thursday's special all-American dinner of grilled chicken, barbecued beef, baked beans, corn and Hostess apple pie. Ferguson said he told the nine other space fliers, "Hey, you know, this is the last joint meal that we're ever going to have aboard a space shuttle."

"It's a little bit of a sobering, somber moment," Ferguson said. "But at the same time, we're extremely fortunate to have had 37 missions, I think, to the International Space Station now, so we're very lucky to have done this."

Hurley said his most memorable moment of the 13-day mission, so far, was seeing the faces of the two spacewalking astronauts who were outside, just a few feet away, as he operated the robot arm during Tuesday's spacewalk, the last one of the shuttle program.

"It really seemed like it was out of a science fiction movie," he said. "You could see the expression on their faces."

Another highlight for Hurley: an "incredible" aurora australis, or southern lights, on Thursday night.

The shuttle crew got another recorded celebrity call Friday, this time from musician Paul McCartney. The wake-up music was "Good Day Sunshine" by the Beatles.