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

Unable Read data #153

Closed
12 of 21 tasks
harissutanrafiq opened this issue Sep 21, 2018 · 2 comments
Closed
12 of 21 tasks

Unable Read data #153

harissutanrafiq opened this issue Sep 21, 2018 · 2 comments
Assignees
Labels
help wanted Help is requested from anyone with expertise in the area the issue is in. low priority This is a low priority item and will be actioned when possible possible bug Possibly a bug. Needs verification before moving to *bug* status.
Milestone

Comments

@harissutanrafiq
Copy link

harissutanrafiq commented Sep 21, 2018

GitHub issue state GitHub issue title
GitHub issue author GitHub issue label GitHub issue comments
GitHub issue age GitHub issue last update

---------------------------- DO NOT DELETE OR EDIT anything above this line ----------------------------

Hey there! Thanks for using the SPIFlash library for Arduino.

Please note that starting 01.03.2018 any issue 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, the issue will be closed.

Note: For support questions, please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.

Issue details

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

Do the checklist before filing an issue:

  • Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • Is this an idea for a feature? Post the feature request as an issue here with a title that clearly says "Feature Request".
  • Is this a bug that you cannot fix? Post the bug report as an issue here with a title that cleary says "Bug Report".

When opening an issue please include the following details:

  • Do you want to request a feature or report a bug? bug
  • Which library version are you using? v3.2.1
  • Which Arduino IDE version are you compiling the library on? v1.8.3
  • Which OS are you compiling your code on? [Linux / Mac / Windows] Windows
  • Which microcontroller platform are you using? STM32F105xx
  • Which Flash memory module are you using? Winbond W25Q16JV
  • What is the current behavior? write then read is success, but failed read only from flash
  • What is the expected behavior? read data

Bug reports only
  • If this is a bug report -

  • Make sure you have run FlashDiagnostics.ino with #define RUNDIAGNOSTICS uncommented in SPIFlash.h. List any error codes that pop up in your Serial output when you run FlashDiagnostics.ino.here:
    Error codes
    ------------
    -
    -
    -
    -
    -

  • 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 -
    Data -
    Error code -

  • Provide a minimal code snippet example that reproduces the bug. Please make sure you wrap any code in the proper code blocks like below

i have run FlashDiagnostics and its successfully no Error
I try write and then read back its success

//write_read.ino ///////////////

#include "SPIMemory.h"
SPIClass SPI_2(2);
SPIFlash flash(PB12, &SPI_2); 


uint32_t ADD1,ADD2;

char bf[201] ="CHAR ARRAY 1";
char bf2[201]="CHAR ARRAY 2";


void setup() {
  Serial2.begin(115200);

  delay(3000);
  
  flash.begin();

  ADD1 = flash.getAddress(200);
  ADD2 = flash.getAddress(500);

 
  if(flash.writeCharArray(ADD1, bf, strlen(bf) )){
    Serial2.println("Write string 1, success ");
  }
  
  if(flash.writeCharArray(ADD2, bf2, strlen(bf2))){
    Serial2.println("Write string 2, success ");
  }

  
}

void loop() {

  flash.readCharArray(ADD1,bf, strlen(bf));
  flash.readCharArray(ADD2,bf2, strlen(bf2) );

  Serial2.println(bf);
  Serial2.println(bf2);
  
  
  delay(5000);
}
[img]https://preview.ibb.co/mEzKGe/read_write.png[/img]

read.ino
---------------------------------------
#include "SPIMemory.h"
SPIClass SPI_2(2);
SPIFlash flash(PB12, &SPI_2); 


uint32_t ADD1,ADD2;

char bf[201] ="CHAR ARRAY 1";
char bf2[201]="CHAR ARRAY 2";


void setup() {
  Serial2.begin(115200);

  delay(3000);
  
  flash.begin();

  ADD1 = flash.getAddress(200);
  ADD2 = flash.getAddress(500);

 /*
  if(flash.writeCharArray(ADD1, bf, strlen(bf) )){
    Serial2.println("Write string 1, success ");
  }
  
  if(flash.writeCharArray(ADD2, bf2, strlen(bf2))){
    Serial2.println("Write string 2, success ");
  }
  */

  
}

void loop() {

  flash.readCharArray(ADD1,bf, strlen(bf));
  flash.readCharArray(ADD2,bf2, strlen(bf2) );

  Serial2.println(bf);
  Serial2.println(bf2);
  
  
  delay(5000);
}
[img]https://preview.ibb.co/jwsH2K/read.png[/img]

read.ino its failed, serial monitor is print unknown character please help me


  • Provide screenshots where appropriate
  • Provide wiring diagram where appropriate

Feature Requests only
  • If this is a feature request, what is the motivation / use case for changing the behavior?

  • Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context etc.)

Make sure to add all the information needed to understand the bug/feature so that someone can help. If the info is missing we'll add the 'Needs more information' label and close the issue until there is enough information.

@Marzogh Marzogh added the possible bug Possibly a bug. Needs verification before moving to *bug* status. label Apr 19, 2019
@Marzogh Marzogh self-assigned this Apr 19, 2019
@Marzogh
Copy link
Owner

Marzogh commented Apr 19, 2019

I'm afraid the STM32F105xx is currently not officially supported as I do not have the dev board. I will keep this issue open in case someone who has an STM32F105xx dev board can help with a fix.

@Marzogh Marzogh added help wanted Help is requested from anyone with expertise in the area the issue is in. low priority This is a low priority item and will be actioned when possible labels Apr 19, 2019
@Marzogh Marzogh added this to the v3.4.0 milestone Jun 3, 2019
@Marzogh
Copy link
Owner

Marzogh commented Jun 3, 2019

P.S. I've got my hands on a STM32F105xx dev board and v3.4.0 appears to work fine now 🙂

@Marzogh Marzogh closed this as completed Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Help is requested from anyone with expertise in the area the issue is in. low priority This is a low priority item and will be actioned when possible possible bug Possibly a bug. Needs verification before moving to *bug* status.
Projects
None yet
Development

No branches or pull requests

2 participants