Why hello there fellows. I hope you can help me with this problem since it's been causing me headaches for days now.
First of all, i'm working on the Evaluation Kit TM4C1294XL with the TM4C1294NCPDT being the heart of it. I'm trying to get some signal processing running on it but failed on the synchronization of the ADC modules.
What i'm basically trying is, i want to use the SYNCWAIT and GSYNC Bits of the PSSI-Register to synchronize both ADC Modules to acquire data from two different channels (alas, two simple analogue Inputs). The configuration and setup went all fine, the ADCs fired and gave me Interrupts, even working with the DMA like a charm now. Unsynched, but they're working.
But here's the bug.
As soon as i try to prepare them for synchronized action (Setting the SYNCWAIT and the SSx Bit for the correct Sequencer) and set the GSYNC Bit of either Module as stated in the datasheet of the Controller under the PSSI-Register, both Modules just stupidly reset all their Bits in the PSSI-Register and remain dull. Not doing anything. My DMA remaining sad as it's unfed.
void vInitADC(){ // Initializing of the ADC Modules needed to poll the excitation frequency // And the data sincos data signals SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); SysCtlDelay(10); SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC1); SysCtlDelay(10); SysCtlPeripheralEnable(SYSCTL_PERIPH_COMP0); SysCtlDelay(10); /* // ****************************************************************************** // Initialization of ADC1 Module for Acquisition of the excitation Signal on PK3 // Settings: // 1 Msps ^= 16MHz ADC clock // // Set up the Clock at | (VCO/15)/2 = (480/15)/2 = 16MHz | which equals 1Msp/s ADCClockConfigSet(ADC1_BASE, ADC_CLOCK_SRC_PLL | ADC_CLOCK_RATE_HALF, 15); SysCtlDelay(10); ADCClockConfigSet(ADC0_BASE, ADC_CLOCK_SRC_PLL | ADC_CLOCK_RATE_HALF, 15); // Choose Sequencer 2 and set it at the highest Priority. ADCSequenceConfigure(ADC0_BASE, 2, ADC_TRIGGER_ALWAYS, 0); ADCSequenceConfigure(ADC1_BASE, 2, ADC_TRIGGER_ALWAYS, 0); // Choose Step 0 in Sequencer 2 as Data Buffer, set it as last Step and enable Interrupts ADCSequenceStepConfigure(ADC0_BASE,2,0, ADC_CTL_CH16 | ADC_CTL_END); ADCSequenceStepConfigure(ADC1_BASE,2,0, ADC_CTL_CH17 | ADC_CTL_END); // Enable the Sequencers SS1 and SS2 + their respective DMA-Channels. ADCSequenceDMAEnable(ADC1_BASE, 2); ADCSequenceDMAEnable(ADC0_BASE, 2); ADCIntEnableEx(ADC0_BASE, ADC_INT_DMA_SS2); ADCIntEnableEx(ADC1_BASE, ADC_INT_DMA_SS2); ADCIntRegister(ADC0_BASE, 2, ADC0SS2_Handler); ADCIntRegister(ADC1_BASE, 2, ADC1SS2_Handler); // Set both ADC- Modules to wait (Set SYNCWAIT-Bit + Sequence Enable) and.. ADC0_PSSI_R |= 0x8000004; ADC1_PSSI_R |= 0x8000004;
// Commented since we don't want to start the modules asynchronuosly.
// If uncommented, the ADC Modules will start sampling right away. //ADCSequenceEnable(ADC0_BASE, 2); //ADCSequenceEnable(ADC1_BASE, 2); // Fire away! (Starting concurrent measures by setting GSYNC) // Be aware that it doesn't matter which GSYNC Bit is set. // Setting the GSYNC Bit of any ADC-Module will start all Modules waiting // (Whereby 'waiting' is defined by having the SYNCWAIT Bit set. ADC0_PSSI_R |= 0x80000000; }
I am aware that the Errata states that the Global Synchronization does not work on Silicon Revision 1 Controllers. But i have double-checked every single Evaluation Kit i have here and the printed name says "XM4C1294NCPDTI2" where the "I2" part should state a Silicon Revision 2.
Could it be that the global synch does not work due to the Controllers being pre-production? (Due to the X in front). Silicon Revision has been double-checked with the DID0 Register stating that it indeed is a Revision 2
DID0_MIN = 0x01
DID1_MAJ = 0x00
I would be VERY happy if someone could acknowledge he/she got the global synchronization of the ADC modules to work and would share some code for me to analyze.
Thanks in Advance