Question
How to Switch the STM8L152 the sys clock source for HSI to LSI
Posted on February 12, 2011 at 04:39
I can change the sys clock source from HSI to LSI success in the debug mode with ST_LINK in the IDE Iar for stm8.
But it can't success when abort the debug mode. i need a help,someone can help me. This is my code: CLK_CKDIVR_CKM = 0; //???????? CLK_ICKCR_LSION = 1; //??LSI while(CLK_ICKCR_LSIRDY); //??LSI?? CLK_SWCR_SWEN = 1; //?????? CLK_SWR = 0x02; //??LSI???? while(CLK_SCSR != 0x02); //??LSI???????? // CLK_SWCR_SWEN = 0; //?????? // CLK_ICKCR_HSION = 0; //??HSI?? #lsi-stm8l