Raspberry Pi DMA notes

DMA-hacking

Apparently, there are ways of generating reasonably accurate timing even with the non-realtime OS being used, by exploiting the DMA mechanism and let it run N words out at its basic rate, then use these for PWM, servo control, or sampling.

Richard Hirst ( https://github.com/richardghirst/PiBits/ ) has shown how he can access and control the DMA subsystem and make it run at 1M samples per second. ( https://github.com/richardghirst/Panalyzer/ ) His way of handling the level changes is also a good one: using TTL open-collector outputs pulled up to 3.3 V

Sarfata ( https://github.com/sarfata/pi-blaster/ ) made some modifications to the servo-code and made some PWM outputs to control an RGB LED ligth.

This DMA stuff looks very interesting. At 1MBPS, clocking in something like the MCP3201 serial ADC may make for a good analog input interface as well, with accurate timing. Could make a great spectrum analyzer for example: Clock N MCP3201s for N channels of input, at the same time, each needing 16 clocks for a 12-bit sample; then with 1 MHz DMA this will be 62500 samples/second, for a max. useable frequency of 31250 Hz.

Plenty for audio-range work.