I am using the ArduinoDueHifi library (https://github.com/delsauce/ArduinoDueHiFi). It configures the Arduino DUE's SSC controller to operate in I2S mode for interfacing with external CODECs.
The problem is, I do not get output on the TD line from the Due.
I am using the following code to produce a 12MHz clock signal to run the Codec:
REG_PIOA_WPMR = 0x50494F00; // enable writes REG_PIOA_PDR |= 0x02; // enable peripheral control REG_PIOA_PER &= ~0x02; // Prevents disabling peripheral control of the pin REG_PIOA_ABSR |= 0x02; // B preipherial select REG_PIOA_WPMR = 0x50494F01; // disable writes REG_PMC_WPMR = 0x504D4300; // enable writes REG_PMC_SCER |= 0x100; //page 558!!! PMC->PMC_PCK = 0b00000000000000000000000000000001; // master clock = 12Mhz (crystal freq) //REG_PMC_WPMR = 0x504D4301; // disable writes (unnecessary)
Has anyone ever used the SSC controller for I2S? Does anyone know if generating this timer signal via the PMC could prevent the SSC controller from working correctly?