Thank you for reply. 1. MCU is not running at 12MHz! It is running exactly at 312.5kHz... Looking for solution. Any advices? I was deceived by UART, because it was running at expected baudrate with such system clock initialization. Possibly, SMCLK running at 12MHz, but not MCLK. How is it possible? 2. Yes, my loop is correct, I've checked disassembly. So measurements were surprisingly accurate! UPD: I've checked SMCLK, it is running at 12MHz.
↧