Tool/software:
Hi,
I used G15 pin as RST signal to peripheral, its setting is:
and test it voltage level after initialization periodly.
static void enet_lwip_eth_rst(void) { uint32_t delayus = 100*1000; uint32_t gpioBaseAddr, pinNum; gpioBaseAddr = (uint32_t) AddrTranslateP_getLocalAddr(CONFIG_ETH_RST_BASE_ADDR); pinNum = CONFIG_ETH_RST_PIN; // GPIO_setDirMode(gpioBaseAddr , pinNum, GPIO_DIRECTION_OUTPUT); while(1) { GPIO_pinWriteLow(gpioBaseAddr, pinNum); if(GPIO_pinRead(gpioBaseAddr,pinNum) == GPIO_INTR_LEVEL_LOW) printf("ping set to 0\n"); ClockP_usleep(delayus); GPIO_pinWriteHigh(gpioBaseAddr, pinNum); if(GPIO_pinRead(gpioBaseAddr,pinNum) == GPIO_INTR_LEVEL_HIGH) printf("ping set to 1\n"); } }
This function is called
int enet_lwip_example(void *args) { Enet_Type enetType; uint32_t instId; int32_t status; printf("enet_lwip_example\n"); Drivers_open(); Board_driversOpen(); enet_lwip_eth_rst(); DebugP_log("==========================\r\n"); DebugP_log(" ENET LWIP App \r\n"); DebugP_log("==========================\r\n");
But the pin shows alway in high state. The log is:
[Cortex_R5_0] FreeRTOS main started enet_lwip_example ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1 ping set to 1
How this problem happens and how to fix it?
Thanks