Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
Trimming of SIRC on Kinetis MKE02Z64M4 with OpenSDA and Keil MDK
mark d. Jul 3, 2015 at 10:02 AM (10:02 hours)
Staff: Juan S.

  • Hello,
    I'm a Freescale FAE with 13 years experience with P&E tools. Normally I am self-sufficient with your tools.
    I've been asked by a customer to show them how to perform a customer trim on a KE02 device on FRDM-KE02Z (40Mhz) board USING KEIL MDK.I can happily trim a part with KDS using the 'Advanced' dialog, and a memory window in the debugger shows various values written to 0x000003FF/0x000003FE as I change the custom trim. Doing the same with Keil is proving difficult.
    MDK uses the initialisation file pemicro_connection_settings.ini in the root directory of a project. I've tried the following process:
    1) Delete *.ini file.
    2) Tell MDK to use "Pemicro OSJtag/Multilink/Cyclone" debugger (this creates the *.ini file), specify the OpenSDA Embedded Tower Debug - USB Port and the cpu KE02Z64M4 (this is working OK as I have installed fslkinetisdriversv120.exe from into MDK v5.11.1)
    3) Run a debug session ==>> then the *.ini file is fully populated.
    4) close debug session.

    The pemicro_connection_settings.ini has a couple of relevant settings:
    CUSTOM_TRIM=0 <<<<<<<<<<<<<<<<<<This one
    NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY=39062 <<<<<<<<<<<<<<<<<<This one

    As you can see, I've edited the *.ini file, but the user trim value is not written to the flash. The relevant *.arp file (I assume it is using <Keil>\ARM\PEMicro\P&E\freescale_ke02z64m4_pflash_eeprom.arp) has the settings for user trim values:


    However, editing the *.ini file does not make the trim value appear in flash. I was simply trying the platinum project in the sample code download from

    I have my doubts about the linker in the project, as I think that it is placing code over 0x0000_03FF, but I did try changing the location of the user trim in *.arp file to 0x0000_FFFF/FFFE but again this did not work.

    Do you have nay suggestions or recommendations about what I might be doing wrong??


  • Hi Mark, 

    Currently, the trim cannot be programmed in Keil MDK

Add comment

   Want to comment? Please login or create a new PEMicro account.

© 2019 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement