47 questions
2
votes
0
answers
145
views
Clarification on IEC 60730 Class B compliance for STM32G031xx and use of X-CUBE-CLASSB-G0 library
I’m currently working on an application using the STM32G031xx MCU and need to ensure IEC 60730 Class B compliance for safety-critical software. I found the X-CUBE-CLASSB-G0 (v4.0.0) library and have a ...
3
votes
1
answer
89
views
How to convert a function which failed MCDC to one that does?
According to Wiki (https://en.wikipedia.org/wiki/Modified_condition/decision_coverage) one of the main rules about MCDC is that each condition (or boolean variable) should be controllable ...
0
votes
0
answers
37
views
How to control multiple python scripts with respect to time and make the system failure proof
I need to run multiple Python scripts daily, which prepare and deliver critical data and stop the scripts after a predefined time. Then, run a different script (only one time) to achieve the generated ...
0
votes
2
answers
213
views
How to remove a message from watchdog when I close /dev/watchdog file
I use a hardware watchdog to monitor an activity of some process and reboot the system in case the process is hanged.
While the system is executing init.d scripts a watchdog utility is running. Later, ...
0
votes
5
answers
1k
views
Include .c instead of header(.h) - MISRA C
Is using #include "component.c" considered bad practice or is there any misra standard rule violation? (potentially rule 3-3-1)
So far, I understand that it is a commonly categorized as bad ...
-1
votes
1
answer
2k
views
How to understand the meaning of high level requirement and low level requirement in DO-178C? [closed]
DO-178C or DO-178B requires two level software requirements, that is, high-level requirements and low-level requirements.
But generally except the very small software, the hierarchy structure of most ...
7
votes
4
answers
4k
views
Python coding standard for Safety Critical Applications
Coming from C/C++ background, I am aware of coding standards that apply for Safety Critical applications (like the classic trio Medical-Automotive-Aerospace) in the context of embedded systems , such ...
3
votes
1
answer
591
views
C boolean invalid values handling [duplicate]
I'm in a safety critical embedded C project and there's a discussion about detecting memory corruptions (e.g. buffer overflows) in boolean variables. As everyone knows, in C, the "boolean" type is ...
3
votes
2
answers
596
views
Independence of software elements for IEC 61508 on CPU without memory protection unit
Is it possible to justify independence of software elements by IEC 61508, part 3, Annex F, such that the safety-related components can be rated SIL 2 and the non-safety components (e.g. UI, comms.) ...
-1
votes
1
answer
743
views
set default value for all uninitialized variables
I have a legacy code where there are like a zillion uninitialized
warning C4100: : unreferenced formal parameter
or potentially uninitialized:
warning C4701: potentially uninitialized local ...
2
votes
2
answers
3k
views
what is the safe way to convert double to int?
I have been given a legacy code, where someone(s) have carelessly assigned double values to int variables like:
int a = 10;
double b = 20;
a = b;
Now to get rid of the
warning C4244: '=': ...
3
votes
1
answer
189
views
How to implement a safety-critical AI compute cluster at the edge?
I want to experiment to develop a redundant autonomous car compute architecture which can handle all AI and other computing stuff. To do that, I bought some edge computing devices (Nvidia Jetson TX2s) ...
0
votes
2
answers
784
views
MISRA-2012 Rule 20.12 violation: misra_c_2012_rule_20_12_violation: macro parameter "val" is used in both expanded and raw forms
I've been facing this MISRA violation:
Definitions:
#define A (1UL << 10)
#define INIT_A ((A) | (1UL << 15))
#define INIT_A_MASK (0xFFFFUL << 15)
#...
-1
votes
2
answers
2k
views
How to fix mentioned MISRA-2012 10.4 and 10.9 violations issue in this code?
There are required pieces to formulate my problem.
Below are content of MyError.h header file.
myError.h
###########################
# myError.h
###########################
1 typedef enum
2 {
3 ...
1
vote
2
answers
663
views
How to Encode Boolean variable as 16 bit encoded value (Hamming Distance)
How shall a boolean variable be assigned 16-bit encoded values (e.g., Hamming code) to avoid false states due to bit flipping?