Skip to content

Commit 154ebf6

Browse files
[nrf fromlist] nordic: nrf54h: bicrgen: patch lfosc lfxo accuracy parsing
The accuracy field of lfocs lfxo is incorrectly parsed from the SVD file. Instead of stripping the "ppm" from the value before converting it to an int, we are taking only the first three digits. This works for 500ppm, but not for 20ppm. Patch to strip last three digits instead. Upstream PR #: 100506 Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 32a0efc commit 154ebf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

soc/nordic/nrf54h/bicr/bicrgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def from_raw(cls: "LFXOConfig", bicr_spec: ET.Element, data: bytes) -> "LFXOConf
324324
raise ValueError("Invalid LFXO startup time (not configured)")
325325

326326
return cls(
327-
accuracy_ppm=int(lfosc_lfxoconfig.enum_get("ACCURACY")[:3]),
327+
accuracy_ppm=int(lfosc_lfxoconfig.enum_get("ACCURACY")[:-3]),
328328
mode=LFXOMode(lfosc_lfxoconfig.enum_get("MODE")),
329329
builtin_load_capacitors=builtin_load_capacitors,
330330
builtin_load_capacitance_pf=builtin_load_capacitance_pf,

0 commit comments

Comments
 (0)