DETROIT -- An Apple engineer who died when his Tesla Model X slammed into a concrete barrier had previously complained about the SUV malfunctioning on that same stretch of Silicon Valley freeway.

His complaints were detailed in a trove of documents released Tuesday by federal investigators in two Tesla crashes involving Autopilot, one in California and the other in Florida.

The National Transportation Safety Board is investigating the March 2018 crash that killed Walter Huang near Mountain View, California. It's also probing a crash in Delray Beach, Florida, that happened about a year later and killed driver Jeremy Banner.

The documents say Huang told his wife that Autopilot had previously veered his SUV toward the same barrier on U.S. 101 near Mountain View where he later crashed. Huang died at a hospital from his injuries.

"Walter said the car would veer toward the barrier in the mornings when he went to work," the Huang family's attorney wrote in a response to NTSB questions.

Records from an iPhone recovered from the crash site showed that Huang may have been using it before the accident. Records obtained from AT&T showed that data had been used while the vehicle was in motion, but the source of the transmissions couldn't be determined, the NTSB wrote. One transmission was less than a minute before the crash.

Huang had described Autopilot's previous malfunctioning to his brother, the Huang family attorney wrote, in addition to talking with a friend who owns a Model X. Huang, a software engineer, discussed with the friend how a patch to the Autopilot software affected its performance and made the Model X veer, according to the attorney.

The Huang family is suing Tesla and California's Department of Transportation for allegedly failing to maintain the highway.

Autopilot is a partially automated system designed to keep a vehicle in its lane and keep a safe distance from vehicles in front of it. It also can change lanes with driver approval. Tesla says Autopilot is intended to be used for driver assistance and that drivers must be ready to intervene at all times.

The full NTSB board is scheduled to hold a hearing on the Mountain View crash on Feb. 25. At that time, it will determine a cause and make safety recommendations.

NTSB staff members have already recommended that California transportation officials move faster to repair highway safety barriers damaged by vehicles.

A report from the agency says California officials failed to fix the barrier that was damaged in a crash 11 days before Huang was killed. In that incident, a 2010 Toyota Prius travelling over 75 mph (120 kmh) crashed against the attenuator, a cushion that protects vehicles from hitting the end of concrete lane dividers.

The California Highway Patrol responded to the March 12 crash but did not notify the state Department of Transportation of the damage as required, the NTSB said.

Huang's 2017 Tesla Model X was travelling at 71 mph (114 kph) when it crashed against the same attenuator, which the NTSB determined had been damaged and repaired more frequently than any other left-exit in Caltrans' District 4, which includes all of the San Francisco Bay Area.

In the three years before the Tesla crash, the device was struck at least five times, including one crash that resulted in fatalities. A car struck it again on May 20, 2018, about two months after the Tesla crash, the NTSB said.

NTSB first released some details from its investigation in September.

The California Department of Transportation said in a statement Tuesday that it has "identified and is implementing several steps to enhance monitoring and tracking of the repair of damage" to highway infrastructure.

"These efforts include updates to its policies and maintenance manual, training of staff, and enhanced reporting on the timely repair of high priority traffic safety devices," Caltrans said.

In the Florida crash, Banner turned on the Autopilot function of his Model 3 sedan 10 seconds before the crash, then took his hands off the steering wheel, NTSB documents said. The car then drove underneath a tractor-trailer that was crossing in front of it, sheering off the car's roof and killing Banner. It was eerily similar to another Florida crash in 2016 in which a Tesla on Autopilot went beneath a semi trailer.

The NTSB said in a preliminary report that it still hasn't determined the cause of the crash. According to the report, traffic was light on the four-lane highway and dawn was breaking when Banner, 50, set his speed at 69 mph (111 kph) and activated the autopilot as he headed to work. The speed limit was 55 mph (88 kph). Seconds later, a tractor-trailer driven by Richard Wood, 45, pulled from a driveway and began to cross to the other side of the highway.

Wood said he saw two sets of car headlights coming toward him, but he thought he had time to make it across. "It was dark and it looked like the cars was back further than they was," Wood told NTSB investigators four days after the crash.

A photo taken by the NTSB from Tesla's front-end video camera showed Wood's trailer fully blocking the road 1.5 seconds before the crash. Data from the Tesla's computer shows that Banner hit his brakes less than a second before the crash, but the car went under the trailer. Wood says he saw a second car but it didn't hit the trailer.

--------

Krisher reported from Detroit. Terry Spencer contributed from Orlando, Florida.