cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

veRN_2322216
New Contributor II

Hello ,

            I am working on FX3S and we are Using Slavefiffosync example to communicate with host application .while transferring data from host PC to FX3S after some iteration it is going to above 997 error . after changing the  dmaCfg.size,   dmaCfg.count, iterations got incremented but at last the result was same 997 error.if we need to

transmit data from PC to FX3S " n"  no. of times what i have to do . can any one help me to solve this problem .

CC.png

  

Thanks regards

Veerendra.

0 Likes
1 Solution
veRN_2322216
New Contributor II

hello Abhinav,

                          data is transmitting to dma buffers but after count is reached if dmaCfg.count=1 then only one times it is transmitting but "n" no. of times i am not getting actually i am little bit new in this so can you explain me what exactly i have to do . it will be helpful to me.

Thanks regards

Veerendra.

View solution in original post

6 Replies
abhinavg_21
Moderator
Moderator

Hi Veerendra,

You are getting this error as the master device is not consuming the buffers hence DMA buffers got exhausted after a certain period of time and you are facing this error. Make sure that the buffers are properly committed from UIB side to PIB side and master should consume it.

Thanks & Regards
Abhinav

veRN_2322216
New Contributor II

hello Abhinav,

                          data is transmitting to dma buffers but after count is reached if dmaCfg.count=1 then only one times it is transmitting but "n" no. of times i am not getting actually i am little bit new in this so can you explain me what exactly i have to do . it will be helpful to me.

Thanks regards

Veerendra.

View solution in original post

veRN_2322216
New Contributor II

hello ,

          can any one help me to solve this

Thanks regards

Veerendra.

0 Likes
abhinavg_21
Moderator
Moderator

Hi Veerendra,

DMA channel is designed to pass buffers from one block to another block (say from UIB to PIB). In your case you are sending data from host hence source for DMA channel is UIB block. Please mention what is the consumer? Is it PIB block (GPIF) or CPU. If there is no consumer then you have to discard the buffer in the CPU. Otherwise all the DMA buffers will be exhausted and you will get Error Code 997.

Thanks & Regards
Abhinav

veRN_2322216
New Contributor II

hi Abhinav,

                 Thanks for explaining the situation where i may get the 997 error ,I think above what you mentioned is also a situation i need check   consumer is consuming the data properly or not .In my case i am trying write from DMA buffer to SPI. I saw that spi transmit function  use spiwritebyte function internally ,in this i saw gpio reg usage as (#ifdef FX3_USE_GPIO_REGS ) this mean gpio is the consumer . in this case can you explain what situations may come .

Thanks regards

Veerendra.

                 

0 Likes
abhinavg_21
Moderator
Moderator

Hi Veerendra,

-- . I saw that spi transmit function  use spiwritebyte function internally ,in this i saw gpio reg usage as (#ifdef FX3_USE_GPIO_REGS ) this mean gpio is the consumer . in this case can you explain what situations may come .

Which example you are referring to? If you check the source code of "CyU3PSpiTransmitWords" API in the library, you will find it makes use of "SPI egress register" to send the data out via SPI block.

Check the following code snippet:

SPI->lpp_spi_egress_data = temp;

Thanks & Regards

Abhinav Garg

0 Likes