Other Parts Discussed in Thread: C2000WARE
I am working on a project in which need to use both CPU of above MCU. while I have configure the pin GPIO 57 owner by CPU2.
it run ok as output pin , but when i change the pin direction and check the pin as input , it is not working. Always it gives 1 . and I checked the actual value on pin is low.
I also check this using CPU1 where it works fine both input and output were ok.
What would be the possible reason to not work as input whiled owned by CPU2.
I also providing you the code for reference.
#define TEST4_GPIO_CFG GPIO_57_GPIO57
#define TEST4_GPIO_PIN 57U
CPU1 GPIO configuration :
GPIO_writePin(TEST4_GPIO_PIN, 0);
GPIO_setPinConfig(TEST4_GPIO_CFG);
GPIO_setDirectionMode(TEST4_GPIO_PIN, GPIO_DIR_MODE_IN);
GPIO_setPadConfig(TEST4_GPIO_PIN, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(TEST4_GPIO_PIN, GPIO_QUAL_ASYNC);
GPIO_setMasterCore(TEST4_GPIO_PIN, GPIO_CORE_CPU2);
CPU2 checking the GPIO for high / Low
for(;;)
{
//
// Turn on LED
//
Read_57 = GPIO_readPin(57);
//
// Delay for a bit.
//
DEVICE_DELAY_US(500000);
//
// Turn off LED
//
//
// Delay for a bit.
//
DEVICE_DELAY_US(500000);
}
/*
where the Read_57 is a 32 bit variable that giving me always 0x01.
*/
Please make me correct if I am wrong.
Ashutosh Bhatt