Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:37 15 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Microchip SPI Flash memory: Grrrr.

Author Message
MustardMan

Senior Member

Joined: 30/08/2019
Location: Australia
Posts: 175
Posted: 11:43am 31 Oct 2020
Copy link to clipboard 
Print this post

Warning: rant to follow...

I have a requirement to use a moderate sized Flash chip in my project, so I looked around and decided to get one of the Microchip SO8 packages (the SST26VF032B to be exact). Part arrived, soldered in, ready for the test phase.

Then I tried to get the damn thing to work! It was originally placed on the 5 inch SSD1963 board, hence would have been sharing SPI2 with the touch screen and the SD card. However, that proved problematic (sharing SPI2), and I really liked the look of the BASIC implementation for Winbond Flash chips on 'the fruit of the shed', so I ran a few wires to let it run on the first SPI port.

First problem, it returned rubbish when getting the JEDEC ID. Slowed the SPI down to 5MHz, and that bit sprang to life.

Cool... but then I had to uncomment the CASE for the Microchip part (to recognise the JEDEC ID). No problem. However, I couldn't write/read data - all reads returned FF. I was not sure if it was writing OK and not reading properly, or if it simply wasn't writing in the first place. Went through the code routine by routine, line by line. Reading is very straight forward, and I could see no problems, so I suspected that writing was the issue.

So, detailed read of the datasheet, and came across a mention in a footnote at the bottom of a table on page 42... "The default state after power-on reset is write protected BPR [block protection register]" (essentially write-protect the chip until unlocked). Not impressed. So, the code would have to be modified to UN-protect the BPR, but then trying to find out how! The datasheet was quite vague about changing the BPR, and the ability to lock the device forever (no writes ever again for you my son!) being a possible consequence of getting it wrong.

Web search: 'can't write SST...'. Pretty much useless. Some guy on a forum claiming since the chip was SQI it could not be used in SPI mode. What! Have you actually used one of these things? What a stupid remark!

OK, get the latest datasheet. It might have a clue. Download the latest... go to open it... password protected! Now I really have the sh*ts. If a manufacturer expects me to design for their part, don't password protect the damn datasheet!

Microchip OUT.

Who else... Winbond is what the code was written for. Yes readily available, and the 128Mbit part is cheaper than the 32Mbit Microchip part! I think you can see where I'm heading with my BOM!

Well, I just happened to have a 128Mbit Winbond in my drawer (that over-order several months back to the rescue). Sidecutters made quick work of the Microchip part, and the soldering iron had the Winbond part on in a snap. Test: worked PERFECTLY first time.

BOM updated.
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2171
Posted: 12:24pm 31 Oct 2020
Copy link to clipboard 
Print this post

I know Matherp found some battle adapting his CSUB Winbond code for microchip flashes... bit vague on it now but I think it was the same thing. It's in this thread near the bottom of the first page  https://www.thebackshed.com/forum/ViewTopic.php?TID=8492

h
Edited 2020-11-01 00:16 by CaptainBoing
 
MustardMan

Senior Member

Joined: 30/08/2019
Location: Australia
Posts: 175
Posted: 08:33pm 31 Oct 2020
Copy link to clipboard 
Print this post

  matherp said  Why do Microchip have to make things so difficult


@CaptainBoing
Yeah. I have to agree.
I did read that entire thread yesterday morning (skimmed through the code) and did note that the SST series gave Peter some problems. I had thought being armed with the datasheet would ease my situation. Wrong thought!
With the larger capacity Winbond part being easier to drive, and cheaper, why would anyone use the Microchip part... unless like me they chose it without test, ordered a million of the suckers, and then had to get the damn things to work!!
Fortunately I only ordered five. Thank God Digikey have a MOQ of 1, and they are quick too.


Oh, and the SST26VF032 datasheet (revision J) turned out to have something in it that trips my reader into thinking it is password protected and therefore refuse to open. On another PC it opens just fine. All earlier revisions work fine too (on both PCs).
Mind you, it is the only PDF of many hundreds (thousands?) that has ever done this.

Cheers,
Edited 2020-11-01 08:24 by MustardMan
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2171
Posted: 10:27pm 31 Oct 2020
Copy link to clipboard 
Print this post

for future reference on PDFs that are playing the raw prawn...

https://www.sodapdf.com/unlock-pdf/
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025