I seem to be having some trouble getting my Pi Zero to use a DAC pHAT at the same time as driving some NeoPixels.
I’m using GPIO 13 for the Neopixels via the AdaFruit python library. as far as I know, that doesn’t clash with the DAC pHAT (which uses GPIO 19). And both work independently, but as soon as I try getting them both working, the NeoPixel library locks up on a call to show().
hmm - the Neopixel library drops into C pretty quickly and my C coding is very rusty,
I did notice this code though:
/**
* Wait for any executing DMA operation to complete before returning.
*
* @param ws2811 ws2811 instance pointer.
*
* @returns 0 on success, -1 on DMA competion error
*/
int ws2811_wait(ws2811_t *ws2811)
{
volatile dma_t *dma = ws2811->device->dma;
I’m wondering whether the DAC pHAT uses DMA trtansfers too - this may be the clash. I’m not sure how the DMA stuff works - can you have 2 simultaneous DMAs over GPIO?