Hi, so i have a samd21j16b, with a 32khz external crystal.
on setup if i have the tick on Exterla 32K Oscillator Enable, it won't start, it gets stuck waiting for PCLKSR.XOSC32KRDY. If i don't put the tick, it skips that comprobation and it start without problems.
#if CONF_XOSC32K_CONFIG == 1
#if CONF_XOSC32K_ENABLE == 1
#if CONF_XOSC32K_ONDEMAND == 1
I have made a code where i'm placing the clock input to GCLK_GEN_2 and then to an external pin(with function H), and when i measure with osciloscope i read 32.890 kHz(have to play with the capacitors to adjust it later).
So it seems to be working just fine. Even if PCLKSR.XOSC32KRDY never sets.
What is the problem here? why PCLKSR.XOSC32KRDY never sets? i need ultra precision for it to set? 32.768kHz? or is just a problem with atmel code or chip?