AnsweredAssumed Answered

use of global variables with MPC5643L, CW10.5

Question asked by Florian Farrenkopf on Mar 5, 2014
Latest reply on Apr 6, 2017 by stanish

Hello everybody!

 

I am working on the MPC5643L using the tools RAPPID and CW10.5.

(development environment: XPC56xx EVB Motherboard Rev. C with XPC563xL 144LQFP MINI-MODULE equipped with µC PPC5643L)

 

I have a problem with the use of global variables in my project. Running in debugger works fine. Stop debugging and do a power reset the µC does not start running.

It seems the µC starts working doing e. g. the initilazation of the ports for LEDs and then corrupts.

 

Here is my source code: (µC is configured for DPM)

 

LL_var.c:   

#include "mpc5643l.h"

#include "kts\LL_var.h"

uint32_t dummy1 = 100;

uint32_t dummy2 = 200;

 

LL_var.h:

#ifndef LL_VAR_H_

#define LL_VAR_H_

extern uint32_t dummy1;

extern uint32_t dummy2;

#endif


main_p0.c:

...

while(1)

   {

    // fa

    dummy1 = 0x12345678;

    dummy2 = 0x87654321;   

    // fa

   }

 

If i just do "dummy1 = 0x12345678;" in while(1) (dummy2 commented out) it works fine with or without debugger.


if i define dummy1&2 as uint8 or unit16 it works fine with or without debugger.


Does anybody know this behaviour and can help me?




 

Nachricht geändert durch Florian Farrenkopf: update

Outcomes