HELLO,
I'm so glad to receive ur reply.
I have tried to use code to my project.But it seems work unsuccessfully.
I write the datas to EEPROM ,but read its data is still OXFF.
The codes U gave contain many fuctions.

Please tell which one I can use to erase and write.
Now I use fuctions as blow.

And I also read the MC9S08PA4 datasheet ,it tells me that EEPROM memory address is from 0X3100 to 0X31FF.So I called the functions like this ,Is that right? Glad to your retry ,Thank U!

Best
Regard!