Some memory cards and USB pen drives have write protection switches,
which allows you to prevent files from being deleted, or any new files
being written to the device. It also prevents the drive or card from
being formatted.
Occasionally, you’ll find that a USB flash drive will refuse to format and Windows will tell you that it is write protected, even though there is no switch.
Here are a couple of methods you can try to format the drive and
remove the write protection. Bear in mind that there is no guarantee
that they will work for you: your drive or memory card may be corrupt or
broken and no utility or low-level formatting tool will make it work
again. The only solution in this case is to buy a new drive.