The influence of the finiteness of the anchoring energy of a director and the value of flexoelectric polarization on the threshold of a spatially periodic reorientation of the director and the period of the arising structure is considered for a planar nematic cell. The threshold and the period are calculated numerically and the corresponding analytical expressions are obtained for the case of a strong anchoring of the director. It is shown that for a finite azimuthal anchoring energy the range of admissible values of the flexoelectric parameter ν widens, while for a finite polar anchoring energy this range narrows as compared to the case of an absolutely rigid orientation of the director at the cell surface.