User manual
...the world's most energy friendly microcontrollers
2012-04-24 - Giant Gecko Family - d0053_Rev0.96 274
www.energymicro.com
Figure 15.16. Normal Interrupt OUT/IN Transactions in DMA Mode
D
A
T
A
1
M
P
S
HostApplication DeviceAHB USB
O
U
T
D
A
T
A
0
M
P
S
1
MPS
1
MPS
init_reg(ch_1)
init_reg(ch_2)
ch_2
ch_1
I
N
O
U
T
Periodic Reque st
Queue
Assume that this
queue can hold
4 entries.
1
D
A
T
A
0
I
N
1
MPS
1
2
3
5
ch_1
2
4
5
init_reg(ch_1)
init_reg(ch_2)
init_reg(ch_1)
1
MPS
D
A
T
A
1
ch_2
4
3
A
C
K
A
C
K
A
C
K
Odd
frame
Even
frame
CHHLTD interrupt
CHHLTD interrupt
CHHLTD interrupt
15.4.3.6.11.2 Handling Interrupts
The following code sample shows the channel-specific ISR for an interrupt OUT transaction in DMA
mode.
Interrupt OUT
Unmask (CHHLTD)
if (CHHLTD)
{
if (XFERCOMPL)
{
Reset Error Count
Mask ACK
if (Transfer Done)
{
De-allocate Channel
}
else
{