Home
last modified time | relevance | path

Searched refs:SPI_FLASH_SEC_SIZE (Results 1 – 11 of 11) sorted by relevance

/device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/src/
Dduet_flash.c92 char tmpbuf[SPI_FLASH_SEC_SIZE] = {0}; in refresh_flash_sector()
94 char *tmpbuf = (char *)lega_rtos_malloc((uint32_t)SPI_FLASH_SEC_SIZE); in refresh_flash_sector()
99 memset(tmpbuf, 0, SPI_FLASH_SEC_SIZE); in refresh_flash_sector()
112 ret = duet_flash_read(tran_partition, &sector_start, tmpbuf, SPI_FLASH_SEC_SIZE); in refresh_flash_sector()
121 ret = duet_flash_erase(current_partition, sector_start, SPI_FLASH_SEC_SIZE); in refresh_flash_sector()
132 ret = duet_flash_write(current_partition, &sector_start, tmpbuf, SPI_FLASH_SEC_SIZE); in refresh_flash_sector()
152 if (end_offset - sector_offset < SPI_FLASH_SEC_SIZE) { in refresh_flash_sector()
154 …ret = duet_flash_write(current_partition, &end_offset, pend, SPI_FLASH_SEC_SIZE - (end_offset - se… in refresh_flash_sector()
227 start_addr = ROUND_DOWN((partition_info->partition_start_addr + off_set), SPI_FLASH_SEC_SIZE); in duet_flash_erase()
228 …addr = ROUND_DOWN((partition_info->partition_start_addr + off_set + size - 1), SPI_FLASH_SEC_SIZE); in duet_flash_erase()
[all …]
/device/soc/esp/esp32/components/app_update/
Desp_ota_ops.c92 memcpy(&two_otadata[1], result + SPI_FLASH_SEC_SIZE, sizeof(esp_ota_select_entry_t)); in read_otadata()
161 … const int aligned_erase_size = (image_size + SPI_FLASH_SEC_SIZE - 1) & ~(SPI_FLASH_SEC_SIZE - 1); in esp_ota_begin()
199 uint32_t first_sector = it->wrote_size / SPI_FLASH_SEC_SIZE; in esp_ota_write()
200 uint32_t last_sector = (it->wrote_size + size) / SPI_FLASH_SEC_SIZE; in esp_ota_write()
203 if ((it->wrote_size % SPI_FLASH_SEC_SIZE) == 0) { in esp_ota_write()
204 …ion_erase_range(it->part, it->wrote_size, ((last_sector - first_sector) + 1) * SPI_FLASH_SEC_SIZE); in esp_ota_write()
206 …rase_range(it->part, (first_sector + 1) * SPI_FLASH_SEC_SIZE, (last_sector - first_sector) * SPI_F… in esp_ota_write()
376 …t = esp_partition_erase_range(ota_data_partition, sec_id * SPI_FLASH_SEC_SIZE, SPI_FLASH_SEC_SIZE); in rewrite_ota_seq()
380 …return esp_partition_write(ota_data_partition, SPI_FLASH_SEC_SIZE * sec_id, &two_otadata[sec_id], … in rewrite_ota_seq()
881 …r = esp_partition_erase_range(ota_data_partition, sec_id * SPI_FLASH_SEC_SIZE, SPI_FLASH_SEC_SIZE); in esp_ota_erase_last_boot_app_partition()
Dotatool.py39 SPI_FLASH_SEC_SIZE = 0x2000 variable
54 spi_flash_sec_size=SPI_FLASH_SEC_SIZE, esptool_args=[], esptool_write_args=[],
/device/soc/esp/esp32/components/spi_flash/
Dflash_ops.c265 CHECK_WRITE_ADDRESS(sec * SPI_FLASH_SEC_SIZE, SPI_FLASH_SEC_SIZE); in spi_flash_erase_sector()
266 return spi_flash_erase_range(sec * SPI_FLASH_SEC_SIZE, SPI_FLASH_SEC_SIZE); in spi_flash_erase_sector()
275 if (start_addr % SPI_FLASH_SEC_SIZE != 0) { in spi_flash_erase_range()
278 if (size % SPI_FLASH_SEC_SIZE != 0) { in spi_flash_erase_range()
284 size_t start = start_addr / SPI_FLASH_SEC_SIZE; in spi_flash_erase_range()
285 size_t end = start + size / SPI_FLASH_SEC_SIZE; in spi_flash_erase_range()
286 const size_t sectors_per_block = BLOCK_ERASE_SIZE / SPI_FLASH_SEC_SIZE; in spi_flash_erase_range()
303 COUNTER_ADD_BYTES(erase, sectors_per_block * SPI_FLASH_SEC_SIZE); in spi_flash_erase_range()
309 COUNTER_ADD_BYTES(erase, SPI_FLASH_SEC_SIZE); in spi_flash_erase_range()
Dpartition.c180SPI_FLASH_SEC_SIZE, SPI_FLASH_MMAP_DATA, (const void **)&p_start, &handle); in load_partitions()
186 p_end = p_start + SPI_FLASH_SEC_SIZE; in load_partitions()
515 if (size % SPI_FLASH_SEC_SIZE != 0) { in esp_partition_erase_range()
518 if (offset % SPI_FLASH_SEC_SIZE != 0) { in esp_partition_erase_range()
/device/soc/esp/esp32/components/nvs_flash/src/
Dnvs_partition_manager.cpp50 assert(SPI_FLASH_SEC_SIZE != 0); in init_partition()
61 result = init_custom(p, 0, size / SPI_FLASH_SEC_SIZE); in init_partition()
139 result = init_custom(p, 0, size / SPI_FLASH_SEC_SIZE); in secure_init_partition()
Dnvs_page.hpp44 static const uint32_t SEC_SIZE = SPI_FLASH_SEC_SIZE;
Dnvs_api.cpp119 partition->address / SPI_FLASH_SEC_SIZE, in nvs_flash_init_partition_ptr()
120 partition->size / SPI_FLASH_SEC_SIZE); in nvs_flash_init_partition_ptr()
Dnvs_page.cpp61 for (uint32_t i = 0; i < SPI_FLASH_SEC_SIZE; i += 4 * BLOCK_SIZE) { in load()
934 auto rc = mPartition->erase_range(mBaseAddress, SPI_FLASH_SEC_SIZE); in erase()
/device/soc/esp/esp32/components/spi_flash/include/
Desp_spi_flash.h32 #define SPI_FLASH_SEC_SIZE 4096 /**< SPI Flash sector size */ macro
/device/soc/asrmicro/asr582x/liteos_m/sdk/drivers/driver/inc/
Dduet_flash_alg.h103 #define SPI_FLASH_SEC_SIZE 0x1000 macro