Merge pull request #261 from CogentEmbedded/spi_limit_rd_burst_len

Limit automatic read burst length to 64K
This commit is contained in:
Gwenhael Goavec-Merou
2022-10-16 21:39:36 +02:00
committed by GitHub
2 changed files with 17 additions and 1 deletions
+4 -1
View File
@@ -382,8 +382,11 @@ int SPIFlash::erase_and_prog(int base_addr, uint8_t *data, int len)
bool SPIFlash::verify(const int &base_addr, const uint8_t *data,
const int &len, int rd_burst)
{
if (rd_burst == 0)
if (rd_burst == 0) {
rd_burst = len;
if (rd_burst > 65536)
rd_burst = 65536;
}
printInfo("Verifying write (May take time)");
+13
View File
@@ -177,6 +177,19 @@ static std::map <uint32_t, flash_t> flash_list = {
.bp_len = 0,
.bp_offset = {0, 0, 0, 0}}
},
{0xBF2643, {
.manufacturer = "microchip",
.model = "SST26VF064B",
.nr_sector = 128,
.sector_erase = true,
.subsector_erase = true,
.has_extended = false,
.tb_otp = false,
.tb_offset = 0,
.tb_register = NONER,
.bp_len = 0,
.bp_offset = {0, 0, 0, 0}}
},
{0x9d6016, {
.manufacturer = "ISSI",
.model = "IS25LP032",