Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
How to specify Kinetis FlexNVM Partitioning
Vishal T. Oct 10, 2014 at 02:08 PM (14:08 hours)
Staff: Takao Y.

  • We are considering switching to the Cyclone for Kinetis standalone programmer from a Multilink Universal, but I'm somewhat unsure how it can be configured to partition the available FlexNVM for our device.

    In CodeWarrior we are able to specify this under "Advanced Programming Options" so I think it is possible with the Multilink, but how about the Cyclone?




    Comments

  • Greetings,

    Great question and the answer is within the Cyclone Image Creation Utility. When you load the algorithm, the command "FP: Flash Partition" should be available. This is the same command used in the advanced programming options. Specify the same parameters and it will perform the same. Note, that you must run the erase command after the flash partition command. This is needed just like how you would do a disk format and partition on a hard drive.


    Takao Yamada

  • Thanks! I know this isn't your apartment but I was just about to order the Cyclone for ARM and I see that it is out of stock. Do you know when this might be in stock again?

  • Greetings,

    I asked the sales department and we should have some in stock this week. I suggest placing an order now so that you are put in the queue. These units go really fast.


    Takao Yamada

  • Hi,

    I have a similar question. I'm using KDS 1.1.1 and a Multilink Universal FX and I don't know how to program the partition for the FlexNVM. I'm using the GDB debugger and there is no advanced programming options to specify the partition.

    In theory I should be able to use the standalone programmer to write the partition and then the GDB debugger. I'm using the MK22DX256LVH5 chip and the freescale_k22dx256m5_pflash_dflash_eeprom.arp programming algorithm. When I run the PA partition command I get a dialog box that says ERPART:DE> where I can enter a number (no idea what that means) and then when I perform an erase module it says it is erased and then "Error enabling module just selected".

    I also couldn't find any mention of the partition command in the documentation.

    Ryan Nickel

  • Greetings,

    KDS currently does not have the advanced programming options to allow partition, or preserve data, or custom trim.

    Partition is definitely mentioned in the chip's reference manual. You should find the ERPART (also known as EEESIZE) and DEPART bits found in the manual. Look at the Flash Memory Module.

    If you want EEPROM to be 1024 bytes then you need to set 4b'0100 = 2h'04, and if you want DFLASH to be 32 KBytes then you need to set 4b'0011 = 2h'03. The combined value ERPART:DE = 0403 and that is what you need to enter to partition with command PA.


    Takao Yamada

    • That helped explain what the ERPART:DE dialog meant and I already knew the values for those registers (0x2604 in my case).  I meant that the partition command is not in the P&E manual (at least that I could find).

      So the partition command says it works and when I do an erase after partition the programmer stays connected to the micro so that is forward progress.

      However, when I run a GDB debug from KDS and run my firmware it checks that the partition is correct and I still get an incorrect value (all bits set to 1). Is there a way to check that the partition information was correctly written using the programmer so I can isolate the problem?

  • Greetings,

    Best way to check whether the partition worked is using the PROG software that comes with the Cyclone's software package. PROGACMP in your case. Once you connect to the your chip and select the same algorithm in your standalone, use this software and use the "Show Module" command to see the memory values. If you know the address range of your new EEPROM and DFLASH, then you should check to make sure those ranges are showing all FF. Any address outside of your new partition should all be XX.


    Takao Yamada

  • More progress.  Using the PROG software the partition writes and viewing it with Show Module shows what is expected (256 bytes of FFs and then XX in my case).  However, as soon as I run the GDB Debugger from KDS it seems to be overwriting that area.  When I Show Module after programming in KDS the memory location shows all FFs even for the regions that were XX after initial partitioning.  

    I get the same results running the debugger as well as programming the same file through PROG so I'm wondering if it has to do with the compiling / linking and generation of the output file.

  • Greetings,

    Could you tell me what values of ERPART:DE you have chosen so that I can try to replicate this on my end? Once I can replicate it, I will report it to our GDB team and let them know this should not happen. I have already let them know that they should implement the advanced programming options into the GDB server to allow customers to use more sophisticated settings.


    Takao Yamada

  • I'm using a value of 0x2604 for ERPART:DE to configure for:

    EEPROM Split factor of Subsystem A: EEESIZE*1/2, subsystem B: EEESIZE*1/2
    EEPROM Size 256 bytes
    64 KB of EEPROM backup.

    I got the number from the processor expert CPU component but verified with the reference manual. Oddly the reference manual specifies that that the read-only bits "must always be written as one" but it doesn't seem to matter or match with the codes that PE generated.

  • Greetings,

    I did not have to replicate this because I was just told that we default do not preserve partitions within Codewarrior and KDS. Within Codewarrior, you have the option to preserve partition within advanced programming options. But since KDS does not have advanced programing options, the partition gets lost.

    I have brought this issue up with our development team and they will look into getting these features implemented into future KDS builds. But for now, only Codewarrior has the option to preserve your partition.


    Takao Yamada

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