Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
need to perform "real" Mass Erase on Kinetis
Renè M. Jan 19, 2015 at 04:58 AM (04:58 hours)
Staff: Takao Y.

  • Good morning,
    I need to perform a real mass erase to kinetis MK22dx256.
    I must erase also the IFR registers (I need to change the flash partition registers).
    I'm currently using the flash programming algorithm: freescale_k22dx256m5_pflash_dflash_eeprom.arp
    How can I modify this file in order to obtain a complete mass erase of the device?
    Thanks in advance,
    Cristiano




    Comments

  • Greetings,

    Could you tell me which software you are using? Are you using Codewarrior or KDS, or P&E software, or other? This is important because this involves both algorithm and software implementation to do a mass erase correctly.

    Also, if you could detail us more information like which P&E interface you are using and its revision that would be helpful as well.


    Takao Yamada

  • Good morning,
    I'm using Progacmp (5.04.00.00) with multilink universal.
    Thanks alot,
    Cristiano

  • Greetings,

    The algorithm you have mentioned does a mass erase when you execute any erase commands.

    Have you taken a look at the "PA" command for Partitioning? When you load the algorithm, look for this command. Set up the EE and Dflash partition, then use the EM command afterwards to execute the partition.

    Could you tell me where I can find the IFR register? I cannot find it in the reference manual.


    Takao Yamada

  • Greetings,
    in the algorithm: "freescale_k22dx256m5_pflash_dflash_eeprom.arp" part of the code is:

    REQUIRES_PROG_VERSION=1.17/
    NO_ON_CHIP_RAM
    DO_MASS_ERASE_AND_RESET ;Perform MDM Mass erase
    NO_TIMING_TEST
    ;PRESERVE_PARTITION ;Preserve Partition through erase
    WRITE_LONG=00FF003F/4001F000/ ;Disable Master0..2 prefetching
    WRITE_LONG=30020000/4001F004/ ;Disable Cache and Prefetching on Flash Bank 0
    WRITE_LONG=30020000/4001F008/ ;Disable Cache and Prefetching on Flash Bank 1
    WRITE_LONG=FFFFFFFF/40020010/ ;All PFlash protection off
    WRITE_WORD=FFFF/40020016/ ;All DFlash and EEPROM protection off

    as you can see, I have put a semicolon on PRESERVE_PARTITION.

    WITHOUT semicolon the EM command DO NOT ERASE the partition Bytes.
    WITH semicolon the EM command ERASES also the partition Bytes.

    Is it correct?
    Thanks,
    Cristiano

  • Greetings,

    Yes, you can also put a semicolon on the preserve partition line as well. But the danger with this is it will now always mass erase and you will have to partition the flash each time.

    My method was to load the algorithm without any change and to use the PA command that shows up in PROG software. This is where you specify the EEPROM and DFlash partition bits and erase the flash to execute it.


    Takao Yamada

  • Excellent, now everything is clear.
    Thanks a lot,
    Cristiano

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