!
        @brief Erase all the flash.
        
        @exception FlashEraseFailure

def erase_all(self):
        """!
        @brief Erase all the flash.
        
        @exception FlashEraseFailure
        """
        assert self._active_operation == self.Operation.ERASE
        assert self.is_erase_all_supported

        # update core register to execute the erase_all subroutine
        result = self._call_function_and_wait(self.flash_algo['pc_eraseAll'])

        # check the return code
        if result != 0:
            raise FlashEraseFailure('erase_all error: %i' % result, result_code=result)