Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tinyusb support dma feature #2191

Open
1 task done
jeffery88 opened this issue Jul 31, 2023 · 3 comments
Open
1 task done

tinyusb support dma feature #2191

jeffery88 opened this issue Jul 31, 2023 · 3 comments

Comments

@jeffery88
Copy link

Related area

DMA

Hardware specification

synopsys dwc2

Is your feature request related to a problem?

How can tinyusb support dma features when its operation seems to be all fifo based? It is recommended to add the implementation of dma to improve the transfer rate of usb

Describe the solution you'd like

It's difficult when I want to use the dma function with the tinyusb.I hope tinyusb can support dma feature.And I would be happy to port synopsys's dma to tinyusb.

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
@HiFiPhile
Copy link
Collaborator

Hi,

We had some discussion regarding DMA support in the past. The difficulty is to have a portable abstraction layer to make DMA compatible with most MCUs, also DWC2 is used by many Cortex-M & RiSC-V MCU families.

It's welcomed if you want to make a PR.

@cleverca22
Copy link

one area ive seen makes the fifo/dma stuff a bit more obvious, in dwc host mode

the high-speed ping protocol is manual when in non-dma mode
so you dont write to the fifo, you just enable sending pings
and when the ping gets an ACK, then you write to the fifo, and send the actual OUT

but in dma mode, you configure the DMA addr and enable pinging
it will ping, but not do dma
once it gets an ACK from the device, it will fill its own FIFO with DMA, and then perform the OUT

so at the end, its still driven by all of the FIFO's, but its just using DMA to fill them at the right time

@HiFiPhile
Copy link
Collaborator

There is an on going PR : #2576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants