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.
Hello Team,
I am working on TMS320F28375S with ccs 12.6.0 version. i have launchpad F28379D for use. I want to read the adc data in CLA. for that, i have made a function "uint16_t IoADCA_tReadSingleChannel(uint16_t adc_socnum)" in c file which uses the ADC_ReadResult function of adc.h which is attached with my code.
but it is showing warning while building and the CLA is not giving the adc data. please note that i have triggered the CLA and ADC from CPU.
warning #10461-D: Invalid to call C28 function "IoADCA_tReadSingleChannel" defined in ".hal_adc.obj" from CLA file "..obj"
thanks and regards,
Muzammil.
Hello Muzammil,
warning #10461-D: Invalid to call C28 function "IoADCA_tReadSingleChannel" defined in ".hal_adc.obj" from CLA file "..obj"
Did you make the function in your C file and try to call it in the CLA file? Did you create a header file which declares the function and include that header in your CLA file? There should be at least one example, cla_ex1_asin, which you can refer to on how to modify variables between CPU and CLA, this sounds similar to what you're looking for. Let me know if you're still having trouble reading the ADC results.
Hello Omer,
Thanks for your reply.
There should be at least one example, cla_ex1_asin, which you can refer to on how to modify variables between CPU and CLA
I had started my project from exactly the same exixting project which you have mentioned (cla_ex1_asin). but i have included new folder in this project and and i have declared function in that folder which gives the result of adc indirectly. means the ADC_ReadResult function is inside that function.
Did you make the function in your C file and try to call it in the CLA file? Did you create a header file which declares the function and include that header in your CLA file?
Yes,then I have done the same.
thanks and regards
Hi Muzammil,
but i have included new folder in this project and and i have declared function in that folder which gives the result of adc indirectly.
Did you make sure to update your Include Options in the Project Properties to include this specific folder? If you do CTRL+Click on the function inside your code, does it open the declaration in the header file? If not, you have not linked it properly for CCS to recognize.
Hello Omer,
Did you make sure to update your Include Options in the Project Properties to include this specific folder?
Yes I have done this properly.
If you do CTRL+Click on the function inside your code, does it open the declaration in the header file?
yes, I have also checked this and i have linked that folder properly.
Is there any way i can use these functions in CLA???
thanks and regards
Hello Muzammil,
Is there any way i can use these functions in CLA???
From a CCS/compiler perspective it looks like you should be able to. I'll forward this to a CLA expert to see if perhaps there's a limitation to using certain functionality in the CLA.
Hi Muzammil,
Please refer to this similar thread about using the CLA with driverlib functions and let me know if the solution there fixes your issue.
Best Regards,
Delaney
Hello Delaney,
thanks for your support.
In the thread you have mentioned, it suggests to put the function in a header file as static function, and it works also. but is it possible that i can define the function in .c file and declare in .h file as a static?
thanks and regards
Hi Muzammil,
By "defining the function in the .c file", do you mean the one you made (IoADCA_tReadSingleChannel())? If putting your function in the .c file is really necessary, I would suggest trying to do the register access directly rather than calling ADC_ReadResult() in your function. Let me know if this fixes the issue.
Best Regards,
Delaney