I'm using a TinyAVR 0-series micro. I have an LED on PA3 and a test output on PA5. When I start using the toggle function created by Atmel Start my LED goes crazy. After digging into the code I see this is what is used.
VPORTA.IN |= 0x20;
I think this is the wrong way to use this feature. What I believe happens is if any outputs are on they will show as a 1 if you read VPORTA.IN. So when you do the OR you are effectively reading out and resetting those bits. This causes those IOs to toggle as well. What the code should have done is this
VPORTA.IN = 0x20;
This will only toggle the one bit in question as it will write the other bits to 0.
Am I right with this? I'm new to these micros so I'd like to be sure. If so can I report the bug somehow?