# MISRA Deviation Record

| Field            | Value                          |
|------------------|--------------------------------|
| Deviation ID     | DEV-[XXX]                      |
| Date             | [YYYY-MM-DD]                   |
| Author           | [Name]                         |

---

## 1. Rule

| Field             | Value                                              |
|-------------------|----------------------------------------------------|
| Rule number       | [e.g. Rule 11.3]                                   |
| Category          | [Required / Advisory / Mandatory]                  |
| Rule text         | [Exact text of the MISRA rule]                     |
| Standard          | [MISRA C:2012 / MISRA C:2023]                      |

## 2. Location

| Field             | Value                                              |
|-------------------|----------------------------------------------------|
| File              | [e.g. src/drivers/watchdog.c]                      |
| Line(s)           | [e.g. 142-145]                                     |
| Function          | [e.g. wdg_set_timeout()]                           |
| Git commit        | [commit hash]                                      |
| Gitea reference   | [PR link or issue link]                            |

## 3. Rationale

[Why is the deviation technically acceptable in this specific case?]

Possible rationales:
- Hardware access requires type conversion
- Compiler-specific behaviour is defined and tested
- Alternative implementation would be disproportionately complex
- Rule is not safety-relevant in this context

**Specific rationale:** [Fill in here]

## 4. Risk assessment

| Aspect                    | Assessment                                    |
|---------------------------|-----------------------------------------------|
| Safety relevance          | [None / Low / Medium / High]                  |
| Fault potential           | [Description of potential faults]             |
| Mitigation                | [Which tests / measures cover the code]       |
| Residual risk             | [Assessment of the residual risk]             |

## 5. Reference to deviation permit

| Field                 | Value                                         |
|-----------------------|-----------------------------------------------|
| Permit exists         | [Yes / No]                                    |
| Permit ID             | [PER-XXX or "n/a"]                            |

If no permit exists: this deviation is a single-case approval.

## 6. Approval

| Field             | Value                                              |
|-------------------|----------------------------------------------------|
| Approved by       | [Name, role]                                       |
| Date              | [YYYY-MM-DD]                                       |
| Evidence          | [Gitea PR approval / signature]                    |

---

*This record is kept in the repository under `docs/misra/` or as a Gitea issue.*
