Hello,
Could Nordic clarify the supported deadline and recovery behavior of pcd_network_core_update() when the network core never changes its command status?
At sdk-nrf main d859511bfbbf30f8f8ba0e39e8cd89e90d57a812, network_core_pcd_cmdset() in subsys/pcd/src/pcd.c publishes the command and then waits in one-second busy-wait iterations while the status stays unchanged (lines 193-200). There is no deadline branch. When this runs before the application starts, for example from the bootloader, nothing in the application (such as a USB recovery path) can regain control. The NCS v3.4.1 release has the same loop (pcd.c lines 220-227 at the v3.4.1 tag).
The synchronous API documents success or an error code but no timeout (include/dfu/pcd.h lines 42-52). The asynchronous pcd_network_core_update_initiate() returns before completion (lines 54-68), and its finished-check timer handler also has no deadline (pcd.c lines 136-145).
Related earlier work and reports:
- sdk-nrf pull request 5580 (2021) proposed making pcd_network_core_update() optionally non-blocking; it was closed without merging: github.com/.../5580
- "nrf5340 net core upgrade": the update hangs in network_core_pcd_cmdset() while pcd_fw_copy_status_get() keeps returning 0: devzone.nordicsemi.com/.../nrf5340-net-core-upgrade
- "nrf5340 Serial recovery for the NET-core": devzone.nordicsemi.com/.../nrf5340-serial-recovery-for-the-net-core
- "Issue with nRF5340 Net core serial recovery": devzone.nordicsemi.com/.../issue-with-nrf5340-net-core-serial-recovery
These may have different causes; they are context for the wait contract, not proof of one common fault.
Questions:
1. Is an indefinite wait intended for an unresponsive network core, or would you accept a configurable or caller-selected deadline with an explicit timeout result?
2. What is the supported maximum time for the copy and for the version read, and which clock is usable before application entry?
3. What is the recovery contract for an interrupted copy? A safe timeout must stop the network core before returning ownership of the borrowed source or version buffer, restore the security domain, and define retry behavior for a partially copied destination. Replacing the busy-wait with a sleep, or returning after an arbitrary counter, would leave those ownership and recovery questions open.
We are asking rather than sending a patch, because a patch needs this contract first. sdk-nrf has GitHub issues disabled, so we are asking here. This comes from reading the source; nothing was built, measured or run on hardware.
This write-up was prepared with AI assistance and checked by me.