Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
Unable to flash MFC52259 with USB-ML-CFE Rev.C
Gansheng O. Sep 21, 2017 at 04:20 PM (16:20 hours)
Staff: Takao Y.

  • I use CodeWarrior for MCU IDE Version: 10.2 for MFC52259 flash programming and debugging. When I tried to program internal flash, I got below error message as attached.

    I already install:
    1. USB-ML-CFE Rev.C driver: PEDrivers_install.exe
    2. Patch:CW72_patch_CF.zip
    3. In case, unsecured: unsecure_cf.zip
    4. CodeWarrior for MCU IDE Version: 10.2

    Would you have any clue?

    Attached:
    fl::target -lc "LC for Simple Flash"
    fl::target -b 0x20000000 0xffff
    fl::target -v off -l off
    cmdwin::fl::device -d "CFM_MCF5225X_512" -o "256Kx16x1" -a 0x0 0x7ffff
    cmdwin::fl::image -f "C:\\Users\\ouga\\Perforce\\OuGa_2_P2R5\\P2R5\\Main\\CW\\Zeus\\MCF52259_Internal_Flash\\amat.elf" -t "Auto Detect" -re on -r 0x0 0x7ffff -oe off
    cmdwin::fl::erase image
    Beginning Operation ...
    -------------------------
    Auto-detection is successful.
    File is of type Elf Format.

    Performing target initialization ...
    Downloading Flash Device Driver ...
    Reading flash ID ...
    Error: The Get Flash Device ID Command failed. Flash driver reports the following error(s): The flash device algorithm was interrupted during execution.
    Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.
    If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash
    bank port size.
    Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down
    loading the algorithm to DDR try checking your DDR configuration.
    Error: Getting flash ID failed
    An invalid preference was passed to the ColdFire GDI protocol. Bus Error while reading/writing memory.(ColdFire GDI Protocol Adapt
    er)
    Error: The Get Flash Device ID Command failed. Flash driver reports the following error(s): The flash device algorithm was interru
    pted during execution.
    Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.
    If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash
    bank port size.
    Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down
    loading the algorithm to DDR try checking your DDR configuration.




    Comments

  • Greetings,

    Using CW72_patch_CF.zip is completely wrong. This patch is only for classic codewarrior CW7.2. Trying to use that in CW10.x is actually cause more problems. Please revert to using original files.

    I would advise updating your software to CW10.7.


    Takao Yamada

  • Hi,

    Thanks for your response.

    Before I added the patch, it had the same issue. I added the patch for I read some comment from P&E website, and did a try.

    I will try to update CodeWarrior to Ver 10.7.

    The issue is in"Erase and program flash devices"

    Thank you
    Gansheng

  • Hi,

    I tried to update firmware with: usb_ml_coldfire_v2-v3-v4_firmware_update.zip for the emulator, but I did not find the update tool. Would you know what tool I should use?

    Thanks,
    Gansheng

  • Greetings,

    Just update the software to CW10.7. It will include new firmware for your hardware interface if there is any. Just trust me and no need to look for other solutions or workarounds.


    Takao Yamada

  • Hi,

    My CodeWarrior is V10.2. When I checked for update, after checked it said no update found. Could you tell how to update to V10.7? My CodeWarrior was purchased by company: MKS Instruments. There is evaluation version I can download. Does original license support this one?

    Thanks,
    Gansheng

  • Greetings,

    We do not sell Codewarrior software. You need to contact NXP to resolve any licenses or get the latest software.


    Takao Yamada

  • Hi,

    I used CodeWarrior V10.7 evaluation version. But I still get the same issue.

    I built a brand new simple project, and got the same issue as below attached.

    Thanks,
    Gansheng

    Attached:

    fl::target -lc "LC for Simple Flash"
    fl::target -b 0x20000000 0xffff
    fl::target -v off -l off
    cmdwin::fl::device -d "CFM_MCF5225X_512" -o "256Kx16x1" -a 0x0 0x7ffff
    cmdwin::fl::image -f "C:\\Users\\ouga\\Documents\\workspace\\CodeWarrior107\\testMCP52259\\FLASH\\testMCP52259.elf" -t "Auto Detect" -re on -r 0x0 0x7ffff -oe off
    cmdwin::fl::erase image
    Beginning Operation ...
    -------------------------
    Auto-detection is successful.
    File is of type Elf Format.

    Performing target initialization ...
    Downloading Flash Device Driver ...
    Reading flash ID ...
    System clock check checking ...
    Erasing Sector 0x00000000 to 0x00000FFF
    Erasing ...
    Erase Command Succeeded
    cmdwin::fl::write
    Beginning Operation ...
    -------------------------
    Using restricted address range 0x00000000 to 0x0007FFFF
    Programming file C:\Users\ouga\Documents\workspace\CodeWarrior107\testMCP52259\FLASH\testMCP52259.elf
    Auto-detection is successful.
    File is of type Elf Format.

    Downloading Flash Device Driver ...
    Reading flash ID ...
    System clock check checking ...
    Error: System clock check failed Flash driver reports the following error(s): The flash device algorithm was interrupted during execution.
    Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.
    If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash
    bank port size.
    Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down
    loading the algorithm to DDR try checking your DDR configuration.
    Error: System clock check failed Flash driver reports the following error(s): The flash device algorithm was interrupted during ex
    ecution.
    Please check if the flash base address is correct or if there are any flash devices mapped inside the selected memory space.
    If a custom target initialization file was used then check the following parameters: flash base address, flash bank size and flash
    bank port size.
    Please enable Verify Target Memory Writes in Target Configuration to check that the algorithm downloads correctly. If you are down
    loading the algorithm to DDR try checking your DDR configuration.

  • Greetings,

    Is this a known good board? Are you sure you have JTAG communication, and not BDM communication?

    Do you have some kind of external watchdog or adapter that may be interrupting the communication?

    Lastly, try lowering the debug shift frequency within the debug configurations. See if that improves your setup.


    Takao Yamada

  • Hi,

    I used BDM that came with USB-ML-CFE Rev.C emulator and cable. From its manual as below, it looks that is allowed.

    Thanks,
    Gansheng

    Attached: PE3379 - Technical summary for USB-ML-CFE Rev C v.1.02a.pdf

    P&E’s USB COLDFIRE MULTILINK Interface provides access to the Background Debug Mode (BDM) on Freescale ColdFire processors. It is the hardware interface between a USB port and the standard 26-pin “Berg” debug connector on the target. By using the USB ColdFire Multilink, the user can take advantage of the background debug mode to halt normal processor execution and use a PC to control the processor. The user can then directly control the target’s execution, read/write registers and memory values, debug code on the processor, and program internal or external FLASH memory devices. The pin-out of the connector as specified by Freescale is shown below. *Please note that you may choose to have a signal on Pin 25, although P&E does not (P&E derives power from Pin 9).

  • And it is a good board. In normal situation, we use EtherCAT Configuation Tool to download the code. Right now I try to find a new and simple way to do that comes with CodeWarrior.

  • Greetings,

    Sorry, I was confused. You should be using ColdFire BDM, not JTAG. But make sure your board is set up to communicate in BDM. Some evaluation boards have a jumper setting to switch between these two protocols.

    Did you try lowering the debug shift speed?


    Takao Yamada

  • Hi,

    I am using our company's customized board, but not evaluation board. I can run in debug mode normally, such as step in, full speed .etc., from parameter reading is correct.

    Thanks,
    Gansheng

  • When I enter debug mode, it programmed and was correct as below message on console attached. I just do not understand why it does not work on "flash file to target"


    Starting 3rd party flash programming...
    GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_ERR_NONFATAL
    INF: Copyright 2012 P&E Microcomputer Systems,Inc.
    INF: Command Line :"C:\Freescale\CW MCU v10.7\eclipse\..\MCU\bin\de.exe" -noni -language en -ORBendPoint giop:tcp:127.0.0.1: -ORBtraceLevel 0
    INF: CMD>RE
    INF: Initializing.
    INF: Device Debug Module : Revision B+
    INF: Device Detected : 5225x
    INF: Target has been RESET and is active.
    INF: CMD>CM C:\Freescale\CW MCU v10.7\MCU\bin\Plugins\support\coldfire\gdi\P&E\freescale_52259_1x32x128k.cfp
    INF: Initializing.
    INF: Device Debug Module : Revision B+
    INF: Device Detected : 5225x
    INF: Initialized.
    INF: ;version 1.01, 10/01/2008, Copyright P&E Microcomputer Systems, www.pemicro.com [522xx_512k]
    INF: ;device Freescale, 52259, 1x32x128k
    INF: ;begin_cs device=$00000000, length=$00080000, ram=$10000000
    INF: Loading programming algorithm ...
    INF: Done.
    INF: CMD>EM
    INF: Erasing.
    INF: Module has been erased.
    GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DO_PARTITIONING, Value : 0, R) => DI_ERR_NONFATAL
    INF: CMD>PM
    INF: Programming.
    INF: Processing Object File Data ...
    INF: .
    INF: Programmed.
    INF: CMD>VC
    INF: Verifying object file CRC-16 to device ranges ...
    INF: block 00000000-00000417 ...
    INF: Ok.
    INF: block 00000500-00000C2B ...
    INF: Ok.
    INF: Checksum Verification Successful. (Cumulative CRC-16=$E1FB)
    INF: CMD>RE
    INF: Initializing.
    INF: Device Debug Module : Revision B+
    INF: Device Detected : 5225x
    INF: Target has been RESET and is active.

  • Greetings,

    You will have to speak with NXP about flash file to target. That is not done by us. P&E's implementation for ColdFire is just the communication and debugging aspect. The Flash programming and "flash file to target" feature is done by NXP.


    Takao Yamada

  • Hi,

    Thank you for your response.

    Right now, the small program also is able to download from "flash file to target".

    I need to move to think out why my project cannot do that.

    Gansheng

  • It also worked on my project now after updated connection setting.

    Thank you.

    Gansheng

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