GPIO02's output is always 0.
The following code uses either GPIO_IF or gpio.h to create PWM wave, however, GPIO_02 only outputs 0. While when the same code applies GPIO_08, the PWM works perfectly.
TI technical support team: Can you verify on your side?
int main(void) {
BoardInit();
UDMAInit();
InitTerm();
MAP_PRCMPeripheralClkEnable(PRCM_GPIOA0, PRCM_RUN_MODE_CLK);
MAP_PinTypeGPIO(PIN_57, PIN_MODE_0, false); // GPIO_2 mode
MAP_GPIODirModeSet(GPIOA0_BASE, 0x04, GPIO_DIR_MODE_OUT); // GPIO_2 as output
unsigned int gpio2_port;
unsigned char gpio2_pin;
//GPIO_IF_GetPortNPin(2, &gpio2_port, &gpio2_pin);
while(1) {
// set to 0 method A:
//GPIO_IF_Set(2, gpio2_port, gpio2_pin, 0); // does not work
// set to 0 method B:
MAP_GPIOPinWrite(GPIOA0_BASE,GPIO_PIN_2,0); // does not work
MAP_UtilsDelay(8000000);
// set to 1 method A:
//GPIO_IF_Set(2, gpio2_port, gpio2_pin, 1); // does not work
// set to 1 method B:
MAP_GPIOPinWrite(GPIOA0_BASE,GPIO_PIN_2,GPIO_PIN_2); // does not work
MAP_UtilsDelay(8000000);
}