west: runners: nrf: Document why the network core is recovered first

The network core needs to be recovered first due to the fact that
recovering it erases both the network and application cores' flash
memory. This means that the little flash image that is programmed during
the recover operation would be lost for the app core if we inverted the
order.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2023-10-03 14:03:56 +02:00 committed by Fabio Baltieri
commit 2332a1db39

View file

@ -227,6 +227,11 @@ class NrfBinaryRunner(ZephyrBinaryRunner):
else:
self.logger.info('Recovering and erasing all flash memory.')
# The network core needs to be recovered first due to the fact that
# recovering it erases the flash of *both* cores. Since a recover
# operation unlocks the core and then flashes a small image that keeps
# the debug access port open, recovering the network core last would
# result in that small image being deleted from the app core.
if self.family == 'NRF53_FAMILY':
self.exec_op('recover', core='NRFDL_DEVICE_CORE_NETWORK')