Page 1 of 1

ADCTouchSensorSTM library not work for STM32F103RC board

Posted: Thu Jul 16, 2020 8:19 am
by ChoCho
Dear All,

My project use the ADCTouchSensorSTM library (https://github.com/arpruss/ADCTouchSensor) with a STM32F103C8T6 board, it works with no problem.

But when I upgrade my project to a STM32F103RCT6 board, there is error for the ADCTouchSensorSTM library during compilation :
--------------------------------------------------------------
J:\Arduino_Project\libraries\ADCTouchSensor-master\src\ADCTouchSensor.cpp: In member function 'int ADCTouchSensor::readRaw(unsigned int)':

J:\Arduino_Project\libraries\ADCTouchSensor-master\src\ADCTouchSensor.cpp:79:20: error: 'ground' was not declared in this scope

ground();
-------------------------------------------------------------

After some Google search, I found that :

"On the STM32F103C, it uses the fact that ADC channel 15 appears to be always grounded (it doesn't connect to a pin), and so it doesn't require any extra pin. On other devices, you need to specify a sacrificial analog pin which is grounded, and which shouldn't be connected to anything. "

So it seems that for the STM32F103RCT6 board, I have to add some codes to "specify a sacrificial analog pin which is grounded" in my sketch.

Does anyone knows how to do it ? Please help !!!

Re: ADCTouchSensorSTM library not work for STM32F103RC board

Posted: Thu Jul 16, 2020 1:54 pm
by stevestrong
You should report the issue on the github page of the library designer.