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
Freeze during Stand Alone Flash
Jerome V. Dec 9, 2016 at 06:20 AM (06:20 hours)
Staff: Takao Y.

  • Hello All,

    I'm trying to flash a MPC5748G micro.
    In the CFlash module, I dont want to remove all the data but just to update some data in a address range.
    When I try to launch the programmation without any erase, the cyclone freezes on the first address to program.
    Is it possible to only update some datas in the C Flash module ?
    Thanks a lot,



  • Greetings,

    The most important thing is that you avoid overwriting any addresses that are already programmed. If the address has been programmed, you must erase.

    Currently we do not support block erasing, which would allow you to erase blocks of flash instead of the entire flash module.

    However, what you should look into is our preserve range feature:

    Takao Yamada

  • Thanks a lot for your answer Takao.
    I have some differences with the example in your link.
    My configuration file is :

    ;version 1.03, 08/30/2016, Copyright P&E Microcomputer Systems, [5748G_6096k]
    ;device Freescale, MPC5748G, 1x32x1524k, desc=CFlash
    ;begin_cs device=$00F8C000, length=$005F4000, ram=$40000000
    WRITE_LONG=0000C520/FC050010/ ;Disable Watchdogs
    BLOCKING_MASK=00000007/ ;min 8 byte write
    WRITE_LONG=00008000/FFFE0000/ ;Reset any prior flash read errors
    WRITE_LONG=BE82FC00/FFFE0010/ ;Enable Low and Mid blocks for prog/erase
    WRITE_LONG=0000FFFF/FFFE0014/ ;Disable High Blocks for prog/erase
    WRITE_LONG=00000000/FFFE0018/ ;Enable 256K blocks[31:0] for prog/erase
    WRITE_LONG=00000000/FFFE001C/ ;Enable 256K blocks[47:32] for prog/erase

    I have added the preserve range but I dont have ADDR_RANGE. Is it expected ?
    WRITE_LONG commands can have an influence ?
    Thanks a lot

  • Greetings,

    ADDR_RANGE is not used in your case and not of concern.

    WRITE_LONG commands are used to modify registers in the chip to be able to set up the flash module and disable the watchdog. This can also be used to set up external flash or clock setup. But note that this is only used for flash programming. The moment you reset the chip, all of the write_longs are back to its default values.

    Takao Yamada

  • Ok thank you for the clarification.
    So from your point of view, My modification is correct and should work ?

  • Because I do a : 
    - CM
    - SS
    - EN
    - PM
    - VC

    I flash my microcontroller and the application doesnt start.
    And when I try to read my memory, the address with the PRESERVE_RANGE are empty and equal to FF.
    During the erase, the address with the PRESERVE_RANGE should not be erased correct ?


  • Greetings,

    You are missing the '/' at the end of each line, which will make a difference.

    You implemented:


    which translates to preserving data from $F8_C000 to $FE_0000, and $130_0000 to $158_0000. Is this correct?

    Takao Yamada

  • Yes this is correct.
    I have added the '/' at the end of each line, and I have the same issue.
    If I try to remove the "Erase if not blank", the cyclone freezes during the programmation (Freeze with the FE 0000 address).

    If I read back the memory, datas between F8_C000 and FE_0000 are equal to FF, that's why my application doesnt start.

  • Greetings,

    The preserving is happening on erasing. So you cannot remove any erase commands to get this working.

    Reprogram your data so that it is not FF, and try again. Note, you may want to use the original algorithm without the preserve range to reprogram the data because otherwise you will keep preserving the same address locations. Keep two separate algorithms.

    Takao Yamada

  • Oh I think that we have a misunderstanding.

    First, I use the original algorithm in order to program my module.
    I have no problem with this and my application works fine.

    After that, I just want to change some datas.
    I dont want to change the value between address F8_C000 and FE_0000.
    Normally, with the PRESERVE_RANGE, I should keep my data between F8_C000 and FE_0000.
    But when I read back the memory after the flash with the modified algorith, the data between F8_C000 and FE_0000 are equal to FF.
    I dont understand why these addresses are erased.

    Thanks a lot

  • Greetings,

    What software are you using? Or are you using standalone flash programming?

    If you are using PROG software, after the EN command you should see that data is written back to those location. Please confirm this first before moving on to using anything like cyclone standalone.

    Takao Yamada

  • I'm using the standalone flash programming.

  • Greetings,

    Switch to PROG software to confirm that this is working first. You have this software already in your cyclone software package.

    Note, that in standalone you are limited to the RAM size in the cyclone for preserving data. Your data range may be too large to handle, especially your second range set. Within PROG, your computer's RAM space is much larger so we can store a lot more space.

    Takao Yamada

  • Yes you are right it is working with the PROG Software.

  • Greetings,

    Then we know the limitation is within the standalone.

    My assumption is you are using a cyclone max, which does not have a lot of RAM space to cover the amount of preserve range you are trying to accomplish.

    Is using PROG software sufficient for your case? or you must have standalone working?

    Takao Yamada

  • The PROG Software is for the moment sufficient for my case.
    Thanks a lot for your help

Add comment

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

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