Why all the kinetis MCU that I have try dont'work if I set MCG frequency under 100kHz?

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

Why all the kinetis MCU that I have try dont'work if I set MCG frequency under 100kHz?

491 Views
alessiopaolucci
Contributor III

There is a reason because various kinetis mcu (kl25z, kl03, and k64f) don't work if I setting System Frequency under 100kHz (Specially at 32KHz I have ever an error during the debug) or I forgot something to set?

0 Kudos
3 Replies

328 Views
alessiopaolucci
Contributor III

Hi Jingjimg Zhou, Thanks for your answer!

I'm using OpenSDA so it's possible that I have this problem. When I can, I will try at download the code directly on flash.

Have a great day,

Alessio

0 Kudos

328 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Alessio Paolucci,

      You can put the JLINK_OPENSDA firmware into your bootloader, then your debugger will be a JLINK.

      If you use the Jlink, you can debug your code even your MCG frequency under 100khz.

    KL03 and KL25, please use the attached Jlink firmware:  JLink_OpenSDA_KL25_KL03.rar

    KL64, please downloader OPENSDA v2 from this link: https://www.segger.com/opensda.html

    About how to put the Jlink firmware into your bootloader, please follow this steps:

    1: unplug the USB cable

    2: press and hold the reset button on the board

    3: plug the USB cable between the OPENSDA USB connector and your computer

  4, release the reset button , you will find a "BOOTLOADER" disc in your computer

  5, Send "JLink_OpenSDA.sda" to your "Bootloader"

  6, repower on again

  Then, your debugger will be a Jlink, you can use it to debug your code.

Wish it helps you!

If you still have problem, please contact me!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

328 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Alessio Paolucci,

  Could you tell me what debugger you are using?

  If you are using OPENSDA, it really have a debugger problem when the MCG clock is very slow, but you can download the code to your flash, and test the code function without the debuger.

  I create a KL25 project, the MCG output is 32.768Khz,  the code function is toggle PTB18.

  My code configuration is as follows:

pastedImage_0.png

The test result is :

(1). With OPENSDA debugger, just can download code to flash, the code function is OK.

(2).  With Jlink debugger, it can do debug operation, the code function is OK.

I think the opensda debugger have clock limitation,  so if you are using low mcg out clock, you can choose Jlink.

I also attached my testing code, you can refer to it.

Wish it helps you!

If you still have problem, please contact me!


Have a great day,
Jingjing

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------