- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And if I send more than DMA could accept not by GPIF but by USB?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or if I try to send buffer, but all DMA buffers are not consumed by consumer socket yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.