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
PROGPPCNEXUS and SPC5644C: application doesn't run after GO command
. Aug 12, 2016 at 10:11 AM (10:11 hours)
Staff: Takao Y.

  • Hi,

    µC: SPC5644C
    PCP-file: Freescale_MPC5644C_1x32x384k_LCFlash.PCP

    I have an issue with starting my application code after flash-programming
    it with PROGPPCNEXUS.

    After erase/program and doing the RE command (reset) and GO command the
    application code isn't executed. The Reset Configuration Half Word is
    correctly programmed and the reset vector points to address 0xfc.
    But after the GO command the instruction pointer points to 0x00300002
    (checked with attaching another debugger). There is no code at this address,
    only zeros. The PROGPPCNEXUS logfile shows no error.

    Even if I only execute RS and GO (without programming) the application
    isn't started. I have to do a power-cycle or assert the reset line of the
    µC manually to get the application to run.

    I'm wondering why in the pcp-file the programming algorithm is located
    to address 0x00300000. The base address of the internal RAM is 0x40000000.
    In the debugger I see that a TLB entry maps the address range
    0x00300000-0x0030ffff to 0x40000000-0x4000ffff. Why do you not directly locate
    the programming algorithm to 0x40000000?

    Another board with SPC5605B (same µC-family) doesn't show this issue.
    In the pcp-file for the SPC5605B the programming code is located
    to address 0x40000000 !!

    PROGPPCNEXUS logfile for the RE and GO sequence:
    USB-ML-PPCJTAG detected - Flash Version 5.08
    CMD>CM \algorithms\Freescale_MPC5644C_1x32x384k_LCFlash.pcp ;Flash Module
    Initializing. -Initialized.
    ;version 1.04, 03/26/2013, Copyright P&E Microcomputer Systems, [5644x_1536k_LCFlash]
    ;device Freescale, MPC5644C, 1x32x384k, desc=LCFlash
    ;begin_cs device=$30000000, length=$00180000, ram=$00300000
    Loading programming algorithm ... Done.
    CMD>RE ;Reset the MCU
    Initializing. -Target has been RESET and is active.
    CMD>GO ;Start MCU

    All programming steps completed.



  • Hi,

    of course I'm using the command line application CPROGPPCNEXUS
    of the PROGPPCNEXUS package.


  • Greetings,

    The reason is our PROG software sets up the MMU differently to help customers who have external flash algorithms. You are assuming the default MMU setup where RAM is at $4000_0000 and flash at $0. And in some algorithms we have it set to default values.

    But in the end, the flash programming should work just fine. It is just mapped differently. So if your program counter is pointing to a location at 0x0302_0000, you are using what was last setup in the MMU from using the PROG software. Do you not have MMU initialization in your code?

    Takao Yamada

  • Hi Takao,

    the flash algorithm itself is working well.
    My problem is that after flash programming I could not start my code
    with the command sequence RS + GO.

    After doing the command RS the MMU table is set by PROGPPCNEXUS like
    it is for flash programming:

    Logical address Physical address
    30000000-30ffffff 00000000-00ffffff (internal flash)
    00300000-0030ffff 40000000-4000ffff (internal ram)
    c3f00000-c3ffffff c3f00000-c3ffffff (peripherals)
    fff00000-ffffffff fff00000-ffffffff (peripherals)
    10000000-1fffffff 20000000-2fffffff (reserved?)

    In my code there is a routine to initialize the MMU, but I think
    the µC simply has no chance to execute it because of these MMU settings.

    The MPC5646C reference manual states that after a reset the SSCM
    (System Status and Configuration Module) searches for a valid boot
    sector in the flash. As the flash is not mapped to 0x00000000 the SSCM
    doesn't find a valid boot sector and therefore the BAM enters static mode.
    The status register of the SSCM also shows an "configuration error".

    I think the MMU setting of the SSCM gets overriden by CPROGPPCNEXUS
    when entering debug-mode (?)

    So can you provide me with a PROGPPCNEXUS pcp file which doesn't change
    the MMU table? (currently I'm using Freescale_MPC5644C_1x32x384k_LCFlash.PCP)


  • Greetings,

    Now I see what the problem is.

    The RESET and GO we use is not a power on reset. What happens with reset is it resets the chip and re-enters background debug mode. Meaning, the PROG or CPROG software will change the MMU again. Then when a GO is executed, as you said, the MMU is now all changed and the BAM enters static mode.

    Just to confirm this, if you power cycle your board instead of reset and go, does the chip run correctly?

    Takao Yamada

    • Hi Takao,

      yes, if I power cycle the board after flash programming the chip runs correctly.


  • Greetings,

    That confirms my assumptions and I already know the solution.

    For me to move forward, I need you to go to Support page -> Support requests and create a ticket. This is because I need the ability to send and receive files, while the public forum is limited in that ability.

    Just mention a quick description of the problem and put my name somewhere. I will assign the ticket to myself and move forward from there.

    Takao Yamada

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