Errors  during UDMA data transfers in CY4611B

Question: How does CY4611B handles CRC and parity errors during UDMA data transfers to ATA and ATAPI devices?

 

Answer:

 

The CY4611B  supports  UDMA(Ultra-DMA modes 0,2,4) type data transfers . To detect  the Errors on the USB data transfers  the ATAPI_ERROR_REGISTER of the attached device using the following code

ATA devices:

error = readPIO8(ATAPI_ERROR_REG);

if (sensePtr == senseCRCError)

               slowDownOnUDMAErrors();

ATAPI devices:

error = readPIO8(ATAPI_ERROR_REG);

 // Upper 4 bits of error contain sense key.  4 is the sense key for parity error

if ((error & 0xf0) == 0x40)

 {         slowDownOnUDMAErrors();      return(USBS_FAILED); }

As shown in the above code if there  is a CRC  error or  Parity bit error in the corresponding  ATA or  ATAPI devices they will slow down the UDMA data transfer rate. Using  slowDownOnUDMAErrors()  function the transfer rate is decreased to lower data transfer modes sequence as shown in the below table.        

                                                                           
   

     Sequence No:

  
   

     Data transfer mode

  
   

     Data transfer rate(MBps)

  
   

     0

  
   

     UDMA-4

  
   

     66

  
   

     1

  
   

     UDMA2

  
   

     33

  
   

     2

  
   

     PIO-4

  
   

     16.7