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.

Pin Toggle on Concerto MCU

Hi! Tried using GPxTOGGLE register to change pin level. It works only when switching from 0 to 1.

Here is an example of working code (placed inside    while(1) { ... }   ):

GpioDataRegs.GPCCLEAR.bit.GPIO70=1;
for (k=0;k<1000000;k++) ;
GpioDataRegs.GPCTOGGLE.bit.GPIO70=1;
for (k=0;k<1000000;k++) ;

And this code does not work (the only difference marked with bold):

GpioDataRegs.GPCSET.bit.GPIO70=1;
for (k=0;k<1000000;k++) ;
GpioDataRegs.GPCTOGGLE.bit.GPIO70=1;
for (k=0;k<1000000;k++) ;

This example also does not work (inside while-loop!):

GpioDataRegs.GPCTOGGLE.bit.GPIO70=1;
for (k=0;k<1000000;k++) ;

Modifying GPCTOGGLE in CCS Registers window have an affect only when corresponding bit in GPCDAT is cleared. And nothing happens if it is set to 1 while writing to   GPCTOGGLE.

 The MCU is F28M35H52C1