AT32WB415
Series Reference Manual
2022.04.13
Page 305
Ver 2.00
{
Increment Error Count
Unmask ACK
Unmask CHHLTD
Disable Channel
}
else if (CHHLTD)
{
Mask CHHLTD
if (Transfer Done or (Error_count == 3))
{
De-allocate Channel
}
else Re-initialize Channel (in next b_interval - 1 uF/F)
}
}
else if (ACK)
{
Reset Error Count
Mask ACK
}
The application can only write a request to the same channel when the remaining space in the request
queue reaches the number defined in the MC field, before switching to other channles (if any).
20.5.3.10
Initialize interrupt OUT transfers
shows a typical interrupt OUT transfer operation. Refer to channel 1 (ch_1). The
assumptions are as follows:
The application is attempting to send one largest-packet-size packe (transfer size is 64 bytes)
starting from an odd frame
The periodic transmit FIFO can store one packet (1KB bytes for full-speed transfer)
The periodic request queue depth is 4
(1) Common interrupt IN operation process
The sequence of operations shown in Figure
1.
Initialize channel 1 (according to OTGFS channel initialization requirements). The application must
set the ODDFRM bit in the OTGFS_HCCHAR2 register
2.
Write the first packet to the channel 1
3.
Along with the last DWORD write of each packet, the host writes a reques to the periodic request
queue
4.
The host sends an OUT token in the next frame (odd)
5.
The host generates an XFERC interrupt after the last packet is transmitted successfully
6.
In response to the XFERC interrupt, re-initialize the channel for the next transfer.
(2) Handling interrupts