AnsweredAssumed Answered

Problems with Clocking on K70 with MQX 4.1

Question asked by Chris Solomon on Sep 1, 2014
Latest reply on Sep 17, 2014 by Chris Solomon

Hi,

I am trying to get the clocking working for a product using MQX 4.1.0.1.

The product previously worked with MQX 4.0.1. During the upgrade I would like to use a clock setup based on the code from the example BSP for the K70.

 

We have 2 clock modes:

BLPI

MCGOUT = 4MHz sourced from fast internal reference oscillator.

Clock speeds are

Core/System     4MHz

Bus                    4MHz

Flexbus             4MHz

Flash                 1MHz

 

PEE

MCGOUT = 96MHz sourced from 8MHz OSC0 using PLL0

Clock speeds are

Core/System     96MHz

Bus                    48MHz

Flexbus             32MHz

Flash                 16MHz

 

 

On boot the default clock speed is BLPI, then the application switches to PEE when it has verified external supply is available (We can work on battery or external power).

We never switch back to BLPI, if external power is cut we reset.

 

The problem I have is that while I can start the product at either 4MHz or 96MHz, if I attempt to switch to 96MHz from 4MHz I get a reset.

I have tried to debug with GDB with the watchdogs disabled but (possibly as a result of the changing clocks) I get strange behavior (jumps to nonsense addresses, resets for no particular reason etc.)

 

Adding code to make LEDs light up at different phases makes me thing that I am not getting past the transition into FBE.

 

If anyone has any insights, I'd appreciate it!

 

Thanks

 

Chris

Original Attachment has been moved to: bsp_cm.zip

Outcomes