parameters: (self)
return_statement: return True
docstring: Does a chip erase using the NVM controller
          Note that on locked devices this it not possible
          and the ERASE KEY has to be used instead
docstring_summary: Does a chip erase using the NVM controller
          Note that on locked devices this it not possible
          and the ERASE KEY has to be used instead
docstring_tokens: Does a chip erase using the NVM controller Note that on locked devices this it not possible and the ERASE KEY has to be used instead
function: def chip_erase(self):
          """
          Does a chip erase using the NVM controller
          Note that on locked devices this it not possible
          and the ERASE KEY has to be used instead
          """
          self.logger.info("Chip erase using NVM CTRL")
  
          # Wait until NVM CTRL is ready to erase
          if not self.wait_flash_ready():
              raise Exception("Timeout waiting for flash ready before erase ")
  
          # Erase
          self.execute_nvm_command(constants.UPDI_V1_NVMCTRL_CTRLA_CHIP_ERASE)
  
          # And wait for it
          if not self.wait_flash_ready():
              raise Exception("Timeout waiting for flash ready after erase")
  
          return True
function_tokens: def chip_erase ( self ) : self . logger . info ( "Chip erase using NVM CTRL" ) # Wait until NVM CTRL is ready to erase if not self . wait_flash_ready ( ) : raise Exception ( "Timeout waiting for flash ready before erase " ) # Erase self . execute_nvm_command ( constants . UPDI_V1_NVMCTRL_CTRLA_CHIP_ERASE ) # And wait for it if not self . wait_flash_ready ( ) : raise Exception ( "Timeout waiting for flash ready after erase" ) return True