![ARTERY AT32F435 Series Скачать руководство пользователя страница 427](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592427.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 427
Rev 2.03
21.5.3.4 Queue depth
Up to 8 interrupt and synchronous transfer requests are supported in the periodic hardware transfer
request queue; while up to 8 control and bulk transfer requests are allowed in the non-periodic hardware
transfer request queue.
Writing the transmit FIFO
Figure 21-3 shows the flow chart of writing the transmit FIFO. The OTGFS host automatically writes a
request (OUT request) to the periodic/non-periodic request queue when writing the last one WORD
packet. The application must ensure that at least one free space is available in the periodic/non-periodic
request queue before starting to write to the transmit FIFO. The application must always write to the
transmit FIFO in WORDs. If the packet size is not aligned with WORD, the application must use padding.
The OTGFS host determines the actual packet size according to the programmed maximum packet size
and transfer size.
Figure 21-3 W riting the transm it FIFO
Wait for
GAHBCFG.NPTXFEMPLVL or
GAHBCFG.PTXFEMPLVL
interrupt
Read GNPTXSTS/
HPTXSIZ registers for
available FIFO and queue
spaces
1 MPS or
LPS FIFO is space
available?
Write 1 packet data
to Transmit FIFO
More packets to
send?
Start
Done
No
No
Yes
Yes
MPS
:
Max Packet Size
LPS
:
Last Packet Size
No
Reading the receive FIFO
Figure 21-4 shows the flow chart of reading the receive FIFO. The application must ignore all packet
statuses other than IN data packet (0x0010)