It seems that trying to erase bank 2 using a code running from bank 0 causes bank 0 to erase also.
So I guess I should try running this code from RAM.
Is there a more elegant solution ?
The link: http://www.ti.com/litv/zip/slac166o contains similar example.
But this link does not work.
Can you help ?