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.
Hi,
I am currently looking at a motor control example 2xPM_Motors.c for Piccolo Launchpad, there is a line of code initializing the ADC module in the main function
// Initialize ADC module
F280X_ileg2_dcbus_drv_init();
Where is this function defined? I have viewed F2802x_Adc.h and F2802x_Adc.c files and they are not defined in them.
Thank you.
Jingzhe
Hello Jingzhe!
If I understand rightly you got project with your device or you downloaded it. At controlSUITE this project is absent.
Regards,
Igor
Hello again Igor,
I got controlSUITE in my home PC and I'll check that. So where is the ADC initialisation normally defined? Is it in the Adc.c file?
Thank you very much.
Jingzhe
Hi!
Perhaps there is some confusion between us...I have last version of controlSUITE but I didn't find your "2xPM project "for F28027 there. Where is you got this project?
Regards,
Igor
Hi Igor,
I downloaded the project from some motor example package. I am now looking at a project in controlSUITE \controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.0\HVPM_Sensored. I found that the ADC initialisation is defined by a macro ADC_MACRO_INIT. I have a few question:
1. how to initialise an ADC in the main .c file? There are5 funcitons in F2802x_Adc.c: InitAdc() InitAdcAio() AdcOffsetSelfCal() AdcChanSelect() and AdcConversion(), how to call the functions? The controller functions in controlSUITE\development_kits\C2000_LaunchPad are all written in c functions instead of macros.
2. I think the example \controlSUITE\development_kits\HVMotorCtrl+PfcKit_v2.0\HVPM_Sensored is based on F2803x, can I use this code for F2802x projects?
Looking forward to your reply.
Thank you very much.
Jingzhe
Hi!
I would recommend you to base on ti\controlSUITE\development_kits\LVMultiAxis+PfcKit_v1.4\2xPM_Sensorless_v1_1\. This project is for 28035. You can not use this code directly but you can use the call stack initialization from 2xPM_Sensorless.c (including ADC) and to build own initialization code for F28027. But this is not imperative. I think you can try to go through API from F2802x_Adc.c (ti\controlSUITE\device_support\f2802x\v210\) also.
Regards,
Igor