We study the behavior of spinless fermions in superconducting state, in which the phases of the superconducting order parameter depend on the direction of the link. We find that the energy of the superconductor depends on the phase differences of the superconducting order parameter. The solutions for the phases corresponding to the energy minimuma, lead to a topological superconducting state with the nontrivial Chern numbers. We focus our quantitative analysis on the properties of topological states of superconductors with different crystalline symmetry and show that the phase transition in the topological superconducting state is result of spontaneous breaking of time-reversal symmetry in the superconducting state. The peculiarities in the chiral gapless edge modes behavior are studied, the Chern numbers are calculated.