Skip to content
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

drivers: Add flash driver for RRAM #1501

Merged
merged 7 commits into from
Feb 20, 2024
Merged

Conversation

nvlsianpu
Copy link
Contributor

@nvlsianpu nvlsianpu commented Feb 15, 2024

cherry-pick of: zephyrproject-rtos/zephyr#68309
The PR is already approved upstream.

jaz1-nordic and others added 5 commits February 15, 2024 13:55
Upstream PR: zephyrproject-rtos/zephyr#68309

Added a simple driver for RRAM. It is implemented as a flash driver,
because the "RRAM eFlash" macro obeys flash-like constraints.
Although users are not required to erase before write.

Signed-off-by: Jakub Zymelka <[email protected]>
Upstream PR: zephyrproject-rtos/zephyr#68309

Added synchronization with BLE radio operation to the RRAM flash
driver. The implementation is using framework which is already
provided for nrf52's flash driver.

Additional added resource locking mechanism while driver does writing
which solves mutual exclusion write access problem.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
Signed-off-by: Jakub Zymelka <[email protected]>
…PSL in use

Upstream PR: zephyrproject-rtos/zephyr#68309

When radio-synchronization was on
(CONFIG_SOC_FLASH_NRF_RADIO_SYNC_NONE=n) context of writing was shifted
by 4 instead of write-length (this caused redundant, self-shortening
writes to the same block.)

write-len was unset when requested write len was less than
RRAM_MAX_WRITE_BUFFER.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
Signed-off-by: Jakub Zymelka <[email protected]>
…s by default

Upstream PR: zephyrproject-rtos/zephyr#68309

Now RRAMC is set to use up to 512 B burst writes by default as most
time effective.
Requested slot time was changed to 8000 us for that case, as this is
required in order to hold the longest write operation.
Drivers differs slot duration depending on configured RRAMC buffers count
(CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE).

Signed-off-by: Andrzej Puzdrowski <[email protected]>
…er user selectable

Upstream PR: zephyrproject-rtos/zephyr#68309

Make flash timeout multiplier user selectable for rram flash driver

Signed-off-by: Pierce Lowe <[email protected]>
jaz1-nordic and others added 2 commits February 15, 2024 14:28
Upstream PR: zephyrproject-rtos/zephyr#68309

Minor changes to standardize the driver code.

Signed-off-by: Jakub Zymelka <[email protected]>
Signed-off-by: Andrzej Puzdrowski <[email protected]>
Upstream PR: zephyrproject-rtos/zephyr#68309

Adds conditional usage of locking mechanisms to allow building
without multithreading.

Signed-off-by: Mateusz Michalek <[email protected]>
@hermabe
Copy link
Member

hermabe commented Feb 16, 2024

FYI: the mpsl flash sync for 54L is picked here: nrfconnect/sdk-nrf#13966

@de-nordic de-nordic merged commit 1d09dda into nrfconnect:main Feb 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants