Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Sync slave FIFO state machine crash?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Sync slave FIFO state machine crash?
Moderator:
RSKV

Post Reply
Follow this topic



Sync slave FIFO state machine crash?

AssemblyRequired posted on 09 May 2012 6:09 AM PST
Top Contributor
37 Forum Posts

We are streaming video via a GPIF sync_slave_fifo_2bit interface, with FLAGA defined as Thread 0 DMA Ready and FLAGB defined as Thread 0 DMA Watermark. The watermark is set to 2 with no bursting, resulting in FLAGB leading FLAGA by 4 clocks.

We have noticed that whenever the FX3 negates FLAGB on the same clock edge as the video generator negates SLWR# for a line blanking interval, the FX3 never reasserts FLAGB again. This is true even after we send an additional beat of data to correct for the difference between the 3-cycle FLAGA latency and the 4-cycle FLAGB configuration.

In probing the FX3 registers while in this FLAGA asserted / FLAGB negated state we see the following:

"Socket has gone inactive within a DMA Transfer" (CY_U3P_PIB_PIB_ERR_CODE_TH0_SCK_ACTIVE)

 "statemachine has transitioned to an invalid state" (CY_U3P_PIB_GPIF_ERR_CODE_INVALID_STATE_ERROR)

...and the GPIF state machine in IDLE state.

Has anyone experienced similar issues, or know what conditions trigger these error codes?




Re: Sync slave FIFO state machine crash?

Sil posted on 09 May 2012 06:23 AM PST
Top Contributor
93 Forum Posts

Hi

I have experienced similar issues described here: http://www.cypress.com/?app=forum&id=167&rID=62658

 

However, I was never able to track it down to the SLWR signal changing at the same time as FLAGB. What USB host controller are you using? Does it still happen if you try another controller (ASmedia instead of NEC or vice versa). I am also desperate to get this issue solved.

 

Right now I do not have the setup available to read out the GPIF state machine state but should get it back within the next couple of days and then will be able to tell what it reports.

 

-Silvio

 



Re: Sync slave FIFO state machine crash?

AssemblyRequired posted on 09 May 2012 06:39 AM PST
Top Contributor
37 Forum Posts
Hi Silvio, Our firmware is coded to respond to a host request to begin streaming by first synchronizing to the video generator. In that "sync phase", all packets received over GPIF are discarded until one with the EOP flag is received. After that point, GPIF packets are committed to USB. The hang is occurring during the sync phase, which I believe rules out USB involvement. Regards, Steve

Re: Sync slave FIFO state machine crash?

Sil posted on 09 May 2012 06:47 AM PST
Top Contributor
93 Forum Posts

You are probably right.

 

To solve your problem I would define a minimum burst size, e.g. 16 words, to get around your issue. It is anyway not good if you end up in the condition that FLAGB indicates alsmost full and you cannot finish the USB packet as you will have difficulties handling the next write cycle (flushing the output pipe and so on...).



Re: Sync slave FIFO state machine crash?

AssemblyRequired posted on 15 May 2012 01:22 PM PST
Top Contributor
37 Forum Posts

It turns out that the error codes are spurious, and can be generated at times other than when we see the slave sync FIFO interface hang.

It also turns out that the 3-cycle latency in FLAGB (DMA watermark) creates a window during which, if the external HW decides to suspend transfer (negate SLWR#), once it decides to resume it will "owe" the FX3 up to 4 beats of data before FLAGA (DMA Ready) pulses and causes FLAGB to reassert.

The attached zipfile contains oscilloscope captures of what we believe to be the various window cases.

Bottom line, it is even trickier to avoid over/underflow with the slave sync FIFO interface than you may have thought.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.