I posted a problem with ADC sample speed a few days ago and people pointed out to me that the limited speed was no surprise as it was all written with ASF code.
Now I got rid of the ASF code and callback function and I also changed the ADC initialization from ASF to writing the registers directly, which does not work.
I can write to other IO registers, but not to ADC registers.
I put two write operations in succession, the assembly code is the same for both operations, register 0x0601 is written to, register 0x0241 not. I have no idea why. Please help.
PORTA_DIRSET = BIT(6); 00000E41 LDI R24,0x40 Load immediate 00000E42 STS 0x0601,R24 Store direct to data space ADCB_CTRLB = BIT(6); 00000E44 STS 0x0241,R24 Store direct to data space