Other Parts Discussed in Thread: CC2538, Z-STACK
I have a custom CC2538 board that runs Z-stack, I have a function to turn on/off a LED connected to PC2
void lightModuleOn( void ){
GPIOPinWrite(GPIO_C_BASE, GPIO_PIN_2, 0x04); // PC2 is logic high
}
void lightModuleOff( void ){
GPIOPinWrite(GPIO_C_BASE, GPIO_PIN_2, 0x00); // PC2 is logic low
}
When I run it on the router, it works fine, however, when I run it on coordinator, it does not work (I monitor PC2 output by an oscillator)
More interesting thing is that when I run it on the debug mode and run that line on the emulator, PC2 goes to logic high but when I exit from the debugging mode and reset the board (or re-power), the PC2 never goes to logic high.
Is there any code that uses PC2 on GenericApp differently on Coordinator than Router? Or what could be wrong that PC2 goes to logic high on the debugging mode but not on normal run?
I have the following definition on the coordinator and router
FEATURE_RESET_MACRO
ewarm
MT_TASK
MT_SYS_FUNC
CC2538_USE_ALTERNATE_INTERRUPT_MAP=1
MT_ZDO_FUNC
HAL_KEY=FALSE
HAL_LED=FALSE