8 bit slave FiFO APP start and stop function.

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

cross mob
ThM_3776866
Level 4
Level 4
First like received First like given Welcome!

Hi all,

I am working on Cypress fx3 GPIF II . I have doubt on "CyFxSlFifoApplnStart" and "CyFxSlFifoApplnStop" funtion in slave FIFO. This function is called inside USB event of

CyFxSlFifoApplnUSBEventCB (CyU3PUsbEventType_t  evtype, uint16_t evdata).

Q1. is it possible to call "CyFxSlFifoApplnStart" in SlFifoAppThread_Entry?. and what will happen ?.

Q2. is it need to call every time CyFxSlFifoApplnStop funtion?. if it is not calling what will happen?.

Thank you

Best Regards,

Thrimurthi M

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Thrimurthi,

1. You cannot call CyFxSlFifoApplnStart in SlFifoAppThread_Entry. Endpoint configuration is done only after the device enumerated successfully which can be known when SET_CONF is received. That is the reason CyFxSlFifoApplnStart is placed in SET_CONF USB Event.

2. CyFxSlFifoApplnStop is called when a USB Disconnect/Reset occurs. It is necessary to disable and flush the endpoint memory and destroy the channels.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
6 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Thrimurthi,

1. You cannot call CyFxSlFifoApplnStart in SlFifoAppThread_Entry. Endpoint configuration is done only after the device enumerated successfully which can be known when SET_CONF is received. That is the reason CyFxSlFifoApplnStart is placed in SET_CONF USB Event.

2. CyFxSlFifoApplnStop is called when a USB Disconnect/Reset occurs. It is necessary to disable and flush the endpoint memory and destroy the channels.

Regards,

Hemanth

Hemanth
0 Likes

Thank you Hemanth sir,

My problem is, I have 2 interface and 3 end point configuration.

1. I2C Interface ( I created producer and consumer of 2 end point and 2 DAM channel with CY_U3P_DMA_TYPE_MANUAL_IN and CY_U3P_DMA_TYPE_MANUAL_OUT DAM type) I have to run in manual mode.

2. GPIF slave FIFO ( P port as producer and USB as consumer with single end point and one DMA channel of CY_U3P_DMA_TYPE_AUTO DAM type).

In my source code  have 2 ApplnStart and ApplnStop function for both I2C and GPIF Slave FIFO.

How to call these two ApplnStart and stop function (both I2C and Slave FIFO)  in "CyFxI2CLpApplnUSBEventCB" function call back?.

Thank you

.

Best Regards,

Thrimurthi M

0 Likes

Hello Thrimurthi,

You can combine both into single AppInStart and AppinStop functions.

0 Likes
ThM_3776866
Level 4
Level 4
First like received First like given Welcome!

Thank you sir,

I got Output data from P port to USB(Slave FIFO). I can view in Control center it showing 512 byte of data but all data is zero. In Master writing a incremental data it can be seen at Data Pin lines(D0 to D7) by using CRO.

1. I created 2 Flag A & B (Current thread Ready and water mark)

2. CyU3PGpifSocketConfigure (0,CY_U3P_PIB_SOCKET_0,3,CyFalse,1);

Pin details:

SLOE (active High)='0';

SLCS (active Low)='0';

SLWR ( active High)= signal from Master side.

SLRD( active HIGH)= '0';

PKEND( active High)= '0';

A0 &A1= "00"

Is any configuration is missing?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

- You can try to put GpiftoUsb example code instead of slave firmware that you are using. And then observe the output from the device.

- With the current slave firmware, you can try printing few initial values of the buffer over UART.

- Please attach your slave .c file.

Regards,

Hemanth

Hemanth
0 Likes
ThM_3776866
Level 4
Level 4
First like received First like given Welcome!

Thank you for Replay..  I Got out put..

0 Likes