Do I need to do anything to get voltage on my I/O pins on the ATSAM4LC2? I made a small program that just toggles pin PA20. On an ATSAM4LC4 it works fine, but if I do the same on a ATSAM4LC2 the IO pin just toggles if I put an external pullup on it.
I tried to enable pullup on the I/O control registers, but it didn't help. I am applying power to VDDIO and VLCDIN. Not sure what could be wrong. Tried everything I could think of already!
I make one C project that simply creates a square wave on PA20 (as mentioned above). Write that to a board with the ATSAM4LC2A and to a board with the ATSAM4LC4C. The board with the ATSAM4LC4C works perfectly - square wave outputs fine. The one with the ATSAM4LC2A only outputs the square wave if there's an external pullup resistor.
Question: Does the ATSAM4LC2A require any special internal initialization to apply power to the GPIO outputs that the ATSAM4LC4C don't need?
I tried that on 2 boards with the ATSAM4LC2A. Both had the same result. I am, however, using different programmers for both. On one I'm using an J-Link with OpenOCD. The other is a development board (SAM4L XPLAINED) that has its own SWD programmer inside, so I'm programming it directly from Atmel Studio 7.
- - - Updated - - -
Apparently it has something to do with LCDA (the supply for that pin). If I do the same thing with PA05 (which is supplied by VDDANA), it works fine, and I get a perfect square wave with no need for a pullup. My VLCDIN pin is indeed at 3.3V.