I am trying to manually compile the SF_loopback.img, SF_streamIN.img and SF_streamOUT.img which are included in the AN65974 project zip file provide at this link:
All the pre-compiled images seem to work fine with the FPGA statemachine that is provided. I need to change a few parameters in the images so I have recompiled the C code in eclipse, but the header in the GPIF II project that was provided is for a 16 bit interface. I changed the interface to 32 in the GPIF II project and confirmed it in the newly generated header file. When I load this version of the image onto the FX3 SuperSpeed Explorer Kit it says, "Download Successful" and then the interface disappears and will not reappear until I restart the FX3 board. If I set CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT equal to 0 indicating a 16 bit interface then the board loads fine. The interface remains after the image is downloaded. The problem is that I need a 32 bit interface. Is there anything I could be missing?
I just want to recompile the images manually that are provided in the AN65974 project zip file (which are 32 bit) and I cannot figure it out.
Thank you in advance.
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.
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?
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.