Skip to content

anlogic: fix high frequency flash programming issue#599

Merged
trabucayre merged 1 commit intotrabucayre:masterfrom
zh522130:fix-analogic-high-freq-flash
Dec 13, 2025
Merged

anlogic: fix high frequency flash programming issue#599
trabucayre merged 1 commit intotrabucayre:masterfrom
zh522130:fix-analogic-high-freq-flash

Conversation

@zh522130
Copy link
Contributor

When programming the flash on my EG4S20BG256 at 15 MHz, an error occurs. Details:

Jedec ID: ff  
Memory type: ff  
Memory capacity: ff  
Flash chip unknown: use basic protection detection  
Unlock blocks  
Error: block protection is set.  
Cannot unlock without --unprotect-flash  

This issue arises because reading the ID cannot be performed at too high a clock frequency. I resolved this by limiting the clock frequency for reading the ID. The official programming tool also adjusts the frequency dynamically, though it is more conservative than my code—I recall it drops to 3 MHz. The 6 MHz frequency was set as a reference to the original default frequency. This can be adjusted later if any issues arise.

@trabucayre trabucayre merged commit 7ed4954 into trabucayre:master Dec 13, 2025
14 checks passed
@trabucayre
Copy link
Owner

Applied.
Thanks @zh522130 !

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.

2 participants