From 7ba854f43e524e6cae725600221ebc82a68d8a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Fri, 19 Sep 2025 10:43:07 +0200 Subject: [PATCH 1/3] manifest: Update sdk-zephyr revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update sdk-zephyr to add nrf-802154 API migration code. Signed-off-by: Rafał Kuźnia --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 90fa9136c877..89a2ce0e6a87 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: d792280a1c8639ac103ce0dd094f8d5dd4e5377d + revision: 9d15425c577ccc4e261fe68e29b8273ce5d468bf import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above From 2eda5e7d7b5b0aed6054fa48b7a1865f59d3a91a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Fri, 19 Sep 2025 10:41:30 +0200 Subject: [PATCH 2/3] openthread: platform: Add temporary API migration code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The transmit functions will return an error code, instead of a boolean value. To prepare for this, the API calls are temporarily implemented in two variants, for old and new API declarations. The presence of new API will be detected by the use of NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE macro, which will be unconditionally defined by a newer nrf-802154 driver. Signed-off-by: Rafał Kuźnia --- modules/openthread/platform/radio_nrf5.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/openthread/platform/radio_nrf5.c b/modules/openthread/platform/radio_nrf5.c index 5ed272676718..1048a2e376d1 100644 --- a/modules/openthread/platform/radio_nrf5.c +++ b/modules/openthread/platform/radio_nrf5.c @@ -680,7 +680,13 @@ static bool nrf5_tx(const otRadioFrame *frame, uint8_t *payload, bool cca) }, }; +#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE + nrf_802154_tx_error_t result = nrf_802154_transmit_raw(payload, &metadata); + + return result == NRF_802154_TX_ERROR_NONE; +#else return nrf_802154_transmit_raw(payload, &metadata); +#endif } #if NRF_802154_CSMA_CA_ENABLED @@ -702,7 +708,14 @@ static bool nrf5_tx_csma_ca(otRadioFrame *frame, uint8_t *payload) }; nrf_802154_csma_ca_max_backoffs_set(frame->mInfo.mTxInfo.mMaxCsmaBackoffs); + +#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE + nrf_802154_tx_error_t result = nrf_802154_transmit_csma_ca_raw(payload, &metadata); + + return result == NRF_802154_TX_ERROR_NONE; +#else return nrf_802154_transmit_csma_ca_raw(payload, &metadata); +#endif } #endif @@ -738,7 +751,13 @@ static bool nrf5_tx_at(otRadioFrame *frame, uint8_t *payload) nrf5_data.tx.frame.mInfo.mTxInfo.mTxDelay) / NSEC_PER_USEC); +#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE + nrf_802154_tx_error_t result = nrf_802154_transmit_raw_at(payload, tx_at, &metadata); + + return result == NRF_802154_TX_ERROR_NONE; +#else return nrf_802154_transmit_raw_at(payload, tx_at, &metadata); +#endif } static void handle_frame_received(otInstance *aInstance) From 50aed3ba8ee4775f0ca8798dc7fa1807bc7ae983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Fri, 19 Sep 2025 10:42:18 +0200 Subject: [PATCH 3/3] samples: peripheral: 802154_phy_test: Add API migration code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The transmit functions will return an error code, instead of a boolean value. To prepare for this, the API calls are temporarily implemented in two variants, for old and new API declarations. The presence of new API will be detected by the use of NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE macro, which will be unconditionally defined by a newer nrf-802154 driver. Signed-off-by: Rafał Kuźnia --- samples/peripheral/802154_phy_test/src/rf_proc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/peripheral/802154_phy_test/src/rf_proc.c b/samples/peripheral/802154_phy_test/src/rf_proc.c index 2cd044633d54..f5c611d294fd 100644 --- a/samples/peripheral/802154_phy_test/src/rf_proc.c +++ b/samples/peripheral/802154_phy_test/src/rf_proc.c @@ -480,7 +480,11 @@ bool ptt_rf_send_packet_ext(const uint8_t *pkt, ptt_pkt_len_t len, bool cca) .frame_props = NRF_802154_TRANSMITTED_FRAME_PROPS_DEFAULT_INIT, .cca = cca }; +#ifdef NRF_802154_TX_FUNCTIONS_RETURN_ERROR_CODE + ret = nrf_802154_transmit_raw(temp_tx_pkt, &metadata) == NRF_802154_TX_ERROR_NONE; +#else ret = nrf_802154_transmit_raw(temp_tx_pkt, &metadata); +#endif } return ret;