You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add SCB SFSR/SFAR bit field definitions and deprecate SAU duplicates (#278)
## Problem
SFSR and SFAR registers were incorrectly duplicated in both SCB and SAU
structures. Per ARM reference manuals, these belong to SCB at offset
0x0E4/0x0E8, not SAU.
## Changes
### Added SCB bit field definitions
- `SCB_SFSR_LSERR`, `SCB_SFSR_SFARVALID`, `SCB_SFSR_LSPERR`,
`SCB_SFSR_INVTRAN`, `SCB_SFSR_AUVIOL`, `SCB_SFSR_INVER`,
`SCB_SFSR_INVIS`, `SCB_SFSR_INVEP`
- Both `_Pos` and `_Msk` variants, matching existing SAU definitions
### Deprecated SAU definitions
- SAU structure members: `SAU->SFSR`, `SAU->SFAR` marked with
deprecation comments
- SAU bit fields: `SAU_SFSR_*` definitions marked deprecated
### Files affected
`core_cm33.h`, `core_cm35p.h`, `core_cm52.h`, `core_cm55.h`,
`core_cm85.h`, `core_starmc1.h`, `core_starmc3.h`
## Usage
```c
// New: Use SCB namespace (correct)
uint32_t fault_status = SCB->SFSR;
if (fault_status & SCB_SFSR_SFARVALID_Msk) {
uint32_t fault_addr = SCB->SFAR;
}
// Old: SAU namespace (deprecated, still works)
uint32_t fault_status = SAU->SFSR; // deprecated: use SCB->SFSR
if (fault_status & SAU_SFSR_SFARVALID_Msk) { // deprecated: use SCB_SFSR_SFARVALID_Msk
uint32_t fault_addr = SAU->SFAR; // deprecated: use SCB->SFAR
}
```
All SAU definitions remain functional for backward compatibility.
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/ARM-software/CMSIS_6/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JonatanAntoni <25795816+JonatanAntoni@users.noreply.github.com>
0 commit comments