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: nrf_qspi_nor: Prevent reading status before sending RDPD #64782

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

anangl
Copy link
Member

@anangl anangl commented Nov 3, 2023

After entering the Deep Power-down mode, some flash chips ignore all commands except from the one that releases the chip from the DP mode and it is not possible to successfully read their Status Register then. Since the QSPI peripheral tries to read this register when it is being activated, it consequently fails to send the actual command that would release the flash chip from the DP mode if that is to be done right after QSPI initialization.
Prevent this problem by peforming the QSPI activation with all pins disconnected. This causes that the Status Register value is read as all zeros and allows the activation to always finish successfully, and the RDPD command to be properly sent.

Fixes #55543

After entering the Deep Power-down mode, some flash chips ignore all
commands except from the one that releases the chip from the DP mode
and it is not possible to successfully read their Status Register then.
Since the QSPI peripheral tries to read this register when it is being
activated, it consequently fails to send the actual command that would
release the flash chip from the DP mode if that is to be done right
after QSPI initialization.
Prevent this problem by performing the QSPI activation with all pins
disconnected. This causes that the Status Register value is read as
all zeros and allows the activation to always finish successfully,
and the RDPD command to be properly sent.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
@anangl anangl added the bug The issue is a bug, or the PR is fixing a bug label Nov 3, 2023
@anangl
Copy link
Member Author

anangl commented Nov 3, 2023

@oryjkov Would you be able to check if this actually fixes #55543? I don't have a board with such flash chip to confirm this myself.

@carlescufi
Copy link
Member

@de-nordic @nordicjm can you take a look?

@carlescufi carlescufi merged commit 1727bbc into zephyrproject-rtos:main Nov 21, 2023
21 checks passed
@anangl anangl deleted the fix_exit_dpd branch November 21, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exiting Deep Power Down on a p25q16h flash chip is not working with QSPI
5 participants