Can you please attach your whole project here? I will check what is missing and let you know.
- Madhu Sudhan
Here is the source file that I am using. I got them from the ./AN65974/FX3 Firmware which can be found at the link I provided in my op. I just need the manual compilation to behave like the SF_loopback.img that is in the same archive only I need to increase the USB throughput. Thank you for the fast response.
SlaveFifoSync.zip 18.3 K
In your code, I see that you have set:
io_cfg.gpioSimpleEn = 0;
(Previously it was io_cfg.gpioSimpleEn = 0x08000000; /* GPIO 59 */)
I see that you have made it as 0, as you may not want to use GPIO 59 and have disabled the GPIO. But in the later part of the code, you called:
apiRetStatus = CyU3PGpioSetSimpleConfig(59, &gpioConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
/* Error handling */
CyU3PDebugPrint (4, "CyU3PGpioSetSimpleConfig failed, error code = %d\n",apiRetStatus);
So, this API has failed as GPIO 59 was not enabled and it goes into error handler. So your code did not work. I recommend you to remove all the codes related to GPIO 59, or re-enable the GPIO.
When I made this fix, your code works fine.
- Madhu Sudhan
Sorry about that. I don't know what happened with that code. I may have mistakenly given you an altered version. Let me try a different approach. Here is the project directly from the Cypress website. See directory "./FX3 Firmware/SlaveFifoSync/" for the source. I cannot get the manually built images to work. The images that are already present in the Debug and Release directories, however work perfectly fine except that the USB throughput is rather slow. One thing I noticed is that the GPIF II project is setup for 16 bit which is not what the project documentation illustrates and further more the pre-built images all seem to behave as outlined by the AN65974 documentation i.e 32 bits. This leads me to believe that I don't have the correct GPIF II project or it is not configured to build the images correctly.
FYI - I am working on Linux, however I tried it on Windows briefly, but I had the same issues with the generated images. I will continue in parallel to investigate if I can get it working in Windows unless you know of any issues that may arise in Linux that are not present in a Windows environment?
FX3 Firmware.zip 2.3 MB
I just wanted to check in to see if you have any advice based on my previous post?
I just wanted to update this post with the solution I found.
I was able to get the code working after rolling the SDK back to 1.3.1 in Windows 7 (did not try in Linux). It seems that SDK 1.3.3 is the issue.
Can you explain how you got the address of GPIO 59?