mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
use all spi flash v0.1
* 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()
This commit is contained in:
parent
c9e751d27d
commit
48ec109a1e
10 changed files with 193 additions and 36 deletions
|
@ -145,6 +145,37 @@ uint16_t Flash_WriteDataCont(uint32_t address, uint8_t *in, uint16_t len);
|
|||
void Flashmem_print_status(void);
|
||||
void Flashmem_print_info(void);
|
||||
|
||||
typedef struct spi_flash_s {
|
||||
const uint32_t identifier;
|
||||
const uint8_t pages64;
|
||||
const char *desc;
|
||||
} spi_flash_t;
|
||||
|
||||
// spi_flash_t is expected to be NULL terminated
|
||||
const static spi_flash_t SpiFlashTable[] = {
|
||||
// Manufacturer: Puya
|
||||
{ 0x856015, 32, "P25Q16H" },
|
||||
// Manufacturer: Winbond
|
||||
{ 0xEF3012, 4, "W25X20BV" },
|
||||
{ 0xEF3013, 8, "W25X40BV" },
|
||||
|
||||
{ 0xEF4013, 8, "W25Q40BV" },
|
||||
{ 0xEF4014, 16, "W25Q80BV" },
|
||||
{ 0xEF4015, 32, "W25Q16BV" },
|
||||
{ 0xEF4016, 64, "W25Q32BV" },
|
||||
|
||||
{ 0xEF7022, 4, "W25Q02JV" },
|
||||
{ 0x000000, 4, "Unknown!" }
|
||||
};
|
||||
|
||||
#ifndef ARRAYLEN
|
||||
# define ARRAYLEN(x) (sizeof(x)/sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
extern uint8_t spi_flash_p64k;
|
||||
|
||||
bool FlashDetect(bool);
|
||||
|
||||
#endif // #ifndef AS_BOOTROM
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue