Home    Bloggers    Messages    Resources
Tw  |  Fb  |  In  |  Rss
Ryszard Milewicz

Safe Software Requires MCU Component Testing

Ryszard Milewicz
Newest First   Oldest First   Threaded View
Page 1 / 3   >   >>
Ryszard Milewicz
Ryszard Milewicz
2/26/2013 6:32:05 PM
User Rank
Blogger
Re: Testing code values
JKVASAN, thanks for sharing your experience. For testing standard patterns 0xAA, 0x55 are better because for 0xA5, 0x5A two middle bits have the same level.

50%
50%
Ryszard Milewicz
Ryszard Milewicz
2/26/2013 6:26:58 PM
User Rank
Blogger
Re: Testing code values
ISO standard sets minimum requirements, parts of MCU can be tested for other failures. For Class C compliance busses must be checked for DC faults, hence crosstalks, shorts between lines etc. This can be done e.g. using data exchange protocol which can detect such failures.

50%
50%
jkvasan
jkvasan
2/25/2013 8:05:35 PM
User Rank
Blogger
Re: Testing code values
RM I was testing a renesas promotional kit. It had a nice communication interface at Pc end. We could see what goes and comes. I was watching it out of curiosity and found a pattern like 0xA5,0x5A are sent. I found this a novel approach and felt it could be more helpful.

100%
0%
BitBucket
BitBucket
2/25/2013 7:41:55 PM
User Rank
Blogger
Re: Testing code values
I would be interested in better understanding the failure modes that we should test for. Stuck at faults need to be covered, but how about pattern related failures? On bus interfaces it is helpful to try a single 1 with the rest zeros and a single 0 with the rest 1's so you can check for noise (or marginal power rails). Do we just do stuck-at faults or also some dynamic tests?

100%
0%
Ryszard Milewicz
Ryszard Milewicz
2/25/2013 6:01:23 PM
User Rank
Blogger
Re: Testing code values
Davidmicro, AN11208 from NXP can be adopted to other Cortex MCUs

In Microchip library registers are tested in similar way like in NXP library:

; Test WREG0 && WREG1 registers
   MOV #0xAAAA,W0
   MOV #0xAAAA,W1
   CP W0, W1
   BRA NZ, Error

   MOV #0x5555,W0
   MOV #0x5555,W1
   CP W0, W1
   mov #CPU_REGISTER_TEST_FAIL, w1
   BRA NZ, Error

50%
50%
Ryszard Milewicz
Ryszard Milewicz
2/25/2013 5:17:33 PM
User Rank
Blogger
Re: Validation
MicroPower, this standard is intended for safety-critical devices which can cause injures to people. It is important to prevent any unsafe situation, so MCU components must be tested during execution of program to assure right operation of MCU. Even if probability of MCU components failure is low, it is not zero and safety of people is most important.

50%
50%
Ryszard Milewicz
Ryszard Milewicz
2/25/2013 5:08:00 PM
User Rank
Blogger
Re: Fake Component
To comply with standard, tests must detect failures described in document. Methods can be different.

Most important is to prevent unsafe situation, so if failure of some part of MCU or other component is detected, system should go into safe state. This is made usually by breaking current procedure and switching off loads like heaters, motors etc.

50%
50%
Ryszard Milewicz
Ryszard Milewicz
2/25/2013 4:59:54 PM
User Rank
Blogger
Re: Standard for testing programmable systems
IEC61508 is also applicable to medical devices, but main document there is IEC62304. It is a harmonised standard for software design in medical products. Software is divided in 3 classes: A, B and C. This classification is based on the potential to create a hazard that could result in an injury to the user, the patient or other people.

There are also further standards: IEC60601 - general requirements for safety, , ISO14971 risk management, IEC13485 quality management.

50%
50%
MicroPower
MicroPower
2/24/2013 11:23:04 PM
User Rank
Program Manager
Validation
All these testing must have been done by the validation team of the company that made the MCUs. The ones in production are supposed to undergo similar production test. I'm not sure we have to duplicate these processes.

If I buy a new truck, I would right away put it in good use, either hauling or towing, instead of going back to the garage and test every mechanical component, etc..

50%
50%
BitBucket
BitBucket
2/23/2013 7:59:20 PM
User Rank
Blogger
Re: Fake Component
Thanx for the sample code. It is a big head start on development when vendors can provide examples.

Would it be possible to do testing that doesn't just do a register at a time. How about coding up some operations that, like a hamming code, would tell you what the failure is without doing individual test. Also- is it important to know where the failure is, or just if there is a failure?

50%
50%
Page 1 / 3   >   >>
More Blogs from Ryszard Milewicz
Minimizing an MCU design's power consumption requires more than simply choosing a low-power MCU.
In the last of a series on safety-related design, Ryszard discusses the unique features that Class C safety testing requires.
Designing safe MCU-based systems requires the right software architectural development.
Many MCU-based designs must ensure the safety of users. IEC standards describe how.
flash poll
MC on twitter
like us on facebook
Microcontroller Central    About Us     Contact Us     Help     Register     Twitter     Facebook     RSS