USBHS_DEVEPTISRx (ISOENPT)

Device Endpoint Interrupt Status Register (Isochronous Endpoints)

This register view is relevant only if EPTYPE = 0x1 in the ”Device Endpoint x Configuration Register”.

  0x0130 + x*0x04 [x=0..9] 32 Read/Write 0   10 x

Device Endpoint Interrupt Status Register (Isochronous Endpoints)

Bit  31 30 29 28 27 26 25 24  
    BYCT[10:4]  
Access                   
Reset    0 0 0 0 0 0 0  
Bit  23 22 21 20 19 18 17 16  
  BYCT[3:0]   CFGOK   RWALL  
Access                   
Reset  0 0 0 0   0   0  
Bit  15 14 13 12 11 10 9 8  
  CURRBK[1:0] NBUSYBK[1:0]   ERRORTRANS DTSEQ[1:0]  
Access                   
Reset  0 0 0 0   0 0 0  
Bit  7 6 5 4 3 2 1 0  
  SHORTPACKET CRCERRI OVERFI HBISOFLUSHI HBISOINERRI UNDERFI RXOUTI TXINI  
Access                   
Reset  0 0 0 0 0 0 0 0  

Bit 0 – TXINI: Transmitted IN Data Interrupt

Transmitted IN Data Interrupt

For control endpoints:

0: Cleared when TXINIC = 1. This acknowledges the interrupt and sends the packet.

1: Set when the current bank is ready to accept a new IN packet. This triggers a PEP_x interrupt if TXINE = 1.

For IN endpoints:

0: Cleared when TXINIC = 1. This acknowledges the interrupt, which has no effect on the endpoint FIFO. USBHS_DEVEPTISRx.TXINI shall always be cleared before clearing USBHS_DEVEPTIMRx.FIFOCON.

1: Set at the same time as USBHS_DEVEPTIMRx.FIFOCON when the current bank is free. This triggers a PEP_x interrupt if TXINE = 1.

The user writes into the FIFO and clears the USBHS_DEVEPTIMRx.FIFOCON bit to allow the USBHS to send the data. If the IN endpoint is composed of multiple banks, this also switches to the next bank. The USBHS_DEVEPTISRx.TXINI and USBHS_DEVEPTIMRx.FIFOCON bits are set/cleared in accordance with the status of the next bank.

This bit is inactive (cleared) for OUT endpoints.

Bit 1 – RXOUTI: Received OUT Data Interrupt

Received OUT Data Interrupt

For control endpoints:

0: Cleared by writing a one to the RXOUTIC bit. This acknowledges the interrupt and frees the bank.

1: Set when the current bank contains a bulk OUT packet (data or status stage). This triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.RXOUTE = 1.

For OUT endpoints:

0: Cleared by writing a one to the RXOUTIC bit. This acknowledges the interrupt, which has no effect on the endpoint FIFO. USBHS_DEVEPTISRx.RXOUTI shall always be cleared before clearing USBHS_DEVEPTIMRx.FIFOCON.

1: Set at the same time as USBHS_DEVEPTIMRx.FIFOCON when the current bank is full. This triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.RXOUTE = 1.

The user reads from the FIFO and clears the USBHS_DEVEPTIMRx.FIFOCON bit to free the bank. If the OUT endpoint is composed of multiple banks, this also switches to the next bank. The USBHS_DEVEPTISRx.RXOUTI and USBHS_DEVEPTIMRx.FIFOCON bits are set/cleared in accordance with the status of the next bank.

This bit is inactive (cleared) for IN endpoints.

Bit 2 – UNDERFI: Underflow Interrupt

Underflow Interrupt

This bit is set, for isochronous IN/OUT endpoints, when an underflow error occurs. This triggers a PEP_x interrupt if UNDERFE = 1.

An underflow can occur during IN stage if the host attempts to read from an empty bank. A zero-length packet is then automatically sent by the USBHS.

An underflow can also occur during OUT stage if the host sends a packet while the bank is already full. Typically, the CPU is not fast enough. The packet is lost.

It is cleared by writing a one to the UNDERFIC bit. This acknowledges the interrupt.

Bit 3 – HBISOINERRI: High Bandwidth Isochronous IN Underflow Error Interrupt

High Bandwidth Isochronous IN Underflow Error Interrupt

ValueDescription
0

Cleared when the HBISOINERRIC bit is written to one. This acknowledges the interrupt.

1

Set for High-bandwidth isochronous IN endpoint (with NBTRANS = 2 or 3) at the end of the microframe, if less than N banks were written by the CPU within this microframe. This triggers a PEP_x interrupt if HBISOINERRE = 1.

Bit 4 – HBISOFLUSHI: High Bandwidth Isochronous IN Flush Interrupt

High Bandwidth Isochronous IN Flush Interrupt

ValueDescription
0

Cleared when the HBISOFLUSHIC bit is written to one. This acknowledges the interrupt.

1

Set for High-bandwidth isochronous IN endpoint (with NBTRANS = 2 or 3) at the end of the microframe, if less than N transactions have been completed by the USBHS without underflow error. This may occur in case of a missing IN token. In this case, the banks are flushed out to ensure the data synchronization between the host and the device. This triggers a PEP_x interrupt if HBISOFLUSHE = 1.

Bit 5 – OVERFI: Overflow Interrupt

Overflow Interrupt

ValueDescription
0

Cleared when OVERFIC = 1. This acknowledges the interrupt.

1

Set when an overflow error occurs. This triggers a PEP_x interrupt if OVERFE = 1. For all endpoint types, an overflow can occur during OUT stage if the host attempts to write into a bank that is too small for the packet. The packet is acknowledged and the USBHS_DEVEPTISRx.RXOUTI bit is set as if no overflow had occurred. The bank is filled with all the first bytes of the packet that fit in.

