Jump to content

cwxpro

Member
  • Posts

    5
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

cwxpro's Achievements

Enthusiast

Enthusiast (2/11)

0

Reputation

  1. Bugs in code are common. Neither is hardware perfect. These are opinions. Chacun a son gout. You might find this interesting, or not. If you wish to verify, Case No. CJ-2008-7969, District Court of Oklahoma County, State of Oklahoma. ........................................................................................................................................................................................................................................................................ Toyota's killer firmware: Bad design and its consequences Michael Dunn -October 28, 2013 119 Comments inShare329 Save FollowPRINTPDFEMAIL On Thursday October 24, 2013, an Oklahoma court ruled against Toyota in a case of unintended acceleration that lead to the death of one the occupants. Central to the trial was the Engine Control Module's (ECM) firmware. Embedded software used to be low-level code we'd bang together using C or assembler. These days, even a relatively straightforward, albeit critical, task like throttle control is likely to use a sophisticated RTOS and tens of thousands of lines of code. With all this sophistication, standards and practices for design, coding, and testing become paramount – especially when the function involved is safety-critical. Failure is not an option. It is something to be contained and benign. So what happens when an automaker decides to wing it and play by their own rules? To disregard the rigorous standards, best practices, and checks and balances required of such software (and hardware) design? People are killed, reputations ruined, and billions of dollars are paid out. That's what happens. Here's the story of some software that arguably never should have been. Check out this related EE Live! 2014 session:Killer Apps: Embedded Software's Greatest Hit Jobs For the bulk of this research, EDN consulted Michael Barr, CTO and co-founder of Barr Group, an embedded systems consulting firm, last week. As a primary expert witness for the plaintiffs, the in-depth analysis conducted by Barr and his colleagues illuminates a shameful example of software design and development, and provides a cautionary tale to all involved in safety-critical development, whether that be for automotive, medical, aerospace, or anywhere else where failure is not tolerable. Barr is an experienced developer, consultant, former professor, editor, blogger, and author. Barr's ultimate conclusions were that: Toyota’s electronic throttle control system (ETCS) source code is of unreasonable quality. Toyota’s source code is defective and contains bugs, including bugs that can cause unintended acceleration (UA). Code-quality metrics predict presence of additional bugs. Toyota’s fail safes are defective and inadequate (referring to them as a “house of cards” safety architecture). Misbehaviors of Toyota’s ETCS are a cause of UA. A damning summary to say the least. Let's look at what lead him to these conclusions: Hardware Although the investigation focused almost entirely on software, there is at least one HW factor: Toyota claimed the 2005 Camry's main CPU had error detecting and correcting (EDAC) RAM. It didn't. EDAC, or at least parity RAM, is relatively easy and low-cost insurance for safety-critical systems. Other cases of throttle malfunction have been linked to tin whiskers in the accelerator pedal sensor. This does not seem to have been the case here. The Camry ECM board. U2 is a NEC (now Renesas) V850 microcontroller. Software The ECM software formed the core of the technical investigation. What follows is a list of the key findings. Mirroring (where key data is written to redundant variables) was not always done. This gains extra significance in light of … Stack overflow. Toyota claimed only 41% of the allocated stack space was being used. Barr's investigation showed that 94% was closer to the truth. On top of that, stack-killing, MISRA-C rule-violating recursion was found in the code, and the CPU doesn't incorporate memory protection to guard against stack overflow. Two key items were not mirrored: The RTOS' critical internal data structures; and—the most important bytes of all, the final result of all this firmware—the TargetThrottleAngle global variable. Although Toyota had performed a stack analysis, Barr concluded the automaker had completely botched it. Toyota missed some of the calls made via pointer, missed stack usage by library and assembly functions (about 350 in total), and missed RTOS use during task switching. They also failed to perform run-time stack monitoring. Toyota's ETCS used a version of OSEK, which is an automotive standard RTOS API. For some reason, though, the CPU vendor-supplied version was not certified compliant. Unintentional RTOS task shutdown was heavily investigated as a potential source of the UA. As single bits in memory control each task, corruption due to HW or SW faults will suspend needed tasks or start unwanted ones. Vehicle tests confirmed that one particular dead task would result in loss of throttle control, and that the driver might have to fully remove their foot from the brake during an unintended acceleration event before being able to end the unwanted acceleration. A litany of other faults were found in the code, including buffer overflow, unsafe casting, and race conditions between tasks.
  2. AFM ... is a misnomer in that it is the valves that are controlled, and only indirectly, fuel. It is the stepchild of a General Motors attempt called DOD ... displacement on demand ... to produce an engine that would run well with selected cylinders shut down. The first version was tried on V8 Cadillacs in 1981. it was an enormous and embarrassing failure. Not long after GM fielded AFM, trouble began again. Couple of examples. Google for more. ........................................................................................................................................................................................................................................ http://partsblog.olathetoyota.com/4920/gmc-chevy-afm-oil-consumption/ ........................................................................................................................................................................................................................................ Plug the Vin in here to see if it's covered. https://recalls.gm.com/#/ ........................................................................................................................................................................................................................................ AFM uses computer driven solenoids under the valley cover to control valve action by turning on or off, engine oil under system pressure, to the valve lifters. GM doesn't release failure statistics but it appears about 52,000 trucks may have been affected. If the ECM program is faulty and signals the solenoids at the wrong time, it will damage lifters and bend valves. There would be damaging heat buildup and other stress effects as well. Or, the valves wouldn't open when they should. If this went on for sufficient time, pressure and reduced oil supply could result in flattened cam lobes and lifter damage. There are numerous possibilities. Horribly dirty oil ... wrong viscosity and service (additive package) oil ... air in the oil delivery system and lifters ... pushrod blockage and damage ... damaged rocker arms ... all could account for your symptoms ... but the ECM is most likely root cause. Some component pictures here: https://www.google.com/#q=displacement+on+demand This is a widespread and serious problem and given their culpability in the Cobalt ignition matter ... they have tried to minimize its damage by being as quiet about it as possible. But they have to fear a class-action suit ... so they are undoubtedly making an effort to resolve it ... You should find out what it is and what they intend to do about it. Good luck,You'll find it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.