I've a board with ATSAM4E16C. In this board there is a button connected to ERASE PIN (PB12). I would use it as input but if I push button (connecting to VDD) after about 200 ms the flash is erased. Why?
Works well when in main(), thanks, but I use the pin as default high.
Thus, when power is cycled, flash is erased again...
Where is the best place to place this code?
I have tried in other header files, as well as matrix.h, no luck.