Skip to content

Comments

application: installer: added verification dealys infrastructre#654

Open
nvlsianpu wants to merge 1 commit intonrfconnect:mainfrom
nvlsianpu:cudo/ncsdk-37698
Open

application: installer: added verification dealys infrastructre#654
nvlsianpu wants to merge 1 commit intonrfconnect:mainfrom
nvlsianpu:cudo/ncsdk-37698

Conversation

@nvlsianpu
Copy link
Contributor

@nvlsianpu nvlsianpu commented Feb 19, 2026

ref.: NCSDK-37698

Added configurable infrastructure for delay NVM memory operation. These delay are needed for making detail testing of the instalation interrupts possible.

Kconfig added:

  • CONFIG_APP_BM_INSTALLER_SELF_DELAYS: Enable optional installer verification delays (testing).

  • CONFIG_APP_BM_INSTALLER_POST_METADATA_INVALIDATION_DELAY_MS: Delay [ms] after metadata invalidation, before image copy; emits LOG_INF "V_DELAY_POST_METADATA_INVALIDATION" before the delay.

  • CONFIG_APP_BM_INSTALLER_INTER_IMAGE_CHUNK_COPY_DELAY_MS: Delay [ms] between image chunk copies;
    emits LOG_INF "V_DELAY_IMAGE_CHUNK_COPY" before the delay.

  • CONFIG_APP_BM_INSTALLER_NEXT_IMAGE_COPY_DELAY_MS:
    Delay [ms] before next image copy;
    emits LOG_INF "V_DELAY_NEXT_IMAGE_COPY" before the delay.

  • CONFIG_APP_BM_INSTALLER_PRIOR_METADATA_UPDATE_DELAY_MS: Delay [ms] after image copy, before metadata update; emits LOG_INF "V_DELAY_METADATA_UPDATE" before the delay.

  • CONFIG_APP_BM_INSTALLER_PRIOR_SELF_DESTRUCTION_DELAY_MS: Delay [ms] before clearing installer header;
    emits LOG_INF "V_DELAY_SELF_DESTRUCTION" before the delay.

@nvlsianpu nvlsianpu requested review from a team as code owners February 19, 2026 13:55
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Feb 19, 2026
@github-actions
Copy link

You can find the documentation preview for this PR here.

@nvlsianpu nvlsianpu force-pushed the cudo/ncsdk-37698 branch 2 times, most recently from 2cbcfaa to 361a37e Compare February 19, 2026 16:03
@nvlsianpu nvlsianpu requested a review from fundakol February 19, 2026 16:05
source "Kconfig.zephyr"

menuconfig APP_BM_INSTALLER_SELF_DELAYS
bool "Installers verification delays"
Copy link
Contributor

Choose a reason for hiding this comment

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

missing [EXPERIMENTAL] in prompt

bool "Installers verification delays"
select EXPERIMENTAL
help
Means to be used for testing purposes
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Means to be used for testing purposes
For testing purposes only

if APP_BM_INSTALLER_SELF_DELAYS

config APP_BM_INSTALLER_POST_METADATA_INVALIDATION_DELAY
int "delay after metadata invalidation [MS]"
Copy link
Contributor

Choose a reason for hiding this comment

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

capitalise first letter, lowercase ms as that is a unit, and add unit to symbol e.g. APP_BM_INSTALLER_POST_METADATA_INVALIDATION_DELAY_MS

int "delay before self destruction [MS]"
default 1000
help
The dealay after metadata update and before self destruction.
Copy link
Contributor

Choose a reason for hiding this comment

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

*delay

}
}

/* Delay for reliability verification purpose*/
Copy link
Contributor

Choose a reason for hiding this comment

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

all are missing a space before */

Added configurable infrastructure for delay NVM memory operation.
These delay are needed for making detail testing of the instalation
interrupts possible.

Kconfig added:

* CONFIG_APP_BM_INSTALLER_SELF_DELAYS:
Enable optional installer verification delays (testing);

* CONFIG_APP_BM_INSTALLER_POST_METADATA_INVALIDATION_DELAY_MS:
Delay [ms] after metadata invalidation, before image copy;
emits LOG_INF "V_DELAY_POST_METADATA_INVALIDATION" before the delay.

* CONFIG_APP_BM_INSTALLER_INTER_IMAGE_CHUNK_COPY_DELAY_MS:
Delay [ms] between image chunk copies;
emits LOG_INF "V_DELAY_IMAGE_CHUNK_COPY" before the delay.

* CONFIG_APP_BM_INSTALLER_NEXT_IMAGE_COPY_DELAY_MS:
Delay [ms] before next image copy;
emits LOG_INF "V_DELAY_NEXT_IMAGE_COPY" before the delay.

* CONFIG_APP_BM_INSTALLER_PRIOR_METADATA_UPDATE_DELAY_MS:
Delay [ms] after image copy, before metadata update;
emits LOG_INF "V_DELAY_METADATA_UPDATE" before the delay.

* CONFIG_APP_BM_INSTALLER_PRIOR_SELF_DESTRUCTION_DELAY_MS:
Delay [ms] before clearing installer header;
emits LOG_INF "V_DELAY_SELF_DESTRUCTION" before the delay.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
@nvlsianpu nvlsianpu requested a review from nordicjm February 20, 2026 10:33
#define VERIFICATION_DELAY(x, msg) do { \
LOG_INF(msg); \
log_flush(); \
k_busy_wait((x) * USEC_PER_MSEC); \
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use k_sleep here; it either busy waits or WFI (after this commit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants