Is there any special action required in order to be able to change the function generator slew-rate?
I have test code that successfully sets up the DAC0 output to generate a sine-wave:
// First value (word) is the data, second value (byte) is the reg addr) SPI_DACWrite24_V2(0x0400, 0x03); // DAC-X-VOUT-CMP-CONFIG: Use VDD as reference SPI_DACWrite24_V2(0x0000, 0x05); // DAC-X-CMP-MODE-CONFIG: No hysteresis or window (default setting) SPI_DACWrite24_V2(0x840D, 0x06); /* DAC-X-FUNC-CONFIG: Clear DAC to mid scale Sine wave 1 LSB 1282 µs/step */ SPI_DACWrite24_V2(0x1249, 0x1F); // COMMON-CONFIG Register SPI_DACWrite24_V2(0x1100, 0x21); // COMMON-DAC-TRIG Register: Start function generator for DAC0 & DAC1
However if I then change the slew-time and reprogram the sine wave frequency does not update. I have to remove power and reconnect for it to take the new setting.
Similarly, if I keep the above initial code, and then periodically update the slew-rate I am expecting the sine-wave to vary in frequency, but I see no change.
I have tried stopping the relevant function generator, and even setting the function generator to "no output" (instead of sine) before setting the new slew-rate, but still I don't see any update to the output frequency.
Example slew-rate update function:
const uint16_t DAC0_FUNC_CONFIG = 0x8400;
SPI_DACWrite24_V2(0x0100, 0x21); // STOP DAC0 function generator
SPI_DACWrite24_V2(0x800D, 0x06); // set DAC0 to NO function generator
uint16_t new_dacvalue = DAC0_FUNC_CONFIG | sine_slew;
SPI_DACWrite24_V2(new_dacvalue, 0x06);
SPI_DACWrite24_V2(0x840D, 0x06); // Set DAC0 to SINE wave again.
SPI_DACWrite24_V2(0x1100, 0x21); // restart DAC0 function generator
Is there a (known working) process for changing the slew-rate?
The only mention I can find in the datasheet regarding potential issues changing the slew-rate is at the bottom of page 35 where it states "Do not write to CODE-STEPX, SLEW-RATE-X, or DAC-X-DATA during the output slew operation.". However this is why I've tried stopping the function generator before updating the slew-rate.
Thanks in advance for any assistance.






