SNIU028D February 2016 – September 2020 UCD3138 , UCD3138064 , UCD3138064A , UCD3138128 , UCD3138A , UCD3138A64
Erasing Program Flash is exactly the same as the procedure for Data Flash, above, except that Program Flash is divided into 32 pages of 1024 bytes each. Of course a different register is used, the PFLASHCTRL register.
The other issue with Erasing Program Flash is that this is the normal location for programs to run, and it is not possible to execute from Program Flash while erasing it or writing to it. So a suitable program must be placed in either Data Flash or RAM, and executed while the functions are being performed.