I'd use Adobe Illustrator for this, because it's easier to use for vector work than Photoshop.
Enable the grid, and enable snap to grid.
With the Pen tool draw a spiral like this. Change the stroke width if necessary.
Next, draw lines top and bottom, then switch off snap to grid, and extend the lines at the left hand edge like this - using guides to help you. The point of this is to create a gap the same size as the white gaps inside the pattern. And extend the line at the bottom right hand corner and the top right corner until they align with the outer edge of the spiral.
Delete/hide the guides once you have completed it.
Open the Brushes panel, select everything (CTRL+A), click and drag the graphic into your Brushes panel.
When the New Brush dialog pops up, choose the Pattern Brush option.
Now you have created a Brush. Click OK
Draw a circle, then click on the new Pattern Brush to apply it to the circle. Change the stroke width until the pattern is the right size.
It's also possible to create custom corner tiles for pattern brushes in Illustrator, so that the pattern can continue around corners. For example: