I'm working on a demo program for which I want to use minimal resources: all I need is one LED and one pushbutton.

I'd very much like to use on-board resources. The user LED (PB27) is fine (I'd have liked one more, but there it is).

I read in the datasheet that the ERASE button can be used as an input (PC0) provided that I clear the SYSIO12 bit in the System I/O Configuration Register CCFG_SYSIO.

I find that if I do this I can push the ERASE button without erasing flash (!), but PC0 always reads as 0 (even if I enable pullup; ought to be already enabled, you'd think).

I should say that PC1 works just fine.

Has anyone else got ERASE => PC0 to work? is there documentation I've missed? (in ASF, some of the other boards in sam/applications/getting_started/ disable the ERASE button, but not this one).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.