What is the specific function of ATP in photosynthesis?

For one triphosphate to break off to form energy for glucose to break down.