This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADC End of Conversion

Other Parts Discussed in Thread: CONTROLSUITE

Can somebody tell me, how in 2xPM_Sensorless controlsuite project, I can make sure that the ADCRESULTS are current everytime the innermost control loop (every switching cycle, 10KHz rate as set in the project). The question I asked because for running a closed loop current control the sampled phase currents inside the MCU need to be upgated and that should be the way it is implemented because the control cycle starts with ADC SOC signal triggered by EPWM1A at the same time it jumps to the MainISR.

My question is: I do not see in "f2803xileg_vdc_2XPM.h" or somewhere else that the ADCRESULTS are used inside the MainISR after the analog signals are completed the conversion that is EOC of ADC, otherwise how do we make sure the samples currents are most recent one ?? Let me know how the program is waiting from the moment PWM1A created an interrup to the MainISR to the EOC od ADC.

  • Sibaprasad,

    This is a good question.  We have not implemented a way to check if the conversion is complete, but can tell it will be complete by making sure that we do not use any ADC samples until enough cycles have passed that we know the ADC conversions are complete.  For Piccolo, the amount of time to do all conversions is (ACQPS+1)*n + 13 cycles.  For this project there are 5 conversions with an ACQPS of 6, so it should take 48 cycles to complete all conversions.  We have chosen to do other calculations for the ISR during this time.

    There is flexibility in Piccolo, we also could have chosen to start the ISR at the end of the last ADC conversion.  In this way you are always guaranteed to have your ADC conversions be complete.  The negative here is that those 48 cycles cannot be used for doing the ISR (additionally, your ISR will be required to be 48 cycles shorter so that the PWM duty is updated before the next PWM cycle).


    Thank you,
    Brett