Search found 14 matches

by rgcoldeman
Wed Mar 03, 2021 4:23 pm
Forum: Raspberry Pi microcontroller boards
Topic: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output
Replies: 4
Views: 3609

Re: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output

@rgcoldeman, thank you very much to point me to you project, which shows how to use DMA! What I don't understand: How do you know, that these channels are not used by anything? ( I had no knowledge of mem32[], so easy.) Yes, I think, DMA should be able to be clocked at a certain clock rate too and ...
by rgcoldeman
Wed Mar 03, 2021 8:09 am
Forum: Raspberry Pi microcontroller boards
Topic: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output
Replies: 4
Views: 3609

Re: DDS Sine Generator, Inline Assembler, 2nd Core, Double PWM Output

Nice work! I've done a DDS generator with a completely different approach, it may be some of the techniques can be combined; it is documented on https://www.instructables.com/Arbitrary-Wave-Generator-With-the-Raspberry-Pi-Pic/ (also a thread here: https://forum.micropython.org/viewtopic.php?f=21&t=9...
by rgcoldeman
Thu Feb 18, 2021 11:49 am
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Very nice, thanks for sharing!
by rgcoldeman
Mon Feb 08, 2021 9:10 am
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Indeed mem32 is slow. I used viper to get the address of the array to pass on to the registers, not for speed, since it's only for configuration. In another test I compared blink speed between mem32 and ptr (both viper). ptr could get me up to 15.625MHz, (4 clock cycles per loop), mem32 well below 1...
by rgcoldeman
Mon Feb 08, 2021 8:04 am
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Thanks, it looks very neat!

I've posted a more detailed description of the project on https://www.instructables.com/Arbitrary ... ry-Pi-Pic/
by rgcoldeman
Sun Feb 07, 2021 10:58 pm
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Ah, you refer to the DMA classes posted by mw66 on this list? It looks awesome and I hope those classes or similar will eventually be included with the RP2 micropython. (actually I don't find the implemation of 'SetChannelData' method used in the examples) The code I posted directly writes the DMA r...
by rgcoldeman
Sun Feb 07, 2021 9:19 pm
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

The code is complete. It should work out of the box. I used the original 1.13 RP2 micropython version. Where would you expect a 'SetChannelData' method/function?
by rgcoldeman
Sun Feb 07, 2021 6:04 pm
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

OK it works, it is amazing: true 125Msps AWG without even overclocking, and without CPU!! Trick was to use a second DMA channel to reconfigure with a single write to the READ register the first. The DMA sends 32-bit words but the PIO only consumes 8 bits a time, so there is no delay in the reconfigu...
by rgcoldeman
Sat Feb 06, 2021 8:19 am
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Just not easy for a newbie trying to stick to micropython... FWIW, you can control the PIO from MicroPython. See https://github.com/micropython/micropython/blob/master/examples/rp2/pio_ws2812.py for an example that uses data from memory to control a pin. Thanks! yes it's very powerful. Anyway the p...
by rgcoldeman
Fri Feb 05, 2021 7:34 am
Forum: Raspberry Pi microcontroller boards
Topic: DMA, adresses
Replies: 24
Views: 24166

Re: DMA, adresses

Yes, from what I read in the datasheet it should be possible to do DMA->PIO->GPIO. That's probably the best solution, it gives some extra flexibility on frequency from the PIO clock divider and on the choice of pins. Just not easy for a newbie trying to stick to micropython...