Tool/software: TI-RTOS
Hi,
1. I am using node and concentrator code, with a temperature sensor connected to the node side. The temperature resolution is 0.1C.
The setup is as follows:
The node senses the temperature and sends it to the concentrator side. We are using concentrator code in two different ways, one which sends acknowledgement and one which doesn't.
When the concentrator side which isn't sending acknowledgement is connected to the node side the temperature values are accurate. But when the node connects to concentrator side which sends acknowledgement the temperature value jumps by 0.2C which is not acceptable for our application.
We have been trying to figure out why this would be the case, any suggestion/help would be appreciated.
2. The other thing we were trying to figure out is related to SCS:
We are using SCS on the node side, the code is as given below,
adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P73_MS, ADC_TRIGGER_MANUAL);
S16 adcvalue = 0;
if (state.samplesSinceLastReport == 0) {
output.thermadcValue[0]=0;
output.thermadcValue[1]=0;
output.thermadcValue[2]=0;
output.thermadcValue[3]=0;
}
// Sample the thermistors sensor
for (U16 n = 0; n < 4; n++) {
adcvalue = 0;
// Select ADC input
adcSelectGpioInput(cfg.pAuxioAThermistor[n]);
adcGenManualTrigger();
adcReadFifo(adcvalue);
output.thermadcValue[n] = adcvalue + output.thermadcValue[n];
}
// Disable the ADC
adcDisable();
state.samplesSinceLastReport = state.samplesSinceLastReport + 1;
if (state.samplesSinceLastReport == 10) {
fwGenAlertInterrupt();
state.samplesSinceLastReport = 0;
}
// Schedule the next execution
fwScheduleTask(1);
The code in the nodeTaskFunction is:
SceAdc_init(0x00001000, 0x000);
SceAdc_registerAdcCallback(adcCallback);
SceAdc_start();
We are trying to figure out how adcEnableSync and SceAdc_init affect the samples being transmitted and does this affect the accuracy of the system.
Thank you.