- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to use GPIO[8] on the FX3 as a GPIO for my application. After initializing the GPIO block, I call:
CyU3PDeviceGpioOverride(8, CyTrue);
CyU3PGpioSetSimpleConfig(8, &gpioConfig);
These API calls return CY_U3P_SUCCESS. However, whenever I read from GPIO[8], the input stage value is always zero, and setting the output does not change the pin output level. The exact same process works as expected for FX3 GPIO 7 and 9 (able to drive output and read input).
This behavior is present on the Cypress FX3 Superspeed explorer kit, as well as a custom FX3 based board (FX3 model CYUSB2014). Do you have any ideas why this might be happening? The complex block corresponding to GPIO[8] is in use by my application, but I'm attempting to configure the pin as a simple GPIO (GPIO[24] also works as expected).
Thanks,
Alex
Solved! Go to Solution.
- Tags:
- fx3,
- simple gpio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alex,
From the FX3 TRM,there are eight complex I/O pin groups, the elements of which are chosen in a modulo 8 fashion (complex I/O group 0: GPIO 0, 8, 16;
complex I/O group 1: GPIO 1, 9, 17, and so on).
Each group can have different complex I/O functions (like PWM, one shot, and so on). However, only one pin from a group can use the complex I/O functions. The rest of the pins in the group are used as block I/O or simple GPIO.
I have modified the firmware example gpio, in the SDK, app as per you application but i am not able to reproduce the problem face by you. Please try using this firmware and let me know the results.
These are the results on configuring GPIO 8 as input pin. I have tested this firmware on SuperSpeed Explorer Kit.
If this doesn't work, please try using only GPIO 8 (try removing the use of complex gpio) in the firmware and test whether that is working as expected
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have confirmed that GPIO[8] can be configured as input and output using the example project GpioApp
Please ensure that the bit 8 is not set to the gpioSimpleEn member for the IO MATRIX configuration.
io_cfg.gpioSimpleEn[0] = 0x00000000; /* GPIO 8 & 21 */
io_cfg.gpioSimpleEn[1] = 0x00002000; /* GPIO 45 */
Please note that no error message will be reported here because the UART port is not initialized.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Alex,
From the FX3 TRM,there are eight complex I/O pin groups, the elements of which are chosen in a modulo 8 fashion (complex I/O group 0: GPIO 0, 8, 16;
complex I/O group 1: GPIO 1, 9, 17, and so on).
Each group can have different complex I/O functions (like PWM, one shot, and so on). However, only one pin from a group can use the complex I/O functions. The rest of the pins in the group are used as block I/O or simple GPIO.
I have modified the firmware example gpio, in the SDK, app as per you application but i am not able to reproduce the problem face by you. Please try using this firmware and let me know the results.
These are the results on configuring GPIO 8 as input pin. I have tested this firmware on SuperSpeed Explorer Kit.
If this doesn't work, please try using only GPIO 8 (try removing the use of complex gpio) in the firmware and test whether that is working as expected
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rashi and Noriaki,
Thanks for the prompt feedback. I downloaded the attached GpioApp and loaded it onto my SuperSpeed explorer kit with the same results - glad I was able to verify there was no hardware issue or anything like that.
I did a little more investigating on my side and discovered a problem with my application which was causing the behavior I was seeing. It has been resolved now.
Thanks,
Alex