This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Modify variables inside Digital Power Library Routine

Other Parts Discussed in Thread: CONTROLSUITE

Hi,

 

I am now using the template “C:\ti\controlSUITE\development_kits\TemplateProjects\DPLibv3_4Template-F2803x” inside the controlSUITE on my F28069 Piccolo Experimenter Kit.

 

If there is a variable defined inside DPL-ISR.asm, say called _var1

 

.ref   _var1

 

How can I modify that variable during run time? Let say can I change that variable in C1() task?

 

P.S.

 

I tried to add a code at the main.c

 

int16 var1

 

and then modify it inside c1() task:

 

var1=20;

 

But it seems it doesn’t work.

 

Thanks you.

Barry

  • Hi Barry,

    Is var1 a globally known variable or is it only visible in your C1() function? Within the assembly code you can only reference to global variables by using the .ref statement

    If you want to define a variable within assembler you want to use the .def statement. A var defined this way can be accessed in a c-file by using the "extern" keyword.

    Hope this helps

    Andreas