AnsweredAssumed Answered

ST-Link not working after sysclk is lowered

Question asked by lim.songgee.001 on Sep 10, 2012
Hi,

I am having an issue with ST-LinkV2 on a STM32L-discovery board not communicating with the IAR debugger after the system clock is lowered. In my code, I started off with the sysclk at 4.194Mhz (using the MSI), and then I break the execution, and changed a variable (var1) which changes the clock to run at 65khz, and then continue running the code.. After a few seconds, when I tried to break again, the IAR debugger will not respond, until I unplug the USB cable..

Any advice how to handle this case, I need to be able to debug when clock is changed..

if (var1 == 1)
{
   RCC_MSIRangeConfig(RCC_MSIRange_0);  // changes clock to 65khz
   var1 = 0;
}

Outcomes