You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 it as a Feature request. NOT a bug report.
Is this a bug that you cannot fix? Go ahead with filing a bug report below
Bug Report
HI Marzogh,
i am using stm32f103rct6 controller i connected default spi pins to the W25Q64 SPI flash .
i but the ARCH_STM32 line in the variant.h file after that its complied.
I tried multiple SPI clock speed setting after that Erase Chip and Power Up function start working
but the run diagnostic is getting failed . so that read write function also not working .
Kindly support me to solve this issue .
Describe the bug
Include a clear and concise description of what the bug is.
Make sure you have run FlashDiagnostics.ino with #define RUNDIAGNOSTICS uncommented in SPIFlash.h. Paste the relevant sections of the output from your Serial console when you run FlashDiagnostics.ino.here:
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
FlashDiagnostics.ino
#include<SPIMemory.h>
#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
// Required for Serial on Zero based boards
#define Serial SERIAL_PORT_USBVIRTUAL
#endif
#if defined (SIMBLEE)
#define BAUD_RATE 19200
#define RANDPIN 1
#else
#define BAUD_RATE 19200
#if defined(ARCH_STM32)
#define RANDPIN PA0
#else
#define RANDPIN A0
#endif
#endif
#define TRUE 1
#define FALSE 0
SPIFlash flash;
void setup() {
Serial.begin(BAUD_RATE);
#if defined (ARDUINO_ARCH_SAMD) || defined (__AVR_ATmega32U4__) || defined (ARCH_STM32) || defined (NRF5) || defined (ARDUINO_ARCH_ESP32)
while (!Serial) ; // Wait for Serial monitor to open
#endif
delay(50); //Time to terminal get connected
Serial.print(F("Initialising"));
for (uint8_t i = 0; i < 10; ++i)
{
Serial.print(F("."));
}
Serial.println();
randomSeed(analogRead(RANDPIN));
if (flash.error()) {
Serial.println(flash.error(VERBOSE));
}
flash.begin(); // flash.begin(MB(32));
delay(50);
flash.setClock(2000000); // this sets the clock spped to 20,000,000 Hz - i.e. 20MHz
if (getID()) {
printLine();
printTab(7);
Serial.print("Testing library code");
printLine();
printTab(3);
Serial.print("Function");
printTab(2);
Serial.print("Test result");
printTab(3);
Serial.print(" Runtime");
printLine();
powerDownTest();
Serial.println();
powerUpTest();
Serial.println();
Serial.println();
..........
Expected behavior
run diagnostic should pass .read write function should work
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):
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.
Note 2: For support questions (for example, tutorials on how to use the library), please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.
The text was updated successfully, but these errors were encountered:
i changed the default clock speed to 18mhz now its working fine ,
flash.setClock(2000000); this function is working but not 100% after changing the below modification its working fine for STM32f103
Modification found from (Bug report - Not working by default with Teensy 4.0 and W25Q64JV #199 )
Whereas the SPIMemory library sets this to 104MHz by default (in defines.h):
#define SPI_CLK 104000000 //Hz equivalent of 104MHz
Thank you santhosh1211.
That was what I needed for it to work flawlessly, reducing the speed of the SPI CLK.
I am using W25Q128FVSG module.
My board is the BluePill STM32F103C8T6.
I noticed that the ARCH_STM32 is not selected automatically so the constructor was trying to match other patterns. I don't know if I should have written #define ARCH_STM32 at the beggining of the sketch though. For a final try I reinstalled the library to get rid of any modifications and I put this line at the beggining and it now selects the right constructor.
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
HI Marzogh,
i am using stm32f103rct6 controller i connected default spi pins to the W25Q64 SPI flash .
i but the ARCH_STM32 line in the variant.h file after that its complied.
I tried multiple SPI clock speed setting after that Erase Chip and Power Up function start working
but the run diagnostic is getting failed . so that read write function also not working .
Kindly support me to solve this issue .
Describe the bug
Include a clear and concise description of what the bug is.
#define RUNDIAGNOSTICS
uncommented in SPIFlash.h. Paste the relevant sections of the output from your Serial console when you run FlashDiagnostics.ino.here:flash.error()
function (after you have made sure you have started up your Serial port with aSerial.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
Expected behavior
run diagnostic should pass .read write function should work
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):
Additional context
Add any other context about the problem here.
DO NOT DELETE OR EDIT anything below this
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.
Note 2: For support questions (for example, tutorials on how to use the library), please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.
The text was updated successfully, but these errors were encountered: