- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
I'm referring to the statement
"GPIO[32:30] (PMODE[2:0]) signals should be configured appropriately at FX3 boot-up. After boot-up, these signals can be used as GPIOs." i
which can be found in the "GPIF II Interface" section in AN70707
Trying to use these GPIO, I either end up in CY_U3P_ERROR_BAD_ARGUMENT when trying to enable them as simple GPIO during CyU3PDeviceConfigureIOMatrix or in CY_U3P_ERROR_NOT_CONFIGURED when trying to override them later. I found some "dirty tricks" with writing own API functions to solve that issue, but I think there must be an "official" way through the API to use those pins as GPIO, after all it is mentioned in AN70707. How is it done?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since these pins are used for boot detection, you should override the pins just before you use them. Use CyU3PDeviceGpioOverride(..).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I tried to do this.
It works well for GPIO #30 and #31, but for #32 it fails:
CyU3PDeviceGpioOverride(32, CyTrue) returns CY_U3P_SUCCESS, but the subsequent CyU3PGpioSetSimpleConfig() statement to use GPIO #32 as input (exactly the same parameters as earlier succesfully applied to the other two) results in error CY_U3P_ERROR_NOT_CONFIGURED.
Is #32 different?
... // GPIO: Initialisation of single simple GPIO void GpioSingleSimpleInit(uint8_t gpioId, CyU3PGpioSimpleConfig_t *pGpioConfig, CyBool_t doOverride) { if (doOverride == CyTrue) { AssertApiRetStatus("CyU3PDeviceGpioOverride", CyU3PDeviceGpioOverride(gpioId, CyTrue)); } AssertApiRetStatus("CyU3PGpioSetSimpleConfig", CyU3PGpioSetSimpleConfig(gpioId, pGpioConfig)); } ... // Configure inputs without interrupts gpioConfig.outValue = CyTrue; // Not required, default gpioConfig.driveLowEn = CyFalse; // Driving output high disabled gpioConfig.driveHighEn = CyFalse; // Driving output low disabled gpioConfig.inputEn = CyTrue; // Input stage is enabled gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR; // No interrupt used for static inputs GpioSingleSimpleInit(GPI_PMODE0, &gpioConfig, CyTrue); // #30 GpioSingleSimpleInit(GPI_PMODE1, &gpioConfig, CyTrue); // #31 GpioSingleSimpleInit(GPI_PMODE2, &gpioConfig, CyTrue); // #32, CyU3PGpioSetSimpleConfig() fails with CY_U3P_ERROR_NOT_CONFIGURED ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
In meantime, I got a solution to this issue through "MyCase". According to support the issue with GPIO[32] will be solved in next SDK release (they have a patch right now).