Marzogh / SPIMemory

Arduino library for Flash Memory Chips (SPI based only). Formerly SPIFlash
http://spimemory.readthedocs.io/en/latest/
GNU General Public License v3.0
430 stars 136 forks source link

Bug report - Erase Chip on Diagnostic Doesn't Work but says Pass #244

Closed DrYogurt closed 1 year ago

DrYogurt commented 2 years ago
Any bug report raised here MUST be submitted according to this template or it will be flagged with 'Not enough information'. No action will be taken till all the prerequisite information is provided. If no information is provided for over a month after the 'Not enough information' label is applied, the issue will be closed.

Pre-bug report checklist:

Do this checklist before filing an bug report:


Bug Report

Describe the bug

Include a clear and concise description of what the bug is.

I'm using the default FlashDiangostic and it seems like the flashdiagnostic is failing in the Erase step, but somehow still returns "passed" on the check, It then fails to write anything new and says that the sectors haven't been erased.

I've tried setting clock speeds to no avail.

No Chip size defined by user. Checking library support. Chip identified. This chip is fully supported by the library.

SPIMemory Library version: < 2.5.0

JEDEC ID: 0xEF6017 Man ID: 0xEF Memory ID: 0x60 Capacity: 8388608 Max Pages: 32768 Unique ID: 2861612766143488, 0x695C725F24692400

                        Testing library code

        Function        Test result              Runtime

        Power Down         FAIL         Not all chips support power down. Check your datasheet.
        Power Up           PASS                   7 us

        Erase Chip         PASS                   8 us
        Erase 72KB         PASS                   29 us
        Erase 64KB         PASS                   12 us
        Erase 32KB         PASS                   12 us
        Erase 4KB          PASS                   12 us

        Data type       I/O Result        Write time          Read time

This sector already contains data. Please make sure the sectors being written to are erased. Byte FAIL 0 us 6 us This sector already contains data. Please make sure the sectors being written to are erased. Char PASS 0 us 6 us This sector already contains data. Please make sure the sectors being written to are erased. Word FAIL 0 us 7 us This sector already contains data. Please make sure the sectors being written to are erased. Short PASS 0 us 7 us This sector already contains data. Please make sure the sectors being written to are erased. ULong PASS 0 us 8 us This sector already contains data. Please make sure the sectors being written to are erased. Long FAIL 0 us 8 us This sector already contains data. Please make sure the sectors being written to are erased. Float PASS 0 us 8 us This sector already contains data. Please make sure the sectors being written to are erased. Struct PASS 0 us 19 us This sector already contains data. Please make sure the sectors being written to are erased. Byte Array PASS 0 us 146 us This sector already contains data. Please make sure the sectors being written to are erased. String PASS 0 us 31 us

- If you have a problem with a particular function, call the `flash.error()` function (after you have made sure you have started up your Serial port with a ``` Serial.begin(BAUD) ``` ). Provide details of the function, the data given to/ expected from the function and the error code here: (**Please repeat this for every function you have an error with**)
        - Function: (e.g. writeByte())
       -  Data: (e.g. 3.14 or Struct)
        - Error code: (e.g. 0x0A)

#### To Reproduce
Provide a **minimal code snippet** example that reproduces the bug (If you're using one of the examples that came with the library, just tell us which one instead of pasting the entire example's code). Please make sure you wrap any code in the proper code blocks like below

//using the flash diagnostic



#### Expected behavior
A clear and concise description of what you expected to happen.

#### Screenshots
If applicable, add screenshots to help explain your problem.

#### Wiring diagram
If applicable, add a wiring diagram to help explain your problem.

#### Software environment (please complete the following information):
 - Library version: Latest
 - Arduino IDE version: Platformio
 - OS: Linux
 - Micro controller platform: Teensy 4.1
 - Flash/Fram memory module: W25q64

#### Additional context
Add any other context about the problem here.

<hr>

###### DO NOT DELETE OR EDIT anything below this

<hr>

<sub> <b> Note 1: _Make sure to add **all the information needed to understand the bug** so that someone can help. If any essential information is missing we'll add the 'Needs more information' label and close the issue until there is enough information._ </b></sub>

<sub> <b> Note 2: For support questions (for example, tutorials on how to use the library), please use the [Arduino Forums](http://forum.arduino.cc/index.php?topic=324009.0). This repository's issues are reserved for feature requests and bug reports. </b></sub>

<hr>

![GitHub issue state](https://img.shields.io/github/issues/detail/s/Marzogh/SPIFlash/14.svg) ![GitHub issue title](https://img.shields.io/github/issues/detail/title/Marzogh/SPIFlash/14.svg) ![GitHub issue author](https://img.shields.io/github/issues/detail/u/Marzogh/SPIFlash/14.svg) ![GitHub issue label](https://img.shields.io/github/issues/detail/label/Marzogh/SPIFlash/14.svg) ![GitHub issue comments](https://img.shields.io/github/issues/detail/comments/Marzogh/SPIFlash/14.svg) ![GitHub issue age](https://img.shields.io/github/issues/detail/age/Marzogh/SPIFlash/14.svg) ![GitHub issue last update](https://img.shields.io/github/issues/detail/last-update/Marzogh/SPIFlash/14.svg)
DrYogurt commented 1 year ago

Issue ended up being a dud flash chip.