AT32WB415
Series Reference Manual
2022.04.13
Page 301
Ver 2.00
else if (ACK)
{
Reset Error Count
Mask ACK
}
else if (DATATGLERR)
{
Reset Error Count
}
20.5.3.8 Initialize bulk and control OUT/SETUP transfers
shows a typical bulk or control transfer OUT/SETUP transfer operation. Refer to channel 1
(ch_1) for more information. It is necessary to send two bulk transfer OUT packets. The control transfer
SETUP operation is the same, just the fact that it has only one packet. The assumptions are as follows:
The application is attempting to send two largest-packet-size packets (transfer size is 64 bytes)
The non-periodic transmit FIFO can store two packets (128 bytes for full-speed transfer)
The non-periodic request queue depth is 4
(1) OUT/SETUP operation process for common bulk and control transfer
The sequence of operations shown in
1. Initialize channel 1 (according to OTGFS channel initialization requirements)
2. Write the first packet for channel 1
3. Along with the last DWORD write, the controller writes a request to the non-periodic request queue
4. The controller sends an OUT token in the current frame as soon as the non-periodic queue becomes
empty
5. Write the second packet (the last one) to the channel 1
6. The controller generate an XFERC interrupt as soon as the previous transfer is completed
successufully
7. In response to the XFERC interrupt, the processor does not allocate the channel for other transfers.