-
Notifications
You must be signed in to change notification settings - Fork 48
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
Potential DMA overhaul/rethink/cleanup discussion #170
Comments
I have quite limited experiance with DMA so take this with a grain of salt but here are some of the use cases I think might be nice to support:
|
|
Would that mean that you could have the entire control loop running in FMAC? So for example ADC -> FMAC(for example Something along those lines might be done in AN5788 |
Interesting idea! I have never used the FMAC so I don't know if this is within it's capabilities. I was just thinking denoising an ADC signal before serving it to the CPU, but if the FMAC can facilitate a PID loop for the duty cycle of a timer that would be an awesome example to provide! |
Reading an5497 page 51 they seem to "only" have the DMA transfer from ADC to FMAC and then trigger an interrupt which does some clamping and then passes the value along. |
Table 9 of AN5788 gives some performance numbers on regulator in software vs in FMAC |
Yeah those numbers make sense, I kind of expected the performance improvement to be much greater (like CORDIC) but I guess filtering takes a long time even when done by a dedicated co-processor. Still would be a good DMA example. |
Could something like |
I really don't have enough information to say right now. It might be some time before I have enough experience with DMA to speak to any design choices. I am thinking on it but I don't have any answers yet. It likely would be a step in the right direction, though. |
Just spitballing here (@usbalbin let me know what you think of this). What if transfers were split into sources and sinks? For example, sending bytes over UART, the USART peripheral would take ownership of the sink (or the sink take ownership of the USART) (hopefully the USART can also be split into Tx and Rx) and then the user can write to the source whenever they want. It could even implement Do please poke holes in this idea. |
What use case would splitting the source from the sink open up that would not be possible with one single type( Oh, that would probably help with peripheral to peripheral transfers right? |
Yeah good point, I guess it could be one type. But you're right for p-p it could be useful, I hadn't thought of that. Nonetheless, split or not, I think designing an interface with a An async interface could accept a non-static reference. |
Ah, I guess this is reminiscent of a "oneshot" transfer, perhaps that could be a type-state of Edit: It's kind of almost set up like that but the interfaces exposed don't seem appropriate. |
Thought I would make an issue to have somewhere to discuss
Some prior art
Doc
cc @AdinAck
The text was updated successfully, but these errors were encountered: