Skip to content

Implement use_global_block_protection_lock. Add/fix Microchip SST26VFxxxB parts #20

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

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

eightycc
Copy link
Collaborator

@eightycc eightycc commented Mar 25, 2025

SST26VF064B requires that the IOC bit in its configuration register be set to 1 to enable QSPI commands. The IOC bit is effectively a QSPI enable bit for this part.

Adds use_global_block_protection_lock to indicate that a part needs a ULBPR (Global Block Protection Unlock) command to write-enable the entire flash.

When updated nvm.toml is picked up by CircuitPython, this will resolve issues adafruit/circuitpython#8047 and adafruit/circuitpython#10172 in combination with the PR for 10172.

@eightycc
Copy link
Collaborator Author

@jepler Please review.

@eightycc eightycc marked this pull request as draft March 25, 2025 13:57
@eightycc
Copy link
Collaborator Author

Converted to draft pending more testing.

@dhalbert
Copy link
Contributor

dhalbert commented Apr 7, 2025

Hi, is this still pending? I have another potential user for SST26VF064B I'm supporting

@eightycc
Copy link
Collaborator Author

eightycc commented Apr 7, 2025

Hi, is this still pending?

It is. The SST26VF064B requires some additional special casing. There are hard-coded status register bit assignment assumptions in CP flash code that are not right for this part.

@ross-satchell
Copy link

I am also working on a CircuitPython board that would use this part. Looking forward to a solution.

dhalbert
dhalbert previously approved these changes Apr 12, 2025
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Would you be willing to add SST26VF032B in this PR too? Here it is. I double-checked the datasheet and verified the memory_type and capacity.

# Settings for the Microchip SST26VF032B 16Mb (2MiB) QSPI flash.
# Datasheet: https://www.microchip.com/en-us/product/SST26VF032B
total_size = 0x400000 # 4 MiB
memory_type = 0x26
capacity = 0x42
start_up_time_us = 10000
max_clock_speed_mhz = 104
single_status_byte = false
write_status_register_split = false
quad_enable_bit_mask = 0x02
quad_enable_status_byte = 0
6b_quad_read = true
32_qspi_write = true
has_sector_protection = true
use_global_block_protection_lock = true

@dhalbert
Copy link
Contributor

The 64 file does not have a newline at the end.

@eightycc
Copy link
Collaborator Author

@dhalbert Hang on, I'm not quite done.

@eightycc eightycc marked this pull request as ready for review April 12, 2025 02:59
@eightycc
Copy link
Collaborator Author

eightycc commented Apr 12, 2025

@dhalbert All set. Apologies for the churn, I had to learn how these toml files cascade. I'll push the PR for adafruit/circuitpython#10172 once this PR is merged.

@eightycc eightycc requested a review from dhalbert April 12, 2025 03:01
@eightycc
Copy link
Collaborator Author

eightycc commented Apr 12, 2025

@dhalbert Missed your earlier request for the 032 part. I'll add it in the morning.

Added.

@eightycc eightycc changed the title Fix SST26VF064B QSPI enable. Implement use_global_block_protection_lock. Add/fix Microchip SST26VFxxxB parts Apr 12, 2025
@dhalbert dhalbert requested a review from tannewt April 14, 2025 13:57
@dhalbert
Copy link
Contributor

@tannewt could you check, based on your nvm.toml experience?

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants