Hello
I am experimenting with the 28027 Piccolo controlSTICK and have been unable to reach 4.6 MSPS - perhaps there is a clock divider or something I am missing?
I am using InitSysCtrl(), InitPieCtrl(), InitPieVectTable(), InitAdc() as used in the adc_soc and adc_temp_sensor project examples. Using the following C code:
AdcRegs.ADCSOCFRC1.bit.SOC0 = 1;
while(AdcRegs.ADCCTL1.bit.ADCBSY) continue;
*bufPtr++ = AdcResult.ADCRESULT0;
This executes in 46 CPU cycles according to the timer in code composer. At a 60MHz clock this appears to correspond to 1.3 MSPS, and timing 10 million executions with a stopwatch takes over 10 seconds, indicating a sampling speed closer to 800 kSPS
Using interrupts and ePWM trigger as in the example results in even slower execution, probably due to the overhead of continually saving and reloading the CPU registers.
I was hoping to be able to sample at ~1 MSPS and have a few clock cycles spare for an optimised asm iir filtering routine - is there any way to achieve this on this MCU?