CyU3PDeviceReset(CyFalse) will take device to Bootloader mode.
Device boots the firmware again and start running the firmware.
Instead, Implement the soft reset as described in this thread Implementation of Soft Reset in FX3 family devices .
This does not boot the firmware again.
Check the throughput with this implementation.
When you do hard reset manually, does it reset the external processor, which is pumping the data to GPIF of FX3?
There is a button connected to "RESET" Pin of chip CYUSB3014. It can always clear the issue. For device reset, call CyU3PDeviceReset(CyFalse) to take device to Bootloader mode, then device boot and start running the firmware. The whole process looks good. But the streamer function can't work well at a 50 percent probability. So it is not identical to the hard reset
We have tried to re-create the issue here in the following way. Attached the modified GpifToUsb Firmware.
1. Created a timer for 10 seconds in GPIFtoUsb example project
2. In the timer call back, we are calling CyU3PDeviceReset(CyFalse) API
1. Load the firmware to I2C EEPROM and set the PMODE to Z1Z
2. Open the streamer application
3. Start streamer after the device enumeration and observe the throughput
4. it will stop streaming after 10 seconds, because the timer is expired
5. Since the Boot option is I2C EEPROM and fallback to USB bootloader mode, the device re-enumerates and appears in the control center and streamer
6. Start the streamer immediate after the device enumeration and again observe the throughput
7. We have not seen any reduction in the throughput number
Based on this experiment we have a few questions:
1. You mentioined that you wanted to do device reset whenever there was a reduction in throughput or some other reason. So we would like to know when exactly you trigger the soft reset (based on what event)
2. Is the HARD RESET (button) connected to Master (connected to Slave FIFO)?
3. Check whether there are any PIB errors, when there is reduction in the throughput
4. As per your statement "But the streamer function can't work well at a 50 percent probability", the streamer is showing the correct throughput half number of times. Is it true?
GpifToUsb.rar 421.3 K
Answers are as below:
We modify the firmware slavefifosync to capture data from GPIO to FX3.
1. Add code in CyFxSlFifoApplnUSBSetupCB function in cyfxslfifosync.c
if (bType == CY_U3P_USB_VENDOR_RQT)
case 0xC9: // CY_FX_RQT_RESET:
HARD RESET(button) is connect to nRESET pin of CYUSB3014.
No PIB errors observed in debug port.
We modify epType to ISO in CyFxSlFifoApplnStart in cyfxslfifosync.c(line 190). Later we find there is no problem in BULK mode
epCfg.epType = CY_U3P_USB_EP_ISO; // reduction in the throughput
//epCfg.epType = CY_U3P_USB_EP_BULK; // normal
For epType ISO mode, soft reset can't work well, reduction in the throughput happens almost every time. But hard reset works well.
In ISOC mode, are you sure that whether the vendor command is received by the device.
Put a Debug Print in the vendor command before calling the CyU3pDeviceReset API and confirm.
As per the description, it looks like some times DeviceReset working well in ISOC mode but some time it fails. Isn't it?
Yes, I am very sure that vendor command is received because FX3 goes back to boot loader mode.
So DeviceReset doesn't work well in ISOC mode sometimes. It is not always true that device reset is identical to hard reset, described in the manual.