Hi everyone,
I want to access the GPIO by observing the GPIO pin's voltage with a spectrum analyzer and a probe. I have configured the DIR01 reg to output and set the SET_DATA01 reg to the corresponding GPIO pin to be high voltage. And I have configured the PINMUX to GPIO function,too. And my PSC1 has powered ALL ON. But the pin's voltage still low.
This is my code below.
int main()
{
volatile Uint32* GPIOaddr;
volatile Uint32* GPIOaddr2;
while(1)
{
GPIOaddr2 = (volatile Uint32*)0x01C14158;
*GPIOaddr2 = 0x22222822; //PINMUX14
GPIOaddr2 = (volatile Uint32*)0x01E26010;
*GPIOaddr2 = 0x00000000; //DIR01
GPIOaddr = (volatile Uint32*)0x01E26018;
*GPIOaddr = 0x10; //set GPIO0[4]
printf("GPIO set\n");
TaskSleep(3000);
GPIOaddr = (volatile Uint32*)0x01E2601C;
*GPIOaddr = 0x10; //clear GPIO0[4]
printf("GPIO clear\n");
}
}
I expect to see a pulse set and pulse clear. But there is no response.
Sincerely,
Yang