Post Go back to editing

USB FIFO byte access BF548


I have read the BF548 hardware reference guide, and am a little confused by what it says regarding byte access to the USB FIFOs through the MMR peripheral bus (not DMA).

The datasheet:

ADSP-BF54x BlackfinRegistered Processor
Hardware Reference
(includes ADSP-BF542, ADSP-BF544,
Revision 1.0, August 2010
Part Number
For endpoint zero, I assume that the same mechanism as used for other TX endpoints applies - that is, I can use the USB_TXCOUNT register, load it with an odd number, and then perform word writes to USB_EP0_FIFO (0xFFC03C80). If I need to write say 5 bytes, I should set USB_TXCOUNT to 5, then
perform 3 word writes, and the last word write will only result in one byte being written to the fifo. Is this correct?
The part I find confusing is on page 26-130, with regards to USB_TXCOUNT register:
"The value is decremented
by two when the processor core writes to the corresponding USB_EPx_FIFO
high word address and is decremented by one when the processor core
writes a byte to the FIFO using the corresponding USB_EPx_FIFO low word
address. If the count itself reaches 0x0001 (which would only happen for
odd-sized transfers), the next write into either USB_EPx_FIFO high word or
USB_EPx_FIFO low word writes only the least significant byte of the half
word into the FIFO. This aids DMA transfers that require IO accesses to
go to the same address. "
The datasheet is unclear about what address exactly is the "high word" address and what address is the "low word" address. I assume that 0xFFC03C80 is the high word address and that this should be used when programming DMA transfers. Is this correct?
Is the "low word" address at the high word address + 4, as hinted at on page 26-88:
For EP0 RX transfers, if the last packet is not a multiple of four
bytes it is strongly recommended that the remainder (n bytes mod
4) be unloaded from the FIFO using a special byte addressing
FIFO register (EP0 FIFO address + 4).
- Wayne
  • Hi Wayne,

    Sorry for the delay.

    What you said is correct i.e setting TXCOUNT = 5, perform 3 word writes. Ensure that the last byte is aligned to the least significant byte lane. Yes, (EPx FIFO address + 4) would be the low word address. Let us know if you are encountering any issues in transferring odd number of bytes in core mode.

    Best Regards,


  • hi,

           If i have a descriptor buffer and i want to reply for the request Get_descriptor through end point 0. Then how can i send the buffer whether i need to update my buffer address in USB_EP0_FIFO (0xFFC03C80) register, but it is 16 bit register. I am confused with this. Please explain me briefly.

    Thanking you,



  • Hello,

    did you see ad_usb_hdrc.c source code for example? That is ADI's USB driver for bf54x.

       *pUSB_EP0_FIFO = *pData++;

  • This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

    Thank you,
    EZ Admin