Skip to content

Conversation

@michalek-no
Copy link
Contributor

removes while loop in driver.

@michalek-no michalek-no requested a review from a team as a code owner November 25, 2025 06:52
@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 Nov 25, 2025
@github-actions
Copy link

You can find the documentation preview for this PR here.

removes while loop in driver.

Signed-off-by: Mateusz Michalek <[email protected]>
uint32_t pm = __get_PRIMASK();

__disable_irq();
if (write_busy) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't it be enough to use an atomic here instead of enabling/disabling the IRQs? By setting write_busy before calling sd_flash_write, the write event should not occur before it is set.
Also, I don't see where write_busy is set to true(?).

Comment on lines +69 to +73
if (evt_id == NRF_EVT_FLASH_OPERATION_SUCCESS) {
#if defined(CONFIG_SOC_FLASH_NRF_RRAM_BM)
rrw_done();
#endif
}
Copy link
Contributor

@eivindj-nordic eivindj-nordic Nov 25, 2025

Choose a reason for hiding this comment

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

Any reason this cannot be an HIGHESTprio NRF_SDH_SOC_OBSERVER in soc_flash_nrf_rram.c?

@lemrey
Copy link
Contributor

lemrey commented Nov 25, 2025

If we change the flash.h driver behavior, won't we need changes in the subsystems that use it for DFU and expect it to be blocking?

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.

3 participants