Coordination of multiple platoons involves the design of vehicles' trajectories ensuring splitting and merging of different platoons in a safe and energy-optimal manner. In this work, we consider the split-merge-maintain problem between any pair of platoons in which a number of vehicles temporally split from the rest, allowing the vehicles of another platoon to merge, and move with the preceding and following vehicles as a single, large platoon. Here, the splitting, merging and distancemaintaining tasks are expressed in Signal Temporal Logic (STL) and a control barrier function (CBF) is introduced to encode the STL constraints. The control inputs of the vehicles are, then, found as a solution to a computationally efficient, convex, quadratic program. The effectiveness of the proposed method is verified in simulation.