- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello as JayakrishnaT_76 mention I have problem with FX3 device is not receiving any buffers from the external master
I use AN65974 firmware and SyncADMux state machine
After making change in the CyFxSlFifoPtoUDmaCallback() function (added CyU3PDeviceReset(CyFalse); as shown in the screenshot below), device should be changed to bootloader Device but it stays as streamer exmaple.
Source of data is FPGA connected via EEPROM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mateuz,
I checked the firmware you shared and the GPIF state machine file, which you shared previously. The GPIF state machine is not working in your case because the clock is not connected to PCLK pin of the FX3
From the state machine (that you are using) the clock is external i.e. coming from the master. If the clock is not connected to PCLK or proper the GPIF state machine will not work.
I tried connecting PCLK of FX3 (slave) to Clock of the master, i was able to get into the second state. So Please check the clock connection.
Please remove the CyU3PDeviceReset(CyFalse) from every place and then check the debug prints.
Please let me know if any queries on this
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you call CyU3PGpifGetSMState API in the for {} loop to check in which state the GPIF state machine is stuck.
Also, can you share the GPIF state machine (.cydsn folder ) for us to check.
Regards,
Rashi
Rashi
- 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 confirm that the address lines are driven by the FPGA and the address line can be either 0 (for writing to FX3) or 3 (for reading from FX3). This is decided by the DMA channel created.
Also for writing to FX3, fist the address lines will be sample when CE and WE are asserted low and ADV is high then the writing to FX3 will start when the CE and WE remains low
- You can call CyU3PGpifGetSMState API and get the debug prints as follows. Please share the debug prints after making following modifications
SlFifoAppThread_Entry (
uint32_t input)
{
/* Initialize the debug module */
CyFxSlFifoApplnDebugInit();
/* Initialize the slave FIFO application */
CyFxSlFifoApplnInit();
for (;;)
{
CyU3PGpifGetSMState(&SMState);
CyU3PDebugPrint (4, "\n\rAplnStrt:SMState = 0x%x",SMState);
}
Please share traces of GPIF interfacing signals
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
currently i don't have JTAG debugger is there other option to debug?
and how can i conform if the address lines are driven by the FPGA.
When I try to add followinig code to the for function I have error "Symbol 'SMState' could not be resolved"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
When I try to add following code to the for function I have error "Symbol 'SMState' could not be resolved"
>> Please initialize the variable SMState in the firmware. Also, confirm that cyu3gpif.h header fie is included in the main (.c) file
SlFifoAppThread_Entry (
uint32_t input)
{
uint8_t SMState = 0;
/* Initialize the debug module */
CyFxSlFifoApplnDebugInit();
/* Initialize the slave FIFO application */
CyFxSlFifoApplnInit();
for (;;)
{
CyU3PGpifGetSMState(&SMState);
CyU3PDebugPrint (4, "\n\rAplnStrt:SMState = 0x%x",SMState);
}
currently i don't have JTAG debugger is there other option to debug?
>> The UART is enabled in your firmware which is on pin/GPIO 53:56 of FX3 and CyU3PDebugPrint is API used to print through UART. UART to USB serial bridge can be used to connect to the PC if you are using a custom board. If if you are using CYUSB3KIT- 003 (SuperSpeed Explorer kit) then you can connect the micro B to A cable from CYUSB3KIT-003 kit to PC.
You can use Tera term https://tera-term.en.lo4d.com/windows(virtual terminal) for getting these debug prints.
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm using CYUSB3KIT-003 and I am connecting board (cyusb 3035) to PC (using usb micro B 10 pin - usb A cable) and I want to avoid buying any other cable/device, I have tried to connect to board using tera term and putty but i couldn't connect to the device.
I tried to reinstall drivers, add legacy drivers for serial ports and installing drivers like CypressDriverInstaller_1.exe available on https://www.cypress.com/documentation/software-and-drivers/usb-serial-software-development-kit
and nothing have worked.
Could you pleas help me with this issue
Regards,
Mateusz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mateusz,
Thank you for confirmation that you are using CYUSB3KIT-003 (SuperSpeed Explorer kit) which has FX3 (CYUSB3014) chip.
Please refer to section 3.7.1 of Super Speed Explorer User Guide from the SDK https://www.cypress.com/file/133836/download
If it still doesn't work, please let me know Operating system that you are using and share the snippet of the device manager for me to check how is the device (integrated debugger) enumerates (note: Share the snippet of following fields of device manager: USB devices , Ports (COM &LPT) and Other Devices)
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
sorry for missleading you, but after double check I and I sue CYUSB3KIT-001 development kit (I found packed) to clear all doubts I'll send you photo of my kit
And as I found here https://www.cypress.com/file/125566/download (User Guide) I need serial to usb adapter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mateusz,
From your response, you will not be able to see the debug prints due to hardware constraints (serial to usb adapter) Is this right?
If yes, I wanted to know the state in which state machine is in so for that can you create switch cases for different states and check the same
These are the state in the state machine
#define RESET 0
#define IDLE 1
#define ADDR 2
#define READ 3
#define WRITE_START 4
#define READ_WAIT 5
#define WRITE_READY 6
#define WRITE 7
#define WRITE_WAIT 8
So, we can check whether state machine enters in any of the following WRITE_START, WRITE_READY, WRITE states
SlFifoAppThread_Entry (
uint32_t input)
{
uint8_t SMState = 0;
/* Initialize the debug module */
CyFxSlFifoApplnDebugInit();
/* Initialize the slave FIFO application */
CyFxSlFifoApplnInit();
for (;;)
{
CyU3PGpifGetSMState(&SMState);
CyU3PDebugPrint (4, "\n\rAplnStrt:SMState = 0x%x",SMState);
switch{SMState}
{
case WRITE_START :
case WRITE_READY:
case WRITE:
CyU3PDeviceReset(CyFalse);
break;
}
}
Try sending data from FPGA and check if the device gets reset can you check which state is causing the reset and share the results.
Also, can you share a block diagram of the interfacing of FPGA to FX3
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I just ordered the usb to rsa232 adapter it should be around Monday / Thursday
I'll let you know once I have this adapter and debug program
Regards,
Mateusz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Sorry for late response
I just received rs232 to usb adapter and the SMState stays at 0 (Reset state?) I tried to use usb control center to send some data but state didn't change. After sending IN data i got:
ISOC IN transfer
Zero-length data transfer completed
Regards,
Mateusz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mateuz,
From the debug print it seems that the GPIF state machine has not started because the state transition equation from RESET state to IDLE state is logic 1 which means that this transition should have happened if the GPIF state machine has started.
Please check if CyU3PGpifSMStart and CyU3PGpifLoad are executed successfully.
I tested your firmware with a different state machine (from gpiftousb example ), the GPIF state was transitioned to IDLE state.
Can you build the GPIF state machine again and then check that the parameters passed to CyU3PGpifSMStart and CyU3PGpifLoad are as per the cyfxgpif2config.h file.
You can put CyU3PDeviceReset(CyFalse) in the condition when these API's fail. And also check whether these API are executed by placing CyU3PDeviceReset (CyFalse) before and after calling these API
After sending IN data i got: ISOC IN transfer Zero-length data transfer completed
>> When there is no data on ISOC IN endpoint ZLP is sent to the host.
Also, can you share the complete debug prints that you get when you transfer data from GPIF/FPGA to USB and also the firmware (with .img file) after you made the changes in the firmware
Regards,
Rashi
Rashi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
After adding CyU3PDeviceReset(CyFalse); before and after I calle api you mention i got nothing on screen and device stays as boodloader device (in USB Control Center) and with
CyU3PDeviceReset(CyFalse);
apiRetStatus = CyU3PGpifLoad (&CyFxGpifConfig);
CyU3PDeviceReset(CyFalse);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifLoad failed, Error Code = %d\n",apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
CyU3PDeviceReset(CyFalse);
}
CyU3PDeviceReset(CyFalse);
apiRetStatus = CyU3PGpifSMStart (RESET,ALPHA_RESET);
CyU3PDeviceReset(CyFalse);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifLoad failed, Error Code = %d\n",apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
CyU3PDeviceReset(CyFalse);
}
I also tried to use debugprins to see if they are successfully executed 0 - config are loaded and 1 - gpif mashine started tried to use normal communicates but after doing that i got garbage on debug console
apiRetStatus = CyU3PGpifLoad (&CyFxGpifConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifLoad failed, Error Code = %d\n",apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
} else
{
CyU3PDebugPrint (4, "%d\n",0);
}
code for CyU3PGpifSMStart api is similar
Regards,
Mateusz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mateuz,
I checked the firmware you shared and the GPIF state machine file, which you shared previously. The GPIF state machine is not working in your case because the clock is not connected to PCLK pin of the FX3
From the state machine (that you are using) the clock is external i.e. coming from the master. If the clock is not connected to PCLK or proper the GPIF state machine will not work.
I tried connecting PCLK of FX3 (slave) to Clock of the master, i was able to get into the second state. So Please check the clock connection.
Please remove the CyU3PDeviceReset(CyFalse) from every place and then check the debug prints.
Please let me know if any queries on this
Regards,
Rashi
Rashi