SPBTLE-1S internal ADC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-02-17 4:33 AM
I'm using this device. with "BlueNRG-1_2 DK 3.1.0"
I have a problem with reading ADC.
use two channels pin1, pin2 (ADC1, ADC2), connected to two potentiometers (analog joystick)
I can read only one channel, how can I read the two channels?
In this code the value of adc is not correct, why?
//------------Configure ADC
SysCtrl_PeripheralClockCmd(CLOCK_PERIPH_ADC, ENABLE);
xADC_InitType.ADC_OSR = ADC_OSR_200;
xADC_InitType.ADC_Input = ADC_Input_AdcPin2 | ADC_Input_AdcPin1;
xADC_InitType.ADC_ConversionMode = ADC_ConversionMode_Single;
xADC_InitType.ADC_ReferenceVoltage = ADC_ReferenceVoltage_0V0; xADC_InitType.ADC_Attenuation = ADC_Attenuation_6dB02;
ADC_Init(&xADC_InitType);
ADC_SelectInput(ADC_Input_AdcPin2);
ADC_Cmd(ENABLE);
//------------------READ
if(ADC_GetFlagStatus(ADC_FLAG_EOC)) {
if(channelselect==0){
channelselect=1;
raw_value2 = (int16_t)ADC_GetRawData();
ADC_SelectInput(ADC_Input_AdcPin1);
}else{
channelselect=0;
raw_value1 = (int16_t)ADC_GetRawData();
ADC_SelectInput(ADC_Input_AdcPin2);
}
ADC_Cmd(ENABLE);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-13 12:44 PM
I have the same issue. Did you found something ?
Could someone help please ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-06 4:54 AM
Hello !
I have exactly the same problem !
Did you find a solution please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-06 4:56 AM
Hello,
The issue was that my system clock was configured to 32Mhz and the ADC is not working fine at 32Mhz (see errata sheet).
You should reconfigure the system clock to 16Mhz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-06 5:02 AM
Thank you !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-16 1:40 AM
Hello Stabilo,
My ADC is working properly, but BLE disconects every 15 secondes.
The BLE disconnects every 15 seconds. I lower the frequency during my ADC routine and increase it just after. This causes a malfunction on my bluetooth communication. Do you have any advice?
bests regards,
