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

Software reset for chips w/o reset pin (W25Q64FV) #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arkhipenko
Copy link

Based on the following from the datasheet of W25Q64FV
7.2.43 Enable Reset (66h) and Reset (99h)
Because of the small package and the limitation on the number of pins, the W25Q64FV provide a
software Reset instruction instead of a dedicated RESET pin. Once the Reset instruction is accepted, any
on-going internal operations will be terminated and the device will return to its default power-on state and
lose all the current volatile settings, such as Volatile Status Register bits, Write Enable Latch (WEL)
status, Program/Erase Suspend status, Read parameter setting (P7-P0), Continuous Read Mode bit
setting (M7-M0) and Wrap Bit setting (W6-W4).
“Enable Reset (66h)” and “Reset (99h)” instructions can be issued in either SPI mode or QPI mode. To
avoid accidental reset, both instructions must be issued in sequence. Any other commands other than
“Reset (99h)” after the “Enable Reset (66h)” command will disable the “Reset Enable” state. A new
sequence of “Enable Reset (66h)” and “Reset (99h)” is needed to reset the device. Once the Reset
command is accepted by the device, the device will take approximately tRST=30us to reset. During this
period, no command will be accepted.
Data corruption may happen if there is an on-going or suspended internal Erase or Program operation
when Reset command sequence is accepted by the device. It is recommended to check the BUSY bit and
the SUS bit in Status Register before issuing the Reset command sequence.

added SerialFlash.reset() method (tested on W25Q64FV)

@PaulStoffregen
Copy link
Owner

Why is the needed as a public API?

@arkhipenko
Copy link
Author

I am using the chip for one of my projects and for some reason the chip refuses to initialize after soft reset of the microcontroller. This was the only way to make the chip restart without full power cycle. So I wanted to share this with the world :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants