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

Script openocd-prog-flash.sh doesn't work on AFCv3 #1

Open
guilhermerc opened this issue Aug 23, 2023 · 4 comments
Open

Script openocd-prog-flash.sh doesn't work on AFCv3 #1

guilhermerc opened this issue Aug 23, 2023 · 4 comments
Assignees
Labels

Comments

@guilhermerc
Copy link
Contributor

guilhermerc commented Aug 23, 2023

These are the logs: afcv3.log

@guilhermerc guilhermerc self-assigned this Aug 23, 2023
@guilhermerc
Copy link
Contributor Author

guilhermerc commented Aug 23, 2023

I increased openocd logs' level and executed openocd-prog-flash.sh both on AFCv3 and AFCv3.
These are the logs, again: afcs-logs.zip

@guilhermerc
Copy link
Contributor Author

AFCv4 [1] uses Micron's MT25QL256ABA8ESF-0AAT [2] as FPGA's FLASH memory, whereas AFCv3 [3] uses Micron's N25Q256A13EF840E [4]. These devices share the same Manufacturer and Device IDs (0x19BA20) and openocd handles both the same [5]. However, the 4-BYTE PAGE PROGRAM (0x12) and 4-BYTE SECTOR ERASE (0xDC) commands aren't supported by N25Q256A13EF840E [4, pp. 29-31, note 14].

[1] AFCv4.0.2_LNLS_FOFB.PDF
[2] mt25q_qljs_l_256_aba_0.pdf
[3] AMC_FMC_Carrier_v3.1_LNLS_201709_BPM_.pdf
[4] n25q_256mb_3v.pdf
[5] https://github.com/openocd-org/openocd/blob/2e60e2eca9d06dcb99a4adb81ebe435a72ab0c7f/src/flash/nor/spi.c#L110

@guilhermerc
Copy link
Contributor Author

A work-in-progress fix can be found at lnls-dig/openocd@master...fix-afcv3-flashing.

@guilhermerc
Copy link
Contributor Author

openocd-org/openocd@5d6bf87 adds support for n25q256 flash. At that point, PAGE PROGRAM (0x02) and SECTOR ERASE (0xD8) commands were used, which are supported by N25Q256A13EF840E.

TODO: finish this comment

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

No branches or pull requests

1 participant