Tool/software: Code Composer Studio
Hello - I am trying to do high speed current sampling using the ADC modules. I assigned ADCINAO, ADCINB0 and ADCINC0 to my signals and here is the code that I used for ADC setup:
AdcaRegs.ADCSOC0CTL.bit.CHSEL = 0
AdcaRegs.ADCSOC0CTL.bit.ACQPS = 19
AdcaRegs.ADCSOC0CTL.bit.TRIGSEL = 5;
AdcbRegs.ADCSOC0CTL.bit.CHSEL = 0;
AdcbRegs.ADCSOC0CTL.bit.ACQPS = 19;
AdcbRegs.ADCSOC0CTL.bit.TRIGSEL = 5;
AdccRegs.ADCSOC0CTL.bit.CHSEL = 2;
AdccRegs.ADCSOC0CTL.bit.ACQPS = 19;
AdccRegs.ADCSOC0CTL.bit.TRIGSEL = 5;
However, I am not able to read anything from the corresponding result registers. I guess my trigger source has not been set properly can you please let me know how I need to setup my trigger source? (in this case is ePWM1 SOCB? This is how I did:
EPwm1Regs.ETSEL.bit.SOCBEN = 1;
EPwm1Regs.ETSEL.bit.SOCBSEL = 0x1;
Also if I get this working, what would be the fastest rate to read digital values? Can I get to 1MHz reading rate?