Commit graph

7 commits

Author SHA1 Message Date
Kyle Cooke 9892af1464 drivers: flash: soc_flash_nrf: Account for ticker in timeout
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>
2022-10-13 16:06:08 +09:00
Gerard Marull-Paretas fb60aab245 drivers: migrate includes to <zephyr/...>
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>
2022-05-06 19:58:21 +02:00
Nazar Kazakov 9713f0d47c everywhere: fix typos
Fix a lot of typos

Signed-off-by: Nazar Kazakov <nazar.kazakov.work@gmail.com>
2022-03-14 20:22:24 -04:00
Ievgenii Meshcheriakov ec4a6c7ccf drivers/flash/soc_flash_nrf: Include additional headers
Include <soc.h> to make the header file self-sufficent.

Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
2021-03-04 13:55:56 +01:00
Andrzej Puzdrowski a7e3e22282 drivers/flash/soc_flash_nrf: support in-progress abort
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>
2021-02-14 18:23:12 -05:00
Andrzej Puzdrowski affbafac26 drivers/flash/soc_flash_nrf: introduce synchronization api usage
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>
2020-09-04 16:08:42 +02:00
Andrzej Puzdrowski f8fd2ba519 drivers/flash/soc_flash_nrf: introduce radio synchronization API
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>
2020-09-04 16:08:42 +02:00