System and method for controlling an erase voltage during erasure of a plurality of sectors of a flash memory