PaulStoffregen / SerialFlash

Library for using SPI Flash memory with a filesystem-like interface
330 stars 118 forks source link

Add wakeup() in begin() to avoid flash not working anymore after reset/upload #48

Open hallard opened 7 years ago

hallard commented 7 years ago

Hi Paul,

I spend some time to understand why my flash wasn't able to read/write data after uploading new sketch or even old working sketch, until I powered board off then on and get it back to life.

Then I understood, Oh, I changed main sketch to put flash into sleep mode with SerialFlash.sleep(); and seems it's not waked on reset so any further use fail.

Now I'm doing SerialFlash.wakeup(); after SerialFlash.begin(4);, it's fine but may be adding this call in begin() of library would make sense and would avoid this little pain to other first time ;-)

dots123 commented 6 years ago

It helped me too! Thank you Hallard!

And thank you Paul for this great library!

juanpabloderosas commented 1 year ago

Thanks Hallard! I've spend three days trying to understand the problem. Your post solved it instantaneously my problem!

Also, thanks Paul for the library, its great!