Make rram_write() a non-sleeping single-block primitive so it is safe to
call from interrupt context.
The throttling delay is now realized by the callers: k_usleep() between
blocks on the thread path.
Add as well a new nrf_flash_sync_set_delay() function that spaces
timeslots on the radio-sync path.
This allows SOC_FLASH_NRF_THROTTLING and SOC_FLASH_NRF_RADIO_SYNC_MPSL
to be enabled at the same time.
Signed-off-by: Riadh Ghaddab <riadh.ghaddab@nordicsemi.no>
Wire up the nRF RRAM driver to the new optional flash_api_fill
callback so flash_fill() and flash_flatten() on no-erase devices can
complete a region-fill in a single bulk operation instead of a long
write loop driven by CONFIG_FLASH_FILL_BUFFER_SIZE.
Result: a region-fill is now one rram_write() call covering the full
range, replacing thousands of write-block-sized api->write() calls
that each forced a hardware buffer commit. Flash_flatten() on RRAM
becomes effectively a single optimized memset.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit adds the possibility to add additional custom
context for flash operations for usage by non-standard
flash drivers.
Signed-off-by: Artur Hadasz <artur.hadasz@nordicsemi.no>
We have been encountering timeout issues when erasing large flash
sections (before receiving an image via mcuboot) from this semaphore
take:
5af0fbc2e3/drivers/flash/soc_flash_nrf_ticker.c (L225-L233)
I think this is because this constant is based on the time taken to erase
the chip but doesn't take account of the fact it is being done by a
ticker. If I understand correctly the ticker is a timeshare mechanism
so the actual max erase time is some factor based on how much time is
given to the task by the ticker.
This multiplies the max timeout by 1.5
Signed-off-by: Kyle Cooke <cookekyle97@gmail.com>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Introduce support for situation when synchronization back-end
aborts operation before it is done. synchronization API will
transfer operation return code to the driver shim back.
Additionally:
FLASH_OP_ONGOING value was switched to be positive in order to
not been mislead with a negative error code.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Rework ticker synchronization using newly introduced
radio synchronization API.
In kconfig synchronization using ll ticker become choice
option.
If CONFIG_SOC_FLASH_NRF_PARTIAL_ERASE is enabled the erase
timing is changed so intervals become similar to slots duration.
Previously interval was always ~90 ms, which looks like it was kept
so disproportional by oversight while the partial erase was
introduced.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Introduced API which allows to decouple radio synchronization
mechanism from NVMC driver.
New API will allows to replace synchronization mechanism if required.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>