Smart battery (DJI) reading/writing

As said I am a newbye, so it is not easy to completely understand your explanation. I have to study every single command and then go back to the code.
I have a few questions:

  • do I have to "put" the battery/chip in a "writing" mode or it would be possible just to make the connection and run the code?
  • is there the risk of locking/damaging the battery/chip?
  • do I have to put the whole code in a sketch?
  • Thank you for your help.