Exemple #1
0
 def __init__(self, device):
   self.device = device
   self.hw = self.device.FLASH
   self.sectors = mem.flash_regions(self.device, flash_map[self.device.soc_name])
   # the target voltage controls the erase/write parallelism
   v = self.device.cpu.dbgio.target_voltage()
   if v >= 2700:
     self.volts = self.VOLTS_27_36
     self.lib = lib.stm32f4_32_flash
   elif v >= 2100:
     self.volts = self.VOLTS_21_27
     self.lib = lib.stm32f4_16_flash
   else:
     self.volts = self.VOLTS_18_21
     self.lib = lib.stm32f4_8_flash
Exemple #2
0
 def __init__(self, device):
   self.device = device
   self.hw = self.device.FLASH
   self.sectors = mem.flash_regions(self.device, flash_map[self.device.soc_name])
   # the target voltage controls the erase/write parallelism
   v = self.device.cpu.dbgio.target_voltage()
   if v >= 2700:
     self.volts = self.VOLTS_27_36
     self.lib = lib.stm32f4_32_flash
   elif v >= 2100:
     self.volts = self.VOLTS_21_27
     self.lib = lib.stm32f4_16_flash
   else:
     self.volts = self.VOLTS_18_21
     self.lib = lib.stm32f4_8_flash
Exemple #3
0
 def __init__(self, device):
     self.device = device
     self.hw = self.device.FLASH
     self.pages = mem.flash_regions(self.device,
                                    flash_map[self.device.soc_name])
     self.lib = lib.stm32l4x2_flash
Exemple #4
0
 def __init__(self, device):
   self.device = device
   self.hw = self.device.NVMCTRL
   self.rows = mem.flash_regions(self.device, flash_map[self.device.soc_name])
Exemple #5
0
 def __init__(self, device):
     self.device = device
     self.hw = self.device.NVMCTRL
     self.rows = mem.flash_regions(self.device,
                                   flash_map[self.device.soc_name])
Exemple #6
0
 def __init__(self, device):
   self.device = device
   self.hw = self.device.FLASH
   self.pages = mem.flash_regions(self.device, flash_map[self.device.soc_name])
   self.lib = lib.stm32l4x2_flash