GPIF not writing data to socket

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

cross mob
lock attach
Attachments are accessible only for community members.
xyphro
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

 

Hi!

We have a firmware based on AN75779 (UVC Bulk streaming). There are some adjustments to the actual image sensor.

What we notice is, that sometimes (not consistent) with the same binary firmware image, it works very well and sometimes we just get no GPIF payload at all, but just one 12 Byte UVC Header packet per frame.

Investigations have shown, that the GPIF waveform is working perfectly fine (confirmed by toggling CTL outputs and watching them with a logic analyzer). There is a clear ping ponging done between the 2 GPIF threads 0 and 1 and IN_DATA called the expected the expected amount of times.

When logging the 2 GPIF producer Sockets and 1 USB consumer socket register values over time from a second thread, we do see, that when in an operational state:

- The SCK_COUNT data is incrementing for PIB Socket 0 and PIB Socket 1 + UIB as expected
- The STATE of the socket is always active

When we are in a non operational state we see:

- SCK_COUNT of the 2 PIB sockets is constantly ZERO
- The PIB state is sometimes STALL and sometimes ACTIVE
- The UIB is incrementing only once per frame with the expected 12 Bytes of the UVC header (Triggered by Interrupt from GPIF PARTIAL State, calling wrapup, calling indirectly the producer callback

We checked in exactly this situation the GPIF state machine by generating pulses in the 2 data transfer states and they are coming as expected.

The Sensor is clocking the PCLK with 75 MHz.

Could this be an issue of the THREAD controller, that resides between GPIF and DMA socket?
ANY help is appreciated in hints how to debug further.

We checked for return error codes everywhere possible, e.g. the multi DMA setup, but don't get API errors in the non working situation.

The sourcecode can be shared with Cypress, but I don't want to put it in this public forum.

Best regards,

Kai

Attachments:
- APPThread_logfunction.c - The function that creates debug prints. Called every 100ms from within APPThread
  The log prints 3 Socket register and THREAD controller configuration
- Logfile_good_state.txt - A Logfile when "everything works fine" All 3 SCK_COUNT registers are incrementing
- Logfile_nonWorking_state.txt - A logfile from the state where the 2 GPIF socket2 don't receive data, allthough IN_DATA state is confirmed to be called in GPIF statemachine

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Kai,

Please refer to section 10.6.2 of FX3 TRM. 

PIB_INTR :  GPIF_ERR &  PIB_ERR - Firmware clears this bit after handling the error.

Once the interrupt is triggered CY_U3P_PIB_ERROR_EVT event  is set  and the callback in the application is called. As discussed earlier, the error could be because the GPIF is writing to a socket, which is not  intended/setup for write access from GPIF. 

Regards,
Rashi

View solution in original post

0 Likes
14 Replies