ADCTouchSensorSTM library not work for STM32F103RC board

Post here all questions related to LibMaple core if you can't find a relevant section!
Post Reply
ChoCho
Posts: 8
Joined: Mon Feb 17, 2020 2:01 am

ADCTouchSensorSTM library not work for STM32F103RC board

Post 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 !!!
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: ADCTouchSensorSTM library not work for STM32F103RC board

Post by stevestrong »

You should report the issue on the github page of the library designer.
Post Reply

Return to “General discussion”