Contents RM0367
38/1043 RM0367 Rev 7
A.5.2 Alternate function selection sequence code example. . . . . . . . . . . . . . 984
A.5.3 Analog GPIO configuration code example . . . . . . . . . . . . . . . . . . . . . . 984
A.6 DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
A.6.1 DMA Channel Configuration sequence code example . . . . . . . . . . . . . 985
A.7 Interrupts and event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
A.7.1 NVIC initialization example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
A.7.2 Extended interrupt selection code example . . . . . . . . . . . . . . . . . . . . . 985
A.8 ADC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
A.8.1 Calibration code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
A.8.2 ADC enable sequence code example . . . . . . . . . . . . . . . . . . . . . . . . . 986
A.8.3 ADC disable sequence code example . . . . . . . . . . . . . . . . . . . . . . . . . 987
A.8.4 ADC clock selection code example . . . . . . . . . . . . . . . . . . . . . . . . . . . 987
A.8.5 Single conversion sequence code example - Software trigger. . . . . . . 987
A.8.6 Continuous conversion sequence code example - Software trigger. . . 988
A.8.7 Single conversion sequence code example - Hardware trigger . . . . . . 988
A.8.8 Continuous conversion sequence code example - Hardware trigger . . 989
A.8.9 DMA one shot mode sequence code example . . . . . . . . . . . . . . . . . . . 989
A.8.10 DMA circular mode sequence code example . . . . . . . . . . . . . . . . . . . . 990
A.8.11 Wait mode sequence code example. . . . . . . . . . . . . . . . . . . . . . . . . . . 990
A.8.12 Auto off and no wait mode sequence code example . . . . . . . . . . . . . . 990
A.8.13 Auto off and wait mode sequence code example . . . . . . . . . . . . . . . . . 991
A.8.14 Analog watchdog code example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
A.8.15 Oversampling code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 992
A.8.16 Temperature configuration code example. . . . . . . . . . . . . . . . . . . . . . . 992
A.8.17 Temperature computation code example . . . . . . . . . . . . . . . . . . . . . . . 992
A.9 DAC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
A.9.1 Independent trigger without wave generation code example . . . . . . . . 993
A.9.2 Independent trigger with single triangle generation code example. . . . 993
A.9.3 DMA initialization code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
A.10 TSC code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
A.10.1 TSC configuration code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 994
A.10.2 TSC interrupt code example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
A.11 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
A.11.1 Upcounter on TI2 rising edge code example . . . . . . . . . . . . . . . . . . . . 995
A.11.2 Up counter on each 2 ETR rising edges code example . . . . . . . . . . . . 995
A.11.3 Input capture configuration code example . . . . . . . . . . . . . . . . . . . . . . 996