-
Notifications
You must be signed in to change notification settings - Fork 167
bcm283x: complete DMA support #172
Comments
Thanks for the inquiry! I have various local branches in various states of brokenness. :) There were challenges:
I've pushed one of my "less bad" branches as https://github.com/google/periph/tree/2_bcm_dma and https://github.com/google/periph/tree/7_allwinner. Allwinner support is not needed for this feature, it's just FYI. |
Thanks for the information! I will take a look at your branch. |
The TL;DR; of the above is that focusing on getting the PCM driver up and running is probably a more efficient use of our time, but for simple edge streams with high tolerances like for a servo on an arbitrary pin, the dual DMA channels with one controlBlock per bit toggle is probably going to be a good route. |
In my case, my end goal is to have tight tolerance enough to drive https://github.com/google/periph/blob/master/experimental/devices/nrzled/nrzled.go which cannot be efficiently encoded as bit toggle. |
In practice we could totally abuse other ports like SPI and UART for similar purposes, only if the kernel drivers had proper clock calculation logic... |
Ok, I think I mostly implemented the features. However, there is a big mystery why DMA pacing is working...
Can we assume the system starts such DMA or is it specific to my system?
I guess we need to set up DMA writing FIFO by ourselves but it is also undesirable to have 2 channels writing to PWM FIFO simultaneously. |
About the last point, it is on Raspbian Lite or with X? Because you may need to uninstall the audio subsystem (?) |
I guess it is with X but I installed it more than a year ago and don't quite remember how I installed it. I already commented out "dtparam=audio=on" in boot/config.txt. I tried not to load snd-bcm2835 but it did not work. Anyway, it turned out I have installed pi-blaster and the daemon starts automatically after reboot and starts DMA to write PWM FIFO. |
Ported to periph/host#44. |
What is the status of BCM283X DMA support?
I am interested in using DMA for
Both seem supported by Pigpio.
I found some code in bcm283x/dma.go but it does not seem to have an interface for it.
I am considering to play with DMA in the next few weeks. If there is anything I can help to implementing them in periph, please let me know.
Thanks,
The text was updated successfully, but these errors were encountered: