i have this motor controller TB6612FNG like the one in this image


in the project designer there is tow types of it 2 pins and 3 pins which one of this is mine
and i'll connect the motor supply voltage from 6v 4AH battery pack and also will supply the vcc for the driver from the same battery after using 5 volt voltage regulator as it recommend 5 volt for vcc and then connect the ground of the battery to the ground of my Axon II is this configuration right or should i use something else