User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 270
www.energymicro.com
Figure 15.15. Normal Interrupt OUT/IN Transactions in Slave Mode
Host
Application
DeviceAHB USB
O
U
T
D
A
T
A
0
M
P
S
1
MPS
1
MPS
write_tx_fifo
(ch_1)
init_reg(ch_1)
set_ch_en
(ch_2)
init_reg(ch_2)
write_tx_fifo
(ch_1)
I
N
O
U
T
D
A
T
A
1
M
P
S
Periodic Request Queue
Assume that this queue
can hold 4 entries.
1
5
D
A
T
A
0
I
N
1
MPS
read_rx_sts
read_rx_fifo
read_rx_sts
1
2
3
4
6
2
3
6
7
8
9
Odd
fram e
Even
fram e
init_reg(ch_1)
set_ch_en
(ch_2)
init_reg(ch_2)
write_tx_fifo
(ch_1)
init_reg(ch_1)
1
MPS
D
A
T
A
1
5
4
A
C
K
A
C
K
A
C
K
ch_1
ch_2
ch_2
ch_1
XFERCOMPL interrupt
XFERCOMPL interrupt
XFERCOMPL interrupt
RXFLVL int errupt
RXFLVL int errupt
Interrupt Service Routine for Interrupt OUT Transactions in Slave Mode
Interrupt OUT
Unmask (NAK/XACTERR/STALL/XFERCOMPL/FRMOVRUN)
if (XFERCOMPL)
{
Reset Error Count
Mask ACK
De-allocate Channel
}
else if (STALL or FRMOVRUN)
{
Mask ACK
Unmask CHHLTD
Disable Channel
if (STALL)
{
Transfer Done = 1
}