- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Community,
I want to toggle the GPIO pin(In my case it is GPIO 57) in order to increase the voltage going to S0-Port.
I am using custom FX3S board and transfering data from FPGA to S0-Port of FX3. But the data transfer is very slow.I checked the voltage going into SD card port it is 1.8v.So i want to make it logic high i.e 3.3 v.Where to make the changes in firmware accodingly.Thanks in Advance.
Regards,
Sai.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sai Kumar,
You will have to add GPIO initialization in the appinit() function.
In the gpioinit(), you will have to firstly over-ride the GPIO by using CyU3PDeviceGpioOverride() function and then configure it as a simple GPIO.
You can then drive the GPIO high/low based on the polarity of the VSEL of the voltage regulator according to your need.
You can go through the SDK firmware in the path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxgpioapp
Go through the firmware and configure the GPIO as shown in the above firmware.
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sai Kumar,
You will have to add GPIO initialization in the appinit() function.
In the gpioinit(), you will have to firstly over-ride the GPIO by using CyU3PDeviceGpioOverride() function and then configure it as a simple GPIO.
You can then drive the GPIO high/low based on the polarity of the VSEL of the voltage regulator according to your need.
You can go through the SDK firmware in the path: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxgpioapp
Go through the firmware and configure the GPIO as shown in the above firmware.
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have gone through that GPIO firmware.I added the below snippet in my firmware.But still the voltage is 1.8v only.Is there anything to be done still?
/* Initialize GPIO module. */
CyFxGpioInit ();
for (;;)
{
/* Set the GPIO 57 to high */
apiRetStatus = CyU3PGpioSetValue (57, CyTrue);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "CyU3PGpioSetValue failed, error code = %d\n",
apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
/* Wait for 5 seconds */
CyU3PThreadSleep(5000);
/* Set the GPIO 57 to low */
apiRetStatus = CyU3PGpioSetValue (57, CyFalse);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "CyU3PGpioSetValue failed, error code = %d\n",
apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
/* Wait for 5 seconds */
CyU3PThreadSleep(5000);
}
}
I also checked by commenting /* Set the GPIO 57 to low */.
Regards,
Sai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sai Kumar,
In CyFxGpioInit (), you will have to do the following for GPIO 57.
Replace 21 with 57 in both the GpioOverride API and SetSimpleConfig API as well to firstly configure the GPIO 57 as simple GPIO.
The initial state of GPIO 57 will be low, because outValue = CyFalse depicts initial state as LOW and CyTrue means initial state is HIGH.
Only after doing this you can set the value of the GPIO 57.
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please tell me if I am doing wrong.
Regards,
Sai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sai,
The CyFxGpioInit() seems correct and the GPIO 57 configuration is also correct.
In the for (;;) loop, you are pulling it HIGH for 2 seconds and then pulling it LOW again and waiting for 2 seconds.
This will toggle GPIO 57 every 2 seconds and this can damage the Voltage regulator on your board because of this constant switching (If its done just to test, then its okay).
Can you probe the GPIO 57 with an oscilloscope or a logic analyzer and see if you can see the toggling of the GPIO?
Regards,
Yashwant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you probe the GPIO 57 with an oscilloscope or a logic analyzer and see if you can see the toggling of the GPIO?
Yeah,I checked the GPIO 57 with Multimeter and the voltage was same which is 1.8v.
(If its done just to test, then its okay).
Yes,I kept it for testing purpose.And one thing as I mentioned in third response ,I also checked by commenting /*Set the GPIO 57 to low*/.So that I can monitor the logic high voltage(3.3v).But I dont know why the voltage is still 1.8v.Please make me clear at this point.
Regards,
Sai.