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
Copy file name to clipboardExpand all lines: docs/Targets.md
+67-1Lines changed: 67 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2997,15 +2997,81 @@ The bootloader includes the Flash Configuration Field (FCF) at address 0x400-0x4
2997
2997
- Flash protection: All regions unprotected
2998
2998
- Backdoor key access: Enabled
2999
2999
3000
+
**CRITICAL WARNING:** The FCF region at 0x400-0x40F controls device security settings. Writing incorrect values can **permanently lock the device**, making it irrecoverable. The wolfBoot HAL includes protection to prevent accidental writes to this region.
3001
+
3002
+
### NXP S32K1XX: Recovering a Locked/Unresponsive Device
3003
+
3004
+
If your S32K device becomes locked or unresponsive (e.g., stuck in reset with D1 LED illuminated on S32K-EVB boards), try these recovery procedures:
3005
+
3006
+
**Symptoms of a locked device:**
3007
+
- Debugger cannot connect ("Soft reset failed", "Failed to enter debug mode")
3008
+
- Device stuck in reset (D1 LED constantly on for S32K-EVB)
3009
+
- J-Link reports "Readout protection is set" at address 0x400-0x40F
If software recovery fails, some devices support hardware-based recovery:
3041
+
1. Hold the device in reset while connecting debugger
3042
+
2. Use SWD low-level commands to issue mass erase
3043
+
3. Some debuggers have "recovery mode" options that hold reset during connection
3044
+
3045
+
**Prevention:**
3046
+
3047
+
The wolfBoot HAL includes FCF write protection that prevents `hal_flash_write()` from modifying the 0x400-0x40F region. This protection is always enabled to prevent accidental device locking.
3048
+
3049
+
### NXP S32K1XX: Configuration Options
3050
+
3051
+
The following build options are available for the S32K1xx HAL:
3052
+
3053
+
| Option | Description |
3054
+
|--------|-------------|
3055
+
|`WOLFBOOT_RESTORE_CLOCK`| Restore clock to SIRC (8 MHz) before booting application. Recommended for applications that configure their own clocks. |
3056
+
|`WOLFBOOT_DISABLE_WATCHDOG_ON_BOOT`| Keep watchdog disabled when jumping to application. By default, the watchdog is re-enabled before boot since it is enabled out of reset. |
3057
+
|`WATCHDOG`| Enable watchdog during wolfBoot operation. Recommended for production. |
3058
+
|`WATCHDOG_TIMEOUT_MS`| Watchdog timeout in milliseconds when `WATCHDOG` is enabled (default: 1000ms). |
0 commit comments