AnsweredAssumed Answered

Changing speed crashes debug session

Question asked by Lasse Madsen on Oct 11, 2012
Latest reply on Oct 31, 2012 by Pedro Augusto Panecatl Salas

Hi Guys and Girls,

 

I'm running with the K40 MCU and using KEIL uVision4 together with uLinkPRO and I'm having the following problem:

 

I boot the mcu in BLPI mode running of the internal oscillator - then I change it PEE running from an external 2MHz clock source which is then multiplied up to 96MHz.

 

If i disconnect the debugger my code runs as expected and i see the change on the TRACECLOCK pin from 2MHz to 96MHz (or half because of the divide by 2 inside the trace clock pin)

 

If i connect the debugger and try and single step through the clock change the debug session "goes crazy" and crashes after it goes from 2MHz to 96MHz so it's as if the debugger goes into some weird state when the kinetis speed changes.

 

Is there anything I should be aware of when changing speed (from a debugger or software point of view ?) do i need to use the bTRST pin to restart the debug session somehow or something different ?

 

By the way i use the processor expert generated framework with Cpu_SetClockConfiguration (x) to change clocks so i'm sure that the code is viable (also because i seen on traceclock pin that it does go to right speed)

 

Any ideas?

 

/Lasse

Outcomes