Skip to content

Conversation

@degjorva
Copy link
Contributor

@degjorva degjorva commented Dec 4, 2025

Fix alignment of src data in sx_wrpkmem.
In some situations there would be unaligned data in ram. This would could cause a USAGE FAULT to appear.
Change it to use memcpy to read from src to guarante alignment.

Fix alignment of src data in sx_wrpkmem.
In some situations there would be unaligned data in ram.
This would could cause a USAGE FAULT to appear.
Change it to use memcpy to read from src to guarante
alignment.

Signed-off-by: Dag Erik Gjørvad <[email protected]>
Copilot AI review requested due to automatic review settings December 4, 2025 12:20
@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 4, 2025
Copilot finished reviewing on behalf of degjorva December 4, 2025 12:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an alignment issue in the sx_wrpkmem function for nRF54LM20A that could cause USAGE FAULT errors when source data is unaligned in RAM.

Key changes:

  • Replaced problematic pointer arithmetic with cleaner cast-and-add operations
  • Introduced memcpy to safely read from potentially unaligned source addresses
  • Added documentation clarifying the alignment guarantees

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@NordicBuilder
Copy link
Contributor

NordicBuilder commented Dec 4, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 3

Inputs:

Sources:

sdk-nrf: PR head: 4647d0b35a62989ae3ef326b4bb2d67471fbdba3

more details

sdk-nrf:

PR head: 4647d0b35a62989ae3ef326b4bb2d67471fbdba3
merge base: d40e9dc6b0f875c98a8a1425f106391866dd043f
target head (main): d0f84cb57d7e07a99e2cd487eeb8c0503dd579de
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (1)
subsys
│  ├── nrf_security
│  │  ├── src
│  │  │  ├── drivers
│  │  │  │  ├── cracen
│  │  │  │  │  ├── silexpk
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ iomem.c

Outputs:

Toolchain

Version: 43683a87ea
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:43683a87ea_5ea73affbf

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 2571
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-nrf_crypto
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-tfm
    • ✅ test-sdk-find-my
    • ✅ test-sdk-mcuboot
    • ✅ test-sdk-dfu
    • ⚠️ test_ble_nrf_config
    • ⚠️ test-fw-nrfconnect-nrf-iot_cloud
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_mosh
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • desktop52_verification
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-ps-main
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-thread-main
    • test-low-level
    • test-sdk-audio
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@degjorva degjorva removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Dec 4, 2025
@shanthanordic shanthanordic added this to the 3.2.1 milestone Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants