Other Parts Discussed in Thread: LAUNCHXL2-TMS57012, HALCOGEN
I was running this example https://training.ti.com/hercules-how-tutorial-12bit-adc?cu=1136292 with the launchpad LAUNCHXL2-TMS57012 in halcoGen and CCS software. But, I am getting while run the example code.
Please tell me what I need to change in my halcoGen project and CCS project.
>> Compilation failure
source/subdir_rules.mk:9: recipe for target 'source/sys_main.obj' failed
"../source/sys_main.c", line 90: error #19: extra text after expected end of number
"../source/sys_main.c", line 90: error #110: expression preceding parentheses of apparent call must have (pointer-to-) function type
2 errors detected in the compilation of "../source/sys_main.c".
gmake: *** [source/sys_main.obj] Error 1
gmake: Target 'all' not remade because of errors.
Main code
/* USER CODE BEGIN (0) */
#include "reg_adc.h"
#include "reg_sci.h"
#include "sci.h"
#include "adc.h"
#include "stdlib.h"
/* USER CODE END */
/* Include Files */
#include "sys_common.h"
#include "system.h"
/* USER CODE BEGIN (1) */
unsigned char command[8];
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
/* USER CODE END */
void main(void)
{
/* USER CODE BEGIN (3) */
adcData_t adc_data;
adcData_t *adc_data_ptr = &adc_data;
unsigned int NumberOfChars, value;
sciInit();
adcInit();
while(1)
{
adcStartConversion(adcREG1,adcGROUP1);
while(!adcIsConversionComplete(adcREG1,adcGROUP1))
adcGetData(adcREG1, adcGROUP1, adc_data_ptr);
value = (unsigned int)adc_data_ptr->value;
NumberOfChars = 1toa(value,(char *)command);
sciSend(scilinREG, 2, (unsigned char*)"0x");
sciSend(scilinREG, NumberOfChars, command);
sciSend(scilinREG, 2, (unsigned char *)"\r\n");
}
/* USER CODE END */
}
/* USER CODE BEGIN (4) */
void adcNotification(adcBASE_t *adc, unsigned group)
{
return;
}
void sciNotification(sciBASE_t *sci, unsigned flags)
{
return;
}
void esmGroup1Notification(int bit)
{
return;
}
void esmGroup2Notification(int bit)
{
return;
}
/* USER CODE END */