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

Flashing SPI using SFL with bios has no effect #522

Closed
DurandA opened this issue May 13, 2020 · 5 comments
Closed

Flashing SPI using SFL with bios has no effect #522

DurandA opened this issue May 13, 2020 · 5 comments

Comments

@DurandA
Copy link
Contributor

DurandA commented May 13, 2020

Flashing the firmware to SPI flash using litex_term --kernel firmware.fbi --flash doesn't seem to modify the flash content.

I am investigating on the issue as the fw bios command works fine.

--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
[LXTERM] Received firmware download request from the device.
[LXTERM] Flashing firmware/firmware.fbi to 0x40000000 (8376 bytes)...
[LXTERM] Upload complete (2.6KB/s).
[LXTERM] Done.
@DurandA
Copy link
Contributor Author

DurandA commented May 13, 2020

It works fine. I did not realize that erase_flash_sector() uses the 0xD8 command while the Micron N25Q128A datasheet reference this as a block...

Command Command Code
SE (sector erase) 0x20
BE 32K (block erase 32KB) 0x52
BE (block erase 64KB) 0xD8

@DurandA DurandA closed this as completed May 13, 2020
@mithro
Copy link
Collaborator

mithro commented May 13, 2020

@mithro
Copy link
Collaborator

mithro commented May 13, 2020

@DurandA
Copy link
Contributor Author

DurandA commented May 13, 2020

@mithro Thanks! Strangely, LiteSPI doesn't define a sector size so I wonder how partial erase is done.

@mithro
Copy link
Collaborator

mithro commented May 13, 2020

@DurandA -- LiteSPI is only new, I logged litex-hub/litespi#35 to figure out what is happening there.

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

No branches or pull requests

2 participants