ST instruction of avr in microchip stuio (avr studio) nor working as expected
I found the reason here. the register I am trying to write to is a &quot;reserved&quot; register that is it cannot be written to.

I tried the same code with 0x4c (the SPDR register) and it works perfectly.