Hi,
You have to configure the GPIO pins as GPIO output mode, you can set and clear the pins as you expected.
Firstly, you have to enable the GPIO clock.
Pls refer to the section 8.6.22 System clock control 0 register. For example, you can set the GPIO0 clock with the code:
SYSCON->SYSAHBCLKCTRL0|=1<<6|1<<20|1<<18; //enable the GPIO0, GPIO1 and IOCON modules clock
SYSCON->PRESETCTRL0|=1<<61<<20; //clear GPIO reset, the line may be unnecessary
Then you can set the GPIO direction register
GPIO->DIR[0]|=1<<(GPIOPinIndex);
then you can set/clear the pin
//set pin
GPIO->SET[0]=1<<(GPIOPinIndex);
//clear pin
GPIO->CLR[0]=1<<(GPIOPinIndex);
Pls have a try
Hope it can help you
BR
Xiangjun Rong