Hi dear support team,
We are in the process of porting our application from Apalis T30 under WinCE8 to the Apalis i.MX6. This should be an intermediate step in order to be able to give our customers longer support.
Here I noticed that reading the ADC with the WinCE Library V2.5 does not seem to work on the IMX6Q 1GB. I only get 0 values back. However, the function Adc_Read returns a 4. I also additionally executed the Adc_SetConfigInt(hPort, L"SavePower", 0, StoreVolatile) function.
i.MX6Q 1GB V1.1A (1.1D is ordered)
Ixora V1.2A
WinCE8 Image 1.8
HANDLE hADC1 = Adc_Init(L"ADC1");
double Value = 0.0;
if (hADC1 != NULL) {
if (Adc_Open(hADC1) {
BOOL config01 = Adc_SetConfigInt(hADC1, L"BitResolution", 12, StoreVolatile);
BOOL config05 = Adc_SetConfigInt(hADC1, L"AvgSamples", 10, StoreVolatile);
BOOL configxx = Adc_SetConfigInt(hADC1, L"SavePower", 0, StoreVolatile);
if (config01 && config05 && configxx) {
DWORD ReadValue1 = 0;
DWORD RetVal = Adc_Read(hADC1, &ReadValue1, 4);
if (RetVal > 0)
Value = double(ReadValue1) / 1000000.0;
}
}
}