USBHS_HSTPIPISRx (INTPIPES)

Host Pipe x Status Register (Interrupt Pipes)

This register view is relevant only if PTYPE = 0x3 in ”Host Pipe x Configuration Register”.

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

Host Pipe x Status Register (Interrupt Pipes)

Bit  31 30 29 28 27 26 25 24  
    PBYCT[10:4]  
Access                   
Reset    0 0 0 0 0 0 0  
Bit  23 22 21 20 19 18 17 16  
  PBYCT[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]     DTSEQ[1:0]  
Access                   
Reset  0 0 0 0     0 0  
Bit  7 6 5 4 3 2 1 0  
  SHORTPACKETI RXSTALLDI OVERFI NAKEDI PERRI UNDERFI TXOUTI RXINI  
Access                   
Reset  0 0 0 0 0 0 0 0  

Bit 0 – RXINI: Received IN Data Interrupt

Received IN Data Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.RXINIC = 1.

1

Set when a new USB message is stored in the current bank of the pipe. This triggers an interrupt if the USBHS_HSTPIPIMR.RXINE bit = 1.

Bit 1 – TXOUTI: Transmitted OUT Data Interrupt

Transmitted OUT Data Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.TXOUTIC = 1.

1

Set when the current OUT bank is free and can be filled. This triggers an interrupt if USBHS_HSTPIPIMR.TXOUTE = 1.

Bit 2 – UNDERFI: Underflow Interrupt

Underflow Interrupt

This bit is set, for an isochronous and interrupt IN/OUT pipe, when an error flow occurs. This triggers an interrupt if UNDERFIE = 1.

This bit is set, for an isochronous or interrupt OUT pipe, when a transaction underflow occurs in the current pipe (the pipe cannot send the OUT data packet in time because the current bank is not ready). A zero-length-packet (ZLP) is sent instead.

This bit is set, for an isochronous or interrupt IN pipe, when a transaction flow error occurs in the current pipe, i.e, the current bank of the pipe is not free while a new IN USB packet is received. This packet is not stored in the bank. For an interrupt pipe, the overflowed packet is ACKed to comply with the USB standard.

This bit is cleared when USBHS_HSTPIPICR.UNDERFIEC = 1.

Bit 3 – PERRI: Pipe Error Interrupt

Pipe Error Interrupt

ValueDescription
0

Cleared when the error source bit is cleared.

1

Set when an error occurs on the current bank of the pipe. This triggers an interrupt if the USBHS_HSTPIPIMR.PERRE bit is set. Refer to the USBHS_HSTPIPERRx register to determine the source of the error.

Bit 4 – NAKEDI: NAKed Interrupt

NAKed Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.NAKEDIC = 1.

1

Set when a NAK has been received on the current bank of the pipe. This triggers an interrupt if the USBHS_HSTPIPIMR.NAKEDE bit = 1.

Bit 5 – OVERFI: Overflow Interrupt

Overflow Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.OVERFIC = 1.

1

Set when the current pipe has received more data than the maximum length of the current pipe. An interrupt is triggered if the USBHS_HSTPIPIMR.OVERFIE bit = 1.

Bit 6 – RXSTALLDI: Received STALLed Interrupt

Received STALLed Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.RXSTALLDIC = 1.

1

Set when a STALL handshake has been received on the current bank of the pipe. The pipe is automatically frozen. This triggers an interrupt if USBHS_HSTPIPIMR.RXSTALLE = 1.

Bit 7 – SHORTPACKETI: Short Packet Interrupt

Short Packet Interrupt

ValueDescription
0

Cleared when USBHS_HSTPIPICR.SHORTPACKETIC = 1.

1

Set when a short packet is received by the host controller (packet length inferior to the PSIZE programmed field).

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

Data Toggle Sequence

This field indicates the data PID of the current bank.

For an OUT pipe, this field indicates the data toggle of the next packet that is to be sent.

For an IN pipe, this field indicates the data toggle of the received packet stored in the current bank.

ValueNameDescription
0 DATA0

Data0 toggle sequence

1 DATA1

Data1 toggle sequence

2

Reserved

3

Reserved

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

Number of Busy Banks

This field indicates the number of busy banks.

For an OUT pipe, this field indicates the number of busy banks, filled by the user, ready for an OUT transfer. When all banks are busy, this triggers a PEP_x interrupt if USBHS_HSTPIPIMRx.NBUSYBKE = 1.

For an IN pipe, this field indicates the number of busy banks filled by IN transaction from the device. When all banks are free, this triggers a PEP_x interrupt if USBHS_HSTPIPIMRx.NBUSYBKE = 1.

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

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

Current Bank

For a non-control pipe, this field indicates the number of the current bank.

This field may be updated 1 clock cycle after the RWALL bit changes, so the user should not poll it 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

For an OUT pipe, this bit is set when the current bank is not full, i.e., the software can write further data into the FIFO.

For an IN pipe, this bit is set when the current bank is not empty, i.e., the software can read further data from the FIFO.

This bit is cleared otherwise.

This bit is also cleared when RXSTALLDI or PERRI = 1.

Bit 18 – CFGOK: Configuration OK Status

Configuration OK Status

This bit is set/cleared when the USBHS_HSTPIPCFGx.ALLOC bit is set.

This bit is set if the pipe x number of banks (USBHS_HSTPIPCFGx.PBK) and size (USBHS_HSTPIPCFGx.PSIZE) are correct compared to the maximal allowed number of banks and size for this pipe, and to the maximal FIFO size (i.e., the DPRAM size).

If this bit is cleared, the user should rewrite correct values for the PBK and PSIZE fields in the USBHS_HSTPIPCFGx register.

Bits 30:20 – PBYCT[10:0]: Pipe Byte Count

Pipe Byte Count

This field contains the byte count of the FIFO.

For an OUT pipe, the field is incremented after each byte written by the user into the pipe and decremented after each byte sent to the peripheral.

For an IN pipe, the field is incremented after each byte received from the peripheral and decremented after each byte read by the user from the pipe.

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