I am initializing the SMCLK and MCLK to 16 MHz as following:
CS_setDCOFreq(DCORSEL, DCOFSEL_4);
CS_initClockSignal(CS_SMCLK, SELM__DCOCLK, CS_CLOCK_DIVIDER_1);
CS_initClockSignal(CS_MCLK, SELM__DCOCLK, CS_CLOCK_DIVIDER_1);
It works for SMCLK.
But when the line of MCLK executes, the MCU resets.
When I remove the MCLK, it works fine.
What can cause the MCLK to have an issue with this?