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.

GPASET GPACLEAR is Not work well

Firstly, the following configuration:

EALLOW;
   /************扫描口***************************/
    GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 0;//功能普通gpio
    GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 0;
    GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 0;
    GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 0;

    GpioCtrlRegs.GPADIR.bit.GPIO18=1;//输出
    GpioCtrlRegs.GPADIR.bit.GPIO19=1;
    GpioCtrlRegs.GPADIR.bit.GPIO20=1;
    GpioCtrlRegs.GPADIR.bit.GPIO21=1;

   EDIS;

But when Run this code:


for(;;)
{

  GpioDataRegs.GPASET.bit.GPIO18=1;
  GpioDataRegs.GPASET.bit.GPIO19=1;
  GpioDataRegs.GPACLEAR.bit.GPIO20=1;
  GpioDataRegs.GPASET.bit.GPIO21=1;
  GpioDataRegs.GPASET.bit.GPIO18=1;
  GpioDataRegs.GPACLEAR.bit.GPIO19=1;
  GpioDataRegs.GPASET.bit.GPIO20=1;
  GpioDataRegs.GPASET.bit.GPIO21=1;
}

  GpioDataRegs.GPASET.bit.GPIO18=1 is not work,when run GpioDataRegs.GPASET.bit.GPIO19=1 ,the result is Gpio18 and gpio19 toggle together

why is this?