I would like to write the MTP memory with my own values, I don´t want to use the inc/dec API functions. Can you give me some example ?
See the MTP memory usage details in chapter 7.8 of AN370.
Below is an example for the scenario that is described in chapter 7.8.2.
BYTE xdata *pbRData; //pointer to the copy of the MTP content in XRAM array
//set bandgap/ldo for MTP use
pbRData = pbMtp_Read(); //read MTP into XRAM array
// manipulate data in the XRAM array:
abButtonFrame = pbRData; //read byte
pbRData = abButtonFrame; //write byte
// write XRAM array to MTP memory
PCON = PCON; /* Dummy instruction required after EA setting */