How can I reenable CLK_OUT on KW2x?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I reenable CLK_OUT on KW2x?

628 Views
andrewfitzsimon
Contributor II

Hello,

I am no long able to JTAG program my KW2x. When attempting to program it via IAR, my debugger is unable to stop the CPU clock. I have made a modification to the code within the PlatformInit.c file and believe it to be the cause of my issue.


At the end of PlatformInit.c::Platform_Init() I have called :

    MC1324xDrv_Set_CLK_OUT_Freq(gCLK_OUT_FREQ_DISABLE);


From what I've seen in the datasheet, the modem's clock_out signal can be used to run the CPU clock. Since I have disabled the modem clock_out, perhaps my CPU has no running clock source. Is there a way that I can recover my MCU from this? Perhaps halt all operation before this instruction is reached, or flash the running code from the MCU?




Thanks,

Andrew

Labels (1)
Tags (1)
2 Replies

435 Views
andrewfitzsimon
Contributor II

Angel,

Thanks for your reply. I'm using a custom stack and application, and am targeting the TWR-KW24D512 as well as a KW22D512 custom board. The issue happens on both targets. I will try using the openSDA to program the TWR board.

I will also try the TestTool firmware loarder and the Segger options.

Let me get back to you on how all of it works.

Thanks,

Andrew

0 Kudos

435 Views
AngelC
Senior Contributor I

Dear Andrew,

Which software stack and application are you using exactly? Are you using a custom board or is it a development board from Freescale? Does this happen in all of your boards?

If you are using a development board, I would recommend you to try loading a new firmware using the openSDA interface. Simply change the debugger settings in IAR project to use PEmicro openSDA and use a USB cable to start loading it.

You may also way to try the TestTool Firmware loader and see if that works too.  Simply open TestTool (included in BeeKit installation) and launch the Kinetis Firmware loader. Select the binary file and start uploading it via JTAG.

Moreover, you could always try to unlock the KW2x device using Jlink commander from Segger. Please refer to the post https://community.freescale.com/message/473258#473258 for further details.

Regards,

AngelC