-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
use all spi flash v0.1 #2638
use all spi flash v0.1 #2638
Conversation
ANTodorov
commented
Nov 17, 2024
- introduced a new communication command CMD_FLASHMEM_PAGES64K to get the number of 64k pages
- "the last page" is a special, holding the dicts and some other stuff, relocated to there
- raised timeout when wiping a mem page (W25Q16 looks a bit slower than W25X20BV)
- loop all pages in Flash_WipeMemory()
* introduced a new communication command CMD_FLASHMEM_PAGES64K to get the number of 64k pages * "the last page" is a special, holding the dicts and some other stuff, relocated to there * raised timeout when wiping a mem page (W25Q16 looks a bit slower than W25X20BV) * loop all pages in Flash_WipeMemory()
common_arm/flashmem.c
Outdated
if (flash_init) { | ||
if (!FlashInit()) { | ||
if (g_dbglevel > 3) Dbprintf("FlashDetect() FlashInit fail"); | ||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't mix return codes.
common_arm/flashmem.c
Outdated
@@ -471,6 +500,12 @@ bool FlashInit(void) { | |||
return false; | |||
} | |||
|
|||
#ifndef AS_BOOTROM | |||
if (spi_flash_p64k == 0){ | |||
if (!FlashDetect(false)) return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use same style with Curly Brackets
include/pmflash.h
Outdated
@@ -37,10 +37,16 @@ | |||
#ifndef FLASH_MEM_MAX_SIZE | |||
# define FLASH_MEM_MAX_SIZE 0x40000 // (262144) | |||
#endif | |||
#ifndef FLASH_MEM_MAX_SIZE_P | |||
# define FLASH_MEM_MAX_SIZE_P(p64k) (1024 * 64 * p64k) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use extra parenthesis around params in defines. ie: (1024 * 64 * (p64k))
Nice PR! with some minor things to sort out. |
the data was written, but it should be readable too...
hopefully last one (tm)
the only thing left is how we transition from old to new seamless... Everyone with a rdv4 would need to "re-wipe" their spiffs and run init script to make it work? |
Hmm in the updated version the re is no "protection". I think I should update the page wiping boundaries in the code... just e second
|
Awesome! Now some people can make really long traces and save a lot of files when in standalone mode :) |