cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072B-DISCO Example code from manual results error (chapter 7.3.6) with with the "extern TSL_LinRot_T MyLinRots[];

LEtte.1
Associate

I'm using the STM32F072B-DISCO, trying to implement an example code for the touch sensing and followed the instructions of the "Getting Started with touch sensing Control on STM32 MCU". The code given in chapter 7.3.6 results in errors. see below


_legacyfs_online_stmicro_images_0693W00000biNz3QAE.pngone other error I already removed, was one bracket too much at the end of the example code.

The given example code should be added between the User Code Begin 3 & End which in the main loop.

Shouldn't be the extern TSL_LinRot_T MyLinRots[]; outside of the loop? According to the manual, I only have to copy and insert this code and it should work without any edits.

edit: 

added the main.c code

link to manual : https://www.st.com/content/ccc/resource/technical/document/application_note/group0/ed/0d/4d/87/04/1d/45/e5/DM00445657/files/DM00445657.pdf/jcr:content/translations/en.DM00445657.pdf

PS: I do not have a lot of programming experience

1 REPLY 1
OlivierR
ST Employee

Hello,

In tsl_user.h file, MyLinRots is define in this way:

extern CONST TSL_LinRot_T MyLinRots[];

So to solved your issue, replace:

extern TSL_LinRot_T MyLinRots[];

by

extern CONST TSL_LinRot_T MyLinRots[];

It should be ok.

Regards.