I am trying to understand how the USB module works in the very low level on STM32F4 MCUs (ARM Cortex-M4 core). In the reference manual I read often the terms Periodic and Non-Periodic Rx/Tx FIFO (I am not sure if there is periodic and non-periodic RxFIFO), for example:

Periodic TxFIFO empty interrupt mask
Nonperiodic TxFIFO empty interrupt mask
Receive FIFO nonempty interrupt mask

I do not understand what does periodic and non-periodic Tx/Rx FIFO mean (I do know what a FIFO is), I found no really helpful online resources about this. Could someone explain these terms to me please? and are these terms only specific to Tx but not Rx FIFOs?


The reference manual where you found these terms mentioned itself explains that the two types of FIFOs are used for different types of USB transfers, for example in section 34.12.2

The host uses one transmit FIFO for all non-periodic (control and bulk) OUT transactions and one transmit FIFO for all periodic (isochronous and interrupt) OUT transactions.

Realistically you probably should not be looking at the hardware engine in this level of detail unless you have substantial USB expertise; for any normal use you would let an existing USB stack (from ST or someone else) handle it, and only worry about following the requirements/examples for integration and providing or claiming data with the appropriate APIs. Getting this level of detail would tend to occur only if trying to write your own USB stack or if trying to de behind-the-scenes debugging of an unexpected incompatibility.

  • \$\begingroup\$ Thank you for your answer and for quoting from the reference manual, I basically have some essential USB understanding. I already thought (but was not sure) that periodic and non-periodic here refer to to those transfer types. So from what you wrote, are these two FIFO types applicable only for host mode? And are there only one type of Rx FIFO (no periodic and non-periodic)? \$\endgroup\$ – Mohammed Noureldin Jul 19 '19 at 22:11
  • \$\begingroup\$ Take a look at the immediately preceding section of the reference manual. And again, what actual problem are you trying to solve here? \$\endgroup\$ – Chris Stratton Jul 19 '19 at 22:12
  • \$\begingroup\$ Ok I will take a look on it. I am just trying to write a very basic USB stack to understand as far as possible what is going on here. I know it is not the easiest thing to do, but curiosity motivates me here. \$\endgroup\$ – Mohammed Noureldin Jul 19 '19 at 22:14
  • \$\begingroup\$ Ok I skimmed the OTG_FS and OTG_HS chapters, now the idea is relatively clear. Thank you! Though, may I ask you to add few words about them to your answer so that it covers the whole question (I can also edit your answer to add the information). \$\endgroup\$ – Mohammed Noureldin Jul 20 '19 at 2:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.