997 error

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

cross mob
Anonymous
Not applicable

 Hi, is it possible to track 997 error in the firmware (some event or EP status)? For example, if I send more bytes than free buffers in DMA channel

0 Likes
1 Solution
Anonymous
Not applicable

 Hi,

   

If you write more data than the buffer size then over run error will be registered in the PIB registers. That can be known with the following code that is there in the FX3 SlaveFIFO firmware:

   

void     

   

gpif_error_cb(CyU3PPibIntrType cbType, uint16_t cbArg)     

   

{     

   

 

   

if(cbType==CYU3P_PIB_INTR_ERROR)     

   

{     

   

    switch (CYU3P_GET_PIB_ERROR_TYPE(cbArg))     

   

    {     

   

        case CYU3P_PIB_ERR_THR0_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR1_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR2_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR3_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_WR_OVERRUN");     

   

        break;     

   

 

   

        case CYU3P_PIB_ERR_THR0_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR1_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR2_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR3_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_RD_UNDERRUN");     

   

        break;     

   

 

   

        default:     

   

        CyU3PDebugPrint (4, "No Error :%d\n ",CYU3P_GET_PIB_ERROR_TYPE(cbArg));     

   

            break;     

   

    }     

   

}     

   

 

   

 

   

}

   

 

   

Thanks,
Sai Krishna.

   

     

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

 Hi,

   

If you write more data than the buffer size then over run error will be registered in the PIB registers. That can be known with the following code that is there in the FX3 SlaveFIFO firmware:

   

void     

   

gpif_error_cb(CyU3PPibIntrType cbType, uint16_t cbArg)     

   

{     

   

 

   

if(cbType==CYU3P_PIB_INTR_ERROR)     

   

{     

   

    switch (CYU3P_GET_PIB_ERROR_TYPE(cbArg))     

   

    {     

   

        case CYU3P_PIB_ERR_THR0_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR1_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR2_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_WR_OVERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR3_WR_OVERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_WR_OVERRUN");     

   

        break;     

   

 

   

        case CYU3P_PIB_ERR_THR0_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR0_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR1_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR1_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR2_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR2_RD_UNDERRUN");     

   

        break;     

   

        case CYU3P_PIB_ERR_THR3_RD_UNDERRUN:     

   

        CyU3PDebugPrint (4, "CYU3P_PIB_ERR_THR3_RD_UNDERRUN");     

   

        break;     

   

 

   

        default:     

   

        CyU3PDebugPrint (4, "No Error :%d\n ",CYU3P_GET_PIB_ERROR_TYPE(cbArg));     

   

            break;     

   

    }     

   

}     

   

 

   

 

   

}

   

 

   

Thanks,
Sai Krishna.

   

     

0 Likes
Anonymous
Not applicable

And if I send more than DMA could accept not by GPIF but by USB?

0 Likes
Anonymous
Not applicable

 Or if I try to send buffer, but all DMA buffers are not consumed by consumer socket yet?

0 Likes
Anonymous
Not applicable

 Hi,

   

Data more than DMA buffer is not accepted by any side. GPIF or USB. If the data in the DMA buffer is committed to the other (consumer) side then you can write data into the buffers again.

   

Thanks,

   

Sai Krishna.