-
Notifications
You must be signed in to change notification settings - Fork 28
drivers: flash: RRAM nonblocking writes #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
You can find the documentation preview for this PR here. |
77f7e91 to
4c99554
Compare
removes while loop in driver. Signed-off-by: Mateusz Michalek <[email protected]>
| uint32_t pm = __get_PRIMASK(); | ||
|
|
||
| __disable_irq(); | ||
| if (write_busy) { |
There was a problem hiding this comment.
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(?).
| if (evt_id == NRF_EVT_FLASH_OPERATION_SUCCESS) { | ||
| #if defined(CONFIG_SOC_FLASH_NRF_RRAM_BM) | ||
| rrw_done(); | ||
| #endif | ||
| } |
There was a problem hiding this comment.
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?
|
If we change the |
removes while loop in driver.