Now I am writing the funciton of erase p_flash .My method is that follow that.

when I disable the timer interrupt,the p_flash 0x19000 can be written. But when I open the timer interrupt ,the mcu would reset. So,When I write p_flash,the interrupt should be colased?