Calculation of Bulk and edge states in SSH model

I am reading “A Short Course on Topological Insulators” by János K. Asbóth. et.all., and want to calculate the Bulk and edge state of the SSH model (Chapter 1) to drive the energy spectrum in Fig. 1.4.

The Hamiltonian of the 1D SSH model is as follows: $$H=v\sum^N_{m=1}(|m,B \rangle \langle m,A|+h.c.)+w\sum^{N-1}_{m=1}(|m+1,A \rangle \langle m,B|+h.c.),$$ where there are N unit cells, each with two internal degrees of Freedom, i.e. $$|A\rangle$$ and $$|B\rangle$$. Then, suppose $$w=1$$ and $$N=10$$.
In the trivial state where $$v \gt w$$, I calculate the Bulk state using Born-Von-Karman boundary conditions and the following Bulk momentum space Hamiltonian: $$H(k)=\begin{pmatrix}0&v+we^{-ik}\\v+we^{ik}&0\end{pmatrix}$$ where gives $$E(k)=\pm \sqrt{v^2+1+2v \cos k}$$, for $$k=\frac{2\pi}{N}, \frac{4\pi}{N}, …,2\pi (\text{with}\; N=10)$$.

However, these relations would not reproduce Fig. 1.4. For example, in the special case of $$v=w=1$$ we expect the gapless spectrum while there is a gap in the figure. Moreover, since $$\cos k$$ gives some identical values for $$k=\frac{2\pi}{N}, \frac{4\pi}{N},\ldots,2\pi$$, some of the bands are overlapped and so, it doesn’t appear $$20$$ bands. Also, I don’t know how to calculate the edge sate for the topological case with $$v \lt w$$.

Could anyone please guide me where is my mistake?