spi_flash_read(mem_sector0,(uint32_t *)&watering_valve[0],4096);
spi_flash_read(mem_sector1,(uint32_t *)&watering_valve[0]+4096,NUMBER*sizeof(watering_valve[0])-4096);
spi_flash_erase_sector(mem_sector0>>8);
spi_flash_write(mem_sector0,(uint32_t *)&watering_valve[0],4096);
spi_flash_erase_sector(mem_sector1>>8);
spi_flash_write(mem_sector1,(uint32_t *)&watering_valve[0]+4096,NUMBER*sizeof(watering_valve[0])-4096);