I'm using the CY8C4247AZI-M485. I want to use the IDAC component with the DMA to generate a sine wave. I believe I have everything set up correctly but it's not working. In the "DMA Support" section of the IDAC datasheet it states the following:
Note DMA support in the IDAC_P4 component is limited due to the following reasons:
The IDAC_1_IDAC_CONTROL register is common for two IDACs (8-bit IDAC and 7-bit IDAC).
The IDAC_1_IDAC_CONTROL register is common for the IDAC setting and IDAC data.
Before using the DMA channel with the IDAC_P4 component, review the description of this register in the device registers Technical Reference Manual (TRM).
I've searched for "IDAC_CONTROL" in the TRM but couldn't find anything.
Can someone tell me if this is even possible with this PSOC? If so, what am I doing wrong?
Attached is a wave DAC generation project for P4M. The DMA transfer to IDAC on P4 is tricky, it has to be 2 bytes, with MSB set to 0x07, and LSB is actual IDAC value (so RAM array must be 16-bit instead of 8-bit). This MSB is configuration setting for IDAC, controlling current output/bit, which has to be set on each DMA transaction. The DMA trigger has to be set to "unknown width". Max frequency achievable is lower than for PSoC5, reaching ~13.4 kHz @256 points/waveform, but the DAC output quality is better (no bit flipping glitches). Unlike PSoC5, on P4 DMA has no "nrq" signaling the end of Buffer transfer, instead the DMA internal irq and a PinLED are used to for that purpose.
Awesome! Thank you so much!
I have an array of 360 values. Each represents 1 degree of a sine wave. I figured I could create any frequency (0-20KHz) by just increasing the "Clock_DAC" frequency. This doesn't appear to be the case. The maximum output frequency I can create is ~2KHz even as I increase the "Clock_DAC" frequency up to 6 MHz. What's limiting me?