cancel
Showing results for 
Search instead for 
Did you mean: 

stm32F051 Touch TSC with cubeMX

uli
Associate II
Posted on November 20, 2014 at 10:33

Hello,

i try to develop a touch interface with the stm32f051 and want to use the stm32CubeMX Software. I want to do it with an interrupt and have the generated code in my IAR. My question is, where i can found a tutorial/dokumentation how to implement a scan which touchbutton is pressed. I found a lot for TSL (Library) but not for TSC which use the library but use other functions/names. I think the treshhold voltage is initializise in the init-function so i have in the interrupt only to check if a IO is high or low. I have the code for the Touch sensing interrupt:

void TSC_IRQHandler(void){
}

I've found this post:

/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Touch%20Sensing%20on%20STM32F0&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=1340

The point is, i don`t know the syntax i need to scan my input like:

if (button_1){ ..}

PA0 and TSC_G1_IO1 aren't known in my project but stands as comments in the TSC.c. Can anyone give me a tip or a link? #touch-tsc-f0
4 REPLIES 4
Posted on November 21, 2014 at 10:55

I don't understand your problem, but if it is Cube-related, you should post it in the dedicated ''Software tools'' sub-forum.

https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx

JW
uli
Associate II
Posted on November 21, 2014 at 13:15

Hy,

My problem is the C-code for the µC.

i have 12 touch buttons and i want to differentiate which button is pressed.

It is a very simple problem but i don't know how it's work and didn't find the explanation. Maybe the problem is to simple for an document...

Can i use something like

if(GPIOA->IDR & (1<<PinNr))

?

I haven't the PCB yet and have to predevelop the software so i can't test it.

I searched in sources like touch library, stm32f051 datasheet, stm touch driver

I'm starting to feel like an idiot...

uli
Associate II
Posted on November 21, 2014 at 13:30

Ok, i've found the

STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs

I think that is what i needed...

STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs

STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs

STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs STMicroelectronics: Reference Manual of STM32F05xxx advanced ARM-based 32-bit MCUs

Ricky S
Associate II
Posted on September 22, 2017 at 09:00

my problem too