Atmel QTouch Library User Guide
Atmel QTouch Library User Guide Atmel QTouch Library User Guide
ApplicablereleaseQTouch libraries ver 4.4Rule No Rule Description Exceptions Reason1.1 Rule states that all codeshall conform to ISO 9899standard C, with noextensions permitted.10.1 Rule states that Illegalimplicit conversion fromUnderlying long to unsignedlong10.6 This Rule says that a 'U'suffix shall be applied to allconstants of 'unsigned' typeThis Rule is not supported as the libraryimplementation requires IAR extensions like__interrupt. These intrinsic functions relates todevice hardware functionality, and cannotpractically be avoidedThe library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.19.10Rule states that In thedefinition of a function-likemacro, each instance of aparameter shall be enclosedin parenthesisThere is one instance where the library breaks thisrule where two macro definitions are combined toform a different symbol name. Usage ofparenthesis cannot be used in this scenario.19.12 Rule states that there shallbe at most one occurrenceof the # or ## preprocessoroperator in a single macrodefinitionThere is one instance in the library where this ruleis violated where the library concatenates twomacro definitions to arrive at a different definition.Known IssuesIssue Cause Remedy / workaroundQMatrix Touch Sensing on XMEGA AVRsThe Pins PE6,PE7 and PF5 ofATxmegaA3 devices do not work fortouch sensing when tested along with STK600GCC compiler Optimization issue withQMatrix Libraries on ATtiny167In case of QMatrix GCC library for ATtiny167,few channels produces low signal and referencevalue compared to other channels, when testedwith STK600.GCC Compiler Issue for ATmega128RFA1deviceThe Latest GCC WinAVR-20090313 is havingproblems with ATmega128RFA1 device. Itplaces the .data section to the memory location0x800100 instead of 0x800200.Suggested to use combinations withother portsSuggested to use the defaultOptimization level of –O0 forATtiny167 in case of GCC.In the linker options for the GCCproject of ATmega128RFA1 device ,the following options have to beadded:-Wl,--sectionstart=.data=0x8002001128207K-AT42-09/11
The GCC example projects for QMatrix does notcompile the delay cycles(QT_DELAY_CYCLES) above a value of 5because of the preprocessor expansions.Compiling QT600 project files throwsunused variable warning.When using IAR workbench for ATSAM tointegrate the touch libraries, the linkerwould generate a warning indicating:Warning[Lp005]: placement includes a mixof sections with content (example "ro datasection .data_init in xfiles.o(dl7M_tl_if.a)")and sections without content (example "rwdata section .data in xfiles.o(dl7M_tl_if.a)")This is becausewe link thelibrary in RWdata section.Recommended to remove UL fromthe preprocessor constants and inthe chain of macros used forQT_DELAY_CYCLES. Valid forQT_DELAY_CYCLES = 5,10,25,50.These variables are available inthe debug protocol for future use.Warning[Lp006]: placement includes a mixof writable sections (example "rw datasection .data in xfiles.o(dl7M_tl_if.a)") andnon-writable sections (example "ro datasection .data_init in xfiles.o(dl7M_tl_if.a)")ChecklistThis section lists troubleshooting tips and common configuration tips.Symptom Cause ActionSensors do not go into detect orhave unknown resultsMultiplexing pinsused by QTouchlibraries in yourdesignCheck the Pins used for QTouch orQMatrix acquisition methods do notoverlap with the applications usageof the portsSignal values report arbitraryvaluesWaveforms of charging /discharging of channels do notshow up properly in oscilloscopesWhen using the exampleapplications, the debug values forsome of the channels does notdisplay appropriate valuesStray capacitanceJTAG ICE connectedto the boardJTAG Pins areenabled in the target.Check the sensor design andminimize stray capacitanceinterference in your designTry disconnecting the JTAG ICEcompletely from the kitJTAG Pins are explicitly needs tobe disabled in the main.c file/* disable JTAG pins */MCUCR |= (1u
- Page 62 and 63: 2. The above definitions should be
- Page 64 and 65: NUM_Y_LINES_ROTOR_SLIDER_QT_MAX_NUM
- Page 66 and 67: has Four Comparators (AC0A , AC1A ,
- Page 68 and 69: Note: When using the IAR IDE / comp
- Page 70 and 71: Figure 5-11: Selecting the right co
- Page 72 and 73: SNS1 - SNSK1 & SNS2 -SNSK2QT_NUM_CH
- Page 74 and 75: Selecting the right configurationTh
- Page 76 and 77: Figure 5-20 : Specifying QMatrix ac
- Page 78 and 79: Debug Support in Example applicatio
- Page 80 and 81: Support for different compiler tool
- Page 82 and 83: Maximum number of rotor / sliders s
- Page 84 and 85: Tips on pin assignments for the sen
- Page 86 and 87: ATtiny88)v1g1s2(ATtiny461,ATmega16a
- Page 88 and 89: X0,X1,X2,X3 are on PB0,PB1,PB2,PB3N
- Page 90 and 91: 1. The channel numbers are allocate
- Page 92 and 93: SNSK_array[1][1]=0x00; (SNSK odd ma
- Page 94 and 95: SNSK_array[1][0]=0x14; (SNSK even m
- Page 96 and 97: Figure 5-28: New Design Sensors in
- Page 98 and 99: Figure 5-31: Selecting the MCU for
- Page 100 and 101: Figure 5-34: Selecting the SNS and
- Page 102 and 103: 2. QTOUCH_STUDIO_MASKS needs to be
- Page 104 and 105: Figure 5-38: Selecting New Design3.
- Page 106 and 107: Figure 5-42: Start window of the co
- Page 108 and 109: Figure 5-45: Selecting the X,YA,YB,
- Page 110 and 111: The code can be copied using the
- Page 114 and 115: Device Specific LibrariesIntroducti
- Page 116 and 117: Table 8 Compiler tool chains suppor
- Page 118 and 119: maintains the States of QMatrix, QT
- Page 120 and 121: equired as shown in the case A of F
- Page 122 and 123: Figure 37 QMatrix method schematicQ
- Page 124 and 125: Figure 39 QMatrix API Flow diagram
- Page 126 and 127: CAT Module Pin NameCSA0CSB0CSA1CSB1
- Page 128 and 129: The QTouch method acquisition using
- Page 130 and 131: Host Application codeUsing the init
- Page 132 and 133: Frozen Stop Stop Run Run Run Run On
- Page 134 and 135: Figure 45 Raw acquisition mode API
- Page 136 and 137: Figure 46 GNU Example project usage
- Page 138 and 139: the QTouch Library as QMatrix data
- Page 140 and 141: TOUCH_STATUS_CHANGE 0x0002u Status
- Page 142 and 143: sensor_type_tEnumerationUsesensor_t
- Page 144 and 145: OUT_OF_TOUCHIN_TOUCHCurrently the a
- Page 146 and 147: num_channel_signals uint8_t Length
- Page 148 and 149: touch_at_statusstructureInput / Out
- Page 150 and 151: UseData structure which holds the R
- Page 152 and 153: variable to the Touch library. The
- Page 154 and 155: structure.p_qta_config touch_qt_con
- Page 156 and 157: p_touch_sensor_param touch_qm_param
- Page 158 and 159: current_time_ms touch_time_t Curren
- Page 160 and 161: touch_ret_t touch_qt_sensor_config(
Applicablerelease<strong>QTouch</strong> libraries ver 4.4Rule No Rule Description Exceptions Reason1.1 Rule states that all codeshall conform to ISO 9899standard C, with noextensions permitted.10.1 Rule states that Illegalimplicit conversion fromUnderlying long to unsignedlong10.6 This Rule says that a 'U'suffix shall be applied to allconstants of 'unsigned' typeThis Rule is not supported as the libraryimplementation requires IAR extensions like__interrupt. These intrinsic functions relates todevice hardware functionality, and cannotpractically be avoidedThe library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.The library uses macros to combine symboldefinitions to form a unique expanded symbolname and in this, the usage of unsigned qualifiersfor numeric constants (e.g. 98u) causes namemangling. This is the only occurrence of this errorin the library.19.10Rule states that In thedefinition of a function-likemacro, each instance of aparameter shall be enclosedin parenthesisThere is one instance where the library breaks thisrule where two macro definitions are combined toform a different symbol name. Usage ofparenthesis cannot be used in this scenario.19.12 Rule states that there shallbe at most one occurrenceof the # or ## preprocessoroperator in a single macrodefinitionThere is one instance in the library where this ruleis violated where the library concatenates twomacro definitions to arrive at a different definition.Known IssuesIssue Cause Remedy / workaroundQMatrix Touch Sensing on XMEGA AVRsThe Pins PE6,PE7 and PF5 ofATxmegaA3 devices do not work fortouch sensing when tested along with STK600GCC compiler Optimization issue withQMatrix Libraries on ATtiny167In case of QMatrix GCC library for ATtiny167,few channels produces low signal and referencevalue compared to other channels, when testedwith STK600.GCC Compiler Issue for ATmega128RFA1deviceThe Latest GCC WinAVR-20090313 is havingproblems with ATmega128RFA1 device. Itplaces the .data section to the memory location0x800100 instead of 0x800200.Suggested to use combinations withother portsSuggested to use the defaultOptimization level of –O0 forATtiny167 in case of GCC.In the linker options for the GCCproject of ATmega128RFA1 device ,the following options have to beadded:-Wl,--sectionstart=.data=0x8002001128207K-AT42-09/11