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

applet.memory-25x: Sector parameter, doesn't update erase opcode #286

Open
gregdavill opened this issue Nov 13, 2021 · 3 comments
Open

applet.memory-25x: Sector parameter, doesn't update erase opcode #286

gregdavill opened this issue Nov 13, 2021 · 3 comments
Assignees
Labels
applet Component: applet memory-25x Applet: memory-25x

Comments

@gregdavill
Copy link
Contributor

When using the memory-25x, you have the ability to set the sector size, using the -S parameter.
However setting this value does not update the command that's actually sent to the flash.

By default the opcode 0x20 is sent, which (on common flashes) is a 4kB sector erase.

Most flash devices supports the 64kB sector erase, which typically executes faster, but in order to make use of this the opcode sent will need to change based on the -S parameter.

@whitequark whitequark added applet Component: applet memory-25x Applet: memory-25x labels Nov 13, 2021
@whitequark
Copy link
Member

@gregdavill In case SFDP is available this is easy to handle. What is to be done if there's no SFDP data available? Should an option to specify the exact erase opcode be mandatory in this case?

@gregdavill
Copy link
Contributor Author

Using SFDP makes the most sense when it's available as a default option, it can pick the largest erase sector size based on the amount of data to write.

If an opcode is presented it should take precedence over the SFDP. (But show a WARN/INFO if SFDP is available and the opcode is not present in the SFDP)

If no SFDP is available, requiring the opcode to be provided is a good option.

@whitequark
Copy link
Member

Got it! I'll implement this soonish (and then finally take care of your other PRs.)

@whitequark whitequark self-assigned this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applet Component: applet memory-25x Applet: memory-25x
Projects
Status: Todo
Development

No branches or pull requests

2 participants