add status check and clear to atmel_flash_page