Skip to content

Conversation

@ankuns
Copy link
Contributor

@ankuns ankuns commented May 5, 2025

This PR brings in a temperature compensation feature for the nrf2220 Front-End Module allowing better accuracy of output power setting.

The API exposed by the MPSL https://github.com/nrfconnect/sdk-nrfxlib/blob/main/mpsl/fem/nrf2220/include/protocol/mpsl_fem_nrf2220_protocol_api.h
is used.

The nRF2220 temperature compensation feature is enabled by the new Kconfig option
MPSL_FEM_NRF2220_TEMPERATURE_COMPENSATION.
The temperature is provided by either taking the SoC temperature (default) Kconfig option MPSL_FEM_NRF2220_TEMPERATURE_SOURCE_SOC or is provided by user MPSL_FEM_NRF2220_TEMPERATURE_SOURCE_CUSTOM.

The feature requires a i2c_nrfx_twim driver extension covered by PR nrfconnect/sdk-zephyr#2585 (already in sdk-zephyr). This extension provides just the ability to take exclusive access to the TWIM bus. Extending the i2c_nrfx_twim driver in upstream was considered inappropriate. It was agreed that whil having exclusive access to the i2c bus, the feature will use the nrfx_twim driver directly.

Note: This is a new PR for #20960 that has been partially reviewed (closed by bot NordicBuilder), I can't reopen that PR.

@ankuns ankuns requested review from e-rk and piotrkoziar May 5, 2025 10:28
@ankuns ankuns requested review from a team as code owners May 5, 2025 10:28
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label May 5, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented May 5, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 5

Inputs:

Sources:

sdk-nrf: PR head: 46ef7329fc7bcf319ae3244181b12b47017c70c6

more details

sdk-nrf:

PR head: 46ef7329fc7bcf319ae3244181b12b47017c70c6
merge base: 363445b47f552b6c90152223fcce230d78f447f4
target head (main): a6d9606fef70aa3b2f6414f34091e0886d946efe
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 (8)
doc
│  ├── nrf
│  │  ├── app_dev
│  │  │  ├── device_guides
│  │  │  │  ├── fem
│  │  │  │  │  │ fem_nrf2220.rst
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
lib
│  ├── fem_al
│  │  │ fem_al.c
subsys
│  ├── mpsl
│  │  ├── fem
│  │  │  ├── Kconfig
│  │  │  ├── common
│  │  │  │  ├── include
│  │  │  │  │  │ mpsl_fem_twi_drv.h
│  │  │  │  │ mpsl_fem_twi_drv.c
│  │  │  ├── nrf2220
│  │  │  │  │ mpsl_fem_nrf2220.c
│  │  │  ├── nrf2240
│  │  │  │  │ mpsl_fem_nrf2240.c

Outputs:

Toolchain

Version: 1d2c5d0ab5
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:1d2c5d0ab5_8bf7ca4353

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 27
  • ✅ Integration tests
    • ✅ test_ble_nrf_config
    • ✅ test-fw-nrfconnect-ble_samples
    • ✅ test-fw-nrfconnect-chip
    • ✅ test-fw-nrfconnect-rs
    • ✅ test-fw-nrfconnect-fem
    • ✅ test-fw-nrfconnect-thread
    • ✅ test-sdk-find-my
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-tfm
    • test-low-level
    • test-sdk-audio
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

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

@ankuns ankuns force-pushed the nrf2220_temperature_compensation branch from 89dd65d to d549926 Compare May 5, 2025 10:34
Copy link
Contributor

@grochu grochu left a comment

Choose a reason for hiding this comment

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

Looks good from the Muffin point of view

@github-actions
Copy link

github-actions bot commented May 5, 2025

@ankuns ankuns force-pushed the nrf2220_temperature_compensation branch from d549926 to 33a016d Compare May 5, 2025 11:02
@ankuns ankuns force-pushed the nrf2220_temperature_compensation branch from 33a016d to c6cfd4e Compare May 5, 2025 11:56
Copy link
Contributor

Choose a reason for hiding this comment

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

alignment of these are all off

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

ankuns added 3 commits May 6, 2025 11:49
For the nRF2220 the temperature compensation feature is added.
It allows to achieve better output power accuracy among the whole
supported temperature range.

The feature is enabled by the MPSL_FEM_NRF2220_TEMPERATURE_COMPENSATION
Kconfig option. It relies on functions provided by MPSL in the
sdk-nrfxlib.
The temperature source can be taken from the SoC or can be set
by custom implementation.

Signed-off-by: Andrzej Kuros <[email protected]>
The nRF2220 temperature compensation is recently added.
The protocols relying on the fem_al do not use the MPSL scheduler.
In this case the function
`mpsl_fem_nrf2220_temperature_changed_update_now` must be called
by a protocol driver which for this case is the fem_al.

Signed-off-by: Andrzej Kuros <[email protected]>
The changelog entry is added.

Signed-off-by: Andrzej Kuros <[email protected]>
@ankuns ankuns force-pushed the nrf2220_temperature_compensation branch from c6cfd4e to 46ef732 Compare May 6, 2025 09:49
@nordicjm nordicjm merged commit 74cc2c9 into nrfconnect:main May 6, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants