Skip to content

Commit f90a54f

Browse files
grochunordicjm
authored andcommitted
nfc: add support for non-secure build targets for nRF54L15
The NFC Platform code didn't support non-secure targets on SoCs where FICR belongs to the non-secure address space e.g. nRF54. This commit fixes it by further specifying compile-time conditions. Ref. NCSDK-31913 Signed-off-by: Michał Grochala <[email protected]>
1 parent f96fa79 commit f90a54f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ Networking samples
318318
NFC samples
319319
-----------
320320

321-
|no_changes_yet_note|
321+
* :ref:`record_text` sample:
322+
323+
* Added support for the ``nrf54l15dk/nrf54l15/cpuapp/ns`` board target.
322324

323325
nRF5340 samples
324326
---------------

samples/nfc/record_text/sample.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tests:
1414
- nrf54l15dk/nrf54l05/cpuapp
1515
- nrf54l15dk/nrf54l10/cpuapp
1616
- nrf54l15dk/nrf54l15/cpuapp
17+
- nrf54l15dk/nrf54l15/cpuapp/ns
1718
platform_allow:
1819
- nrf52840dk/nrf52840
1920
- nrf52dk/nrf52832
@@ -23,6 +24,7 @@ tests:
2324
- nrf54l15dk/nrf54l05/cpuapp
2425
- nrf54l15dk/nrf54l10/cpuapp
2526
- nrf54l15dk/nrf54l15/cpuapp
27+
- nrf54l15dk/nrf54l15/cpuapp/ns
2628
tags:
2729
- ci_build
2830
- sysbuild

subsys/nfc/lib/platform.c

+7-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ nrfx_err_t nfc_platform_setup(nfc_lib_cb_resolve_t nfc_lib_cb_resolve, uint8_t *
142142

143143
static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3])
144144
{
145-
#ifdef CONFIG_TRUSTED_EXECUTION_NONSECURE
145+
#if defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) && defined(NRF_FICR_S)
146+
/* If the NFC Platform code is built for the non-secure target and FICR
147+
* registers belong to the secure address space on the SoC, the NFC tag UID
148+
* needs to be read through secure services.
149+
*/
146150
#if defined(CONFIG_BUILD_WITH_TFM)
147151
uint32_t err = 0;
148152
enum tfm_platform_err_t plt_err;
@@ -163,14 +167,14 @@ static nrfx_err_t nfc_platform_tagheaders_get(uint32_t tag_header[3])
163167

164168
#else
165169
#error "Cannot read FICR NFC Tag Header in current configuration"
166-
#endif
170+
#endif /* defined(CONFIG_BUILD_WITH_TFM) */
167171
#else
168172

169173
tag_header[0] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 0);
170174
tag_header[1] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 1);
171175
tag_header[2] = nrf_ficr_nfc_tagheader_get(NRF_FICR, 2);
172176

173-
#endif /* CONFIG_TRUSTED_EXECUTION_NONSECURE */
177+
#endif /* defined(CONFIG_TRUSTED_EXECUTION_NONSECURE) && defined(NRF_FICR_S) */
174178

175179
return NRFX_SUCCESS;
176180
}

0 commit comments

Comments
 (0)