Other Parts Discussed in Thread: MOTORWARE
I am trying to use Analog input A4 for speed setting in my motor control project for f28054 based board.
Based on motorware_hal_tutorial.pdf, page 20, 21, I added following code in my Hal.c file.
ADC_setSocChanNumber(obj->adcHandle,ADC_SocNumber_8,ADC_SocChanNumber_A4);
ADC_setSocTrigSrc(obj->adcHandle,ADC_SocNumber_8,ADC_Int1TriggersSOC);
ADC_setSocSampleDelay(obj->adcHandle,ADC_SocNumber_8,ADC_SocSampleDelay_9_cycles);
However, I am not getting changing value in ADRESULT register for CH8 (A4) when I very POT.
Also, I am getting following warning for middle line,
#190-D enumerated type mixed with another type hal.c /proj_lab03b line 891 C/C++ Problem
which makes me suspect that there is some error here and probably triggering pwm and ADC need different handling.
Since, A4 is not affected by AFE settings, I presume, that the code should work without any issue.
Can anybody throw some light on this?