- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir,
I want to initialize GPIO17,GPIO19 as simple output, no any error is return,but the output status is not changed.
When both of gpio17and gpio19 are set in matrix by 0x000a0000, no UART info.
io_cfg.gpioSimpleEn[0] = 0x00000000; // GPIO17 for RESX pin,GPIO19 for LED_EN,0x000a0000
io_cfg.gpioSimpleEn[1] = 0x00002000; // GPIO45-CAM_INT2
io_cfg.gpioComplexEn[0] = 0x00000000; // GPIO18 for LED_PWM,0x00040000
io_cfg.gpioComplexEn[1] = 0;
status = CyU3PDeviceConfigureIOMatrix (&io_cfg);
the following code section is about GPIO17 init and update , does anybody know why?
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define RESXGPIO_PIN (17) // Hardware Fix,don't change pin number,GPIO marix?
uint32_t ResXGpioInit()
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
CyU3PGpioSimpleConfig_t gpioConfig;
status = CyU3PDeviceGpioOverride (RESXGPIO_PIN, CyTrue); // configuring GPIO 17 as simple gpio for Reset signal
if (status != 0)
{
/* Error Handling */
CyU3PDebugPrint (4, "\n\rCyU3PDeviceGpioOverride failed, error code = %d",status);
return status;
}
gpioConfig.outValue = CyFalse; //default: low
gpioConfig.driveLowEn = CyFalse;
gpioConfig.driveHighEn = CyFalse;
gpioConfig.inputEn = CyFalse; //direction: output
gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;
status = CyU3PGpioSetSimpleConfig(RESXGPIO_PIN, &gpioConfig);
if (status != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "\n\rCyU3PGpioSetSimpleConfig RESXGPIO_PIN failed, error code = %d",status);
return status;
}
else
{
CyU3PDebugPrint (4,"\n\rRESXGPIO_PIN Configured!");
}
}
uint32_t SetResXValue(CyBool_t isTrue)
{
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
status = CyU3PGpioSimpleSetValue (RESXGPIO_PIN,isTrue);
if(0 != status )
{
CyU3PDebugPrint (4, "\n\rRESXGPIO_PIN OP Failed");
return status;
}
return 0;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make gpioConfig.driveLowEn = CyTrue; and gpioConfig.driveHighEn = CyTrue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make gpioConfig.driveLowEn = CyTrue; and gpioConfig.driveHighEn = CyTrue