Bit 6 – CRCERRI: CRC Error Interrupt

CRC Error Interrupt

ValueDescription
0

Cleared when CRCERRIC = 1. This acknowledges the interrupt.

1

Set to signal that a CRC error has been detected in an isochronous OUT endpoint. The OUT packet is stored in the bank as if no CRC error had occurred. This triggers a PEP_x interrupt if CRCERRE = 1.

Bit 7 – SHORTPACKET: Short Packet Interrupt

Short Packet Interrupt

ValueDescription
0

Cleared when SHORTPACKETC = 1. This acknowledges the interrupt.

1

Set for non-control OUT endpoints, when a short packet has been received. This triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.SHORTPACKETE = 1.

Bits 9:8 – DTSEQ[1:0]: Data Toggle Sequence

Data Toggle Sequence

This field is set to indicate the PID of the current bank:

For IN transfers, it indicates the data toggle sequence that should be used for the next packet to be sent. This is not relative to the current bank.

For OUT transfers, this value indicates the last data toggle sequence received on the current bank.

By default, DTSEQ is 0b01, as if the last data toggle sequence was Data1, so the next sent or expected data toggle sequence should be Data0.

For high-bandwidth isochronous endpoint, a PEP_x interrupt is triggered if:

ValueNameDescription
0 DATA0

Data0 toggle sequence

1 DATA1

Data1 toggle sequence

2 DATA2

Data2 toggle sequence (for high-bandwidth isochronous endpoint)

3 MDATA

MData toggle sequence (for high-bandwidth isochronous endpoint)

• USBHS_DEVEPTIMRx.MDATAE = 1 and a MData packet has been received (DTSEQ = MData and USBHS_DEVEPTISRx.RXOUTI = 1).

• USBHS_DEVEPTISRx.DATAXE = 1 and a Data0/1/2 packet has been received (DTSEQ = Data0/1/2 and USBHS_DEVEPTISRx.RXOUTI = 1).

Bit 10 – ERRORTRANS: High-bandwidth Isochronous OUT Endpoint Transaction Error Interrupt

High-bandwidth Isochronous OUT Endpoint Transaction Error Interrupt

This bit is set when a transaction error occurs during the current microframe (the data toggle sequencing is not compliant with the USB 2.0 standard). This triggers a PEP_x interrupt if USBHS_DEVEPTIMRx.ERRORTRANSE = 1.

This bit is set as long as the current bank (CURRBK) belongs to the bad n-transactions (n = 1, 2 or 3) transferred during the microframe. It is cleared by software by clearing (at least once) the USBHS_DEVEPTIMRx.FIFOCON bit to switch to the bank that belongs to the next n-transactions (next microframe).

Bits 13:12 – NBUSYBK[1:0]: Number of Busy Banks

Number of Busy Banks

This field is set to indicate the number of busy banks:

For IN endpoints, it indicates the number of banks filled by the user and ready for IN transfer. When all banks are free, this triggers a PEP_x interrupt if NBUSYBKE = 1.

For OUT endpoints, it indicates the number of banks filled by OUT transactions from the host. When all banks are busy, this triggers a PEP_x interrupt if NBUSYBKE = 1.

When the USBHS_DEVEPTIMRx.FIFOCON bit is cleared (by writing a one to the USBHS_DEVEPTIMRx.FIFOCONC bit) to validate a new bank, this field is updated two or three clock cycles later to calculate the address of the next bank.

A PEP_x interrupt is triggered if:

ValueNameDescription
0 0_BUSY

0 busy bank (all banks free)

1 1_BUSY

1 busy bank

2 2_BUSY

2 busy banks

3 3_BUSY

3 busy banks

• For IN endpoint, USBHS_DEVEPTIMRx.NBUSYBKE = 1 and all the banks are free.

• For OUT endpoint, USBHS_DEVEPTIMRx.NBUSYBKE = 1 and all the banks are busy.

Bits 15:14 – CURRBK[1:0]: Current Bank

Current Bank

This field is used to indicate the current bank. It may be updated one clock cycle after the RWALL bit changes, so the user should not poll this field as an interrupt bit.

ValueNameDescription
0 BANK0

Current bank is bank0

1 BANK1

Current bank is bank1

2 BANK2

Current bank is bank2

3

Reserved

Bit 16 – RWALL: Read/Write Allowed

Read/Write Allowed

This bit is set for IN endpoints when the current bank is not full, i.e., the user can write further data into the FIFO.

This bit is set for OUT endpoints when the current bank is not empty, i.e., the user can read further data from the FIFO.

This bit is never set in case of error.

This bit is cleared otherwise.

Bit 18 – CFGOK: Configuration OK Status

Configuration OK Status

This bit is updated when USBHS_DEVEPTCFGx.ALLOC = 1.

This bit is set if the endpoint x number of banks (USBHS_DEVEPTCFGx.EPBK) and size (USBHS_DEVEPTCFGx.EPSIZE) are correct compared to the maximal allowed number of banks and size for this endpoint and to the maximal FIFO size (i.e., the DPRAM size).

If this bit is cleared, the user should rewrite correct values to the USBHS_DEVEPTCFGx.EPBK and USBHS_DEVEPTCFGx.EPSIZE fields.

Bits 30:20 – BYCT[10:0]: Byte Count

Byte Count

This field is set with the byte count of the FIFO.

For IN endpoints, the field is incremented after each byte written by the software into the endpoint and decremented after each byte sent to the host.

For OUT endpoints, the field is incremented after each byte received from the host and decremented after each byte read by the software from the endpoint.

This field may be updated one clock cycle after the RWALL bit changes, so the user should not poll this field as an interrupt bit.