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

SST26 not working with STM32F429ZI #245

Open
mattia424 opened this issue Sep 30, 2022 · 0 comments
Open

SST26 not working with STM32F429ZI #245

mattia424 opened this issue Sep 30, 2022 · 0 comments
Assignees
Labels
possible bug Possibly a bug. Needs verification before moving to *bug* status.

Comments

@mattia424
Copy link

Hi, I am running the SPIMemory V.3.4.0 library with a NUCLEO-F429ZI board and the SST26VF032 memory chip the sketch is extracted from an example.

I tried to include the SPIMemory library and it doesn't work, only with SPIFlash it works
I checked what my deault SPI is and made the following connections:

NSS: PA4 -> CE # (1)
SCK: PA5 -> SCK (6)
MISO: PA6 -> SO / SIO1 (2)
MOSI: PB5 -> SI / SIO0 (5)
VCC -> WP # / SIO2 (3), HOLD / SIO3 (7), VDD (8)
GND -> VSS (4)

The output of my serial is

16: 34: 06.650 -> Get JEDEC ID 
16: 34: 06.650 -> Manufacturer ID: feh
16: 34: 06.650 -> Memory Type: feh
16: 34: 06.650 -> Capacity: feh
16: 34: 06.650 -> JEDEC ID: fefefeh

Sketch:

#include<SPIFlash.h>
HardwareSerial Serial1(PD9, PD8);

char printBuffer[128];
SPIFlash flash(PA4);  
      
void setup() {
  Serial1.begin(115200);
  Serial1.println("####\nStart setup!" );
  delay(50);
  flash.begin(MB(32));
  Serial1.println("End setup!\n####");
}

void loop() {
    Serial1.println(F("----------------------------------------------------------------------------------------------------------------------------------"));
    Serial1.println("Get JEDEC ID");
    uint8_t b1, b2, b3;
    uint32_t JEDEC = flash.getJEDECID();
    //uint16_t ManID = flash.getManID();
    b1 = (JEDEC >> 16);
    b2 = (JEDEC >> 8);
    b3 = (JEDEC >> 0);
    clearprintBuffer();
    sprintf(printBuffer, "Manufacturer ID: %02xh\nMemory Type: %02xh\nCapacity: %02xh", b1, b2, b3);
    Serial1.println(printBuffer);
    clearprintBuffer();
    sprintf(printBuffer, "JEDEC ID: %04xh", JEDEC);
    Serial1.println(printBuffer);
    Serial1.println(F("----------------------------------------------------------------------------------------------------------------------------------")); 
    delay(5000);
}

void clearprintBuffer()
{
  for (uint8_t i = 0; i < 128; i++) {
    printBuffer[i] = 0;
  }
}

Why do I always get that strange string "feh" and "fefefeh"?

@mattia424 mattia424 added the possible bug Possibly a bug. Needs verification before moving to *bug* status. label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
possible bug Possibly a bug. Needs verification before moving to *bug* status.
Projects
None yet
Development

No branches or pull requests

2 participants