Part Number: CC2538-SW
Other Parts Discussed in Thread: CC2592, CC2590, CC2591
Tool/software: TI C/C++ Compiler
This is weird but true. SampleSwitch code in its default form is being used in coordinator configuration.
In Zmain.c :
#ifdef TEST
varhigh= GPIOPinRead(GPIO_B_BASE, GPIO_PIN_1);//GPIODirModeGet(GPIO_B_BASE, GPIO_PIN_1);
GPIOPinIntDisable(GPIO_B_BASE, GPIO_PIN_1);
GPIODirModeSet(GPIO_B_BASE, GPIO_PIN_1,GPIO_DIR_MODE_OUT);
GPIOPinTypeGPIOOutput(GPIO_B_BASE, GPIO_PIN_1);//EN is at PB1
while(1)
{
//GPIOPinWrite(GPIO_B_BASE, GPIO_PIN_1, 1);//EN goes HIGH-- THIS DOES NOT WORK
GPIOPinWrite(MYBASE, MY_EN, 1);//-- THIS DOES NOT WORK
//HAL_TURN_ON_LED2();
//GPIOPinWrite(GPIO_C_BASE, 0x00000008, 1);//LED4 is PC3
i=0;
while( i<50000)
{//nothing
i++;
}
varhigh= GPIOPinRead(GPIO_B_BASE, GPIO_PIN_1);//GPIODirModeGet(GPIO_B_BASE, GPIO_PIN_1);
//GPIOPinWrite(GPIO_B_BASE, GPIO_PIN_1, 0);//EN goes LOW}
GPIOPinWrite(MYBASE, MY_EN, 0);
//HAL_TURN_OFF_LED2();
//GPIOPinWrite(GPIO_C_BASE, 0x00000008, 0);//LED4 is PC3
i=0;
while( i<50000)
{//nothing
i++;
}
varlow= GPIOPinRead(GPIO_B_BASE, GPIO_PIN_1);
}
#endif
In above code GPIOWrite commands never work, GPIORead works , Input can be read easily without any issue. Writing PC3(LED_4) can be written using HAL_TURN_ON/OFF/TOGGLE commands easily. What I cant understand is that why am I not able to write any GPIO (tried PC3 and PB1) using GPIOPinWrite API command.
Please Help