Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
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 keil.com 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:
    [KE02Z64M4]
    DOTRIM=1
    PRESERVE1_START=0
    PRESERVE1_END=0
    PRESERVE1_ACTIVE=0
    PRESERVE2_START=0
    PRESERVE2_END=0
    PRESERVE2_ACTIVE=0
    PRESERVE3_START=0
    PRESERVE3_END=0
    PRESERVE3_ACTIVE=0
    PRESERVE_EEPROM=0
    CUSTOM_TRIM=0 <<<<<<<<<<<<<<<<<<This one
    NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY=39062 <<<<<<<<<<<<<<<<<<This one
    CURRENT_ALGORITHM_INDEX=0
    ALTERNATIVE_ALGORITHM_PATH=
    ALTERNATIVE_ALGORITHM_CHECKBOX=0
    PRESERVE_EEPROM_START=0
    PRESERVE_EEPROM_END=0
    ENABLE_FLASH_PROGRAMMING_DIALOG=0

    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:

    09BIT_TRIM=40064002/40064003/01/000003FF/000003FE/01000000/

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

    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??




    Comments

  • Hi Mark, 

    Currently, the trim cannot be programmed in Keil MDK

Add comment


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







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