AN75779 - FX3 gets non-responsive

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Magnus_P
Level 2
Level 2
First like received First like given 10 sign-ins

Hi!

We have for a customer designed a camera system based on the FX3 and the AN75779 sample code, with minor modifications.
Our customer reports that sometimes the FX3 stops streaming and gets non-responsive.
Restarting the software on the PC sides does not help.
Rebooting the PC does not help.
The only thing that helps is powercycling of the FX3 (either by unplugging and again plugging in the USB or by powercycling of the PC)


SInce this application is running remotely and not supervised, powercycling is not possible with the current design.
We have not yet been able to do any logging when this happens, but have in the meanwhile some questions.

Are there any know problems with the AN75779 implementation that could lead to this kind of sympthoms?
(We have implemented a watchdog in the FX3 that should restart the FX3 if asserted)

Is there some reset handling for the USB interface implemented in the An75779?
I think there are eset USB messaged sent to the FX3 - is that something that the FX3 will act on?

Regards,

Magnus Peterson

0 Likes
1 Solution
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Magnus,

In the AN75779 firmware, the sensor is reset and initialized once in the ApplnInit function.

The ApplnStop and ApplnStart function starts and stops/resets the internal FX3 hardware including DMA, GPIF and the USB hardware and not the sensor. 

The sensor register settings are set for the particular resolution when a SET_CUR request comes from the host application for the particular resolution.

The sensor keeps on running once the register settings are set.

Although, if you want the sensor to be restarted on USB reset, add a sensor_reset/ sensor_init in the ApplnStop function after Gpif is Disabled.

Best Regards,
AliAsgar

View solution in original post

0 Likes
5 Replies
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Magnus,

Could you send the UART debug prints when the issue is seen?

I did not understand the two questions at the end. Could you please elaborate those questions for me.

Best Regards,
AliAsgar

0 Likes
Magnus_P
Level 2
Level 2
First like received First like given 10 sign-ins

Hi!
We have not yet been able to get UART logging when this happens.
In the "real" system, UART-debugging is not possible, and it has not yet happened in our lab-set-up, where we can do UART debugging. But we are working on it!

Regarding USB reset, this is what I mean:

https://microchipdeveloper.com/usb:reset-suspend-resume

How does the FX3 react to that?
Can it be set so that the firmware restarts?
(to get out of a possible lock condition)

Regards,

Magnus

 

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Magnus,

When a USB reset is signalled by the host, we get a USB event callback CY_U3P_USB_EVENT_RESET in the application firmware. 

We usually stop the application when RESET event comes and wait for the USB hardware to handle the USB reset signalling.

Could you tell us how frequent is the issue happening?

CyU3PDeviceReset(CyFalse) can also be used as an alternative to power cycling of FX3. It issues a cold reset to the device.

Best Regards,
AliAsgar 

0 Likes

Hi!

OK, understand!
Looking at AN75779 code - and also testing what happens in the FX3 when the PC is restarted - there is very little happening. The reset and the conf events comes in, but they do not really initiate any clean up actions.
What would the appropriate extension of the code be if we wanted the sensor to get restarted during a USB reset? Where would it be correct to place the call to sensor_reset()/sensor_init();

Regards,

Magnus

0 Likes
AliAsgar
Moderator
Moderator
Moderator
1000 replies posted 250 solutions authored 750 replies posted

Hi Magnus,

In the AN75779 firmware, the sensor is reset and initialized once in the ApplnInit function.

The ApplnStop and ApplnStart function starts and stops/resets the internal FX3 hardware including DMA, GPIF and the USB hardware and not the sensor. 

The sensor register settings are set for the particular resolution when a SET_CUR request comes from the host application for the particular resolution.

The sensor keeps on running once the register settings are set.

Although, if you want the sensor to be restarted on USB reset, add a sensor_reset/ sensor_init in the ApplnStop function after Gpif is Disabled.

Best Regards,
AliAsgar

0 Likes