Skip to content

Conversation

@logletreecrus
Copy link
Contributor

The AT25XV021A variant is a flash variant of Atmel's AT25 family that adds extra protections, requiring additional writes to the device to program or erase data.

This commit adds a flash driver for AT25XV021A devices instead of modifying (1) the existing AT45 SPI flash driver or (2) the existing AT24/25 EEPROM driver because this variant poses fundamental changes that affect all aspects of the driver.

Notably,

  • AT25XV021A includes a second status register, and the format and functions of the existing status register is changed from the existing drivers.
  • AT25XV021A requires executing page or chip erase commands before writing, making it incompatible with the existing AT24/25 EEPROM driver.
  • AT25XV021A adds a software protection layer that requires extra writes before executing program or erase commands.

This driver implements flash_erase, but flash_write also implicitly erases.

Tested writing to and reading/erasing from an AT25XV021A device across page boundaries with varying lengths (less than and greater than page size). Tested chip erase functions. Tested driver initialization from varying initial hardware states.

@github-actions github-actions bot added area: Flash platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) labels Jul 9, 2025
@logletreecrus logletreecrus force-pushed the add_drivers_flash_at25xv021a branch 2 times, most recently from 107c5fc to a45a117 Compare July 9, 2025 20:38
@logletreecrus

This comment was marked as outdated.

@rriveramcrus rriveramcrus self-requested a review July 9, 2025 21:54
The AT25XV021A variant is a flash variant of Atmel's AT25 family
that adds extra protections, requiring additional writes to the
device to program or erase data.

This commit adds a flash driver for AT25XV021A devices instead of
modifying (1) the existing AT45 SPI flash driver or (2) the
existing AT24/25 EEPROM driver because this variant poses
fundamental changes that affect all aspects of the driver.

Notably,
 - AT25XV021A includes a second status register, and the format
	and functions of the existing status register is
	changed from the existing drivers.
 - AT25XV021A requires executing page or chip erase commands
	before writing, making it incompatible with the
	existing AT24/25 EEPROM driver.
 - AT25XV021A adds a software protection layer that requires
	extra writes before executing program or erase commands.

This driver implements flash_erase, but flash_write also
implicitly erases.

Tested writing to and reading/erasing from an AT25XV021A device
across page boundaries with varying lengths (less than and
greater than page size). Tested chip erase functions. Tested
driver initialization from varying initial hardware states.

Signed-off-by: Liam Ogletree <[email protected]>
@logletreecrus logletreecrus force-pushed the add_drivers_flash_at25xv021a branch from a45a117 to 7b187d6 Compare July 9, 2025 23:28
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 9, 2025

@rriveramcrus
Copy link
Contributor

#92980
Duplicated here after resolving some GitHub strangeness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Flash platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants