19
Timers Analog Peripherals HAL Shield ARM Microcontroller Course May 20, 2015 ARM Microcontroller Course

ARM Microcontroller Course - Universiteit Twente · ARM Microcontroller Course. Timers Analog Peripherals HAL Shield Table of Contents 1 Timers 2 Analog Peripherals 3 HAL 4 Shield

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

TimersAnalog Peripherals

HALShield

ARM Microcontroller Course

May 20, 2015

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Table of Contents

1 Timers

2 Analog Peripherals

3 HAL

4 Shield

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Timers

Timers can be used for:

Counting

PWM

Keeping time

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Timers

Timers can be used for:

Counting

PWM

Keeping time

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Timers

Timers can be used for:

Counting

PWM

Keeping time

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Timer internals

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Timer function

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Table of Contents

1 Timers

2 Analog Peripherals

3 HAL

4 Shield

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Analog Peripherals

ADC

Comparator

Opamp

Temperature Sensor

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

ADC internals

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

To use ADC:

Turn on clock for ADC

Turn on clock for GPIO of potentiometer pin

Initialize the ADC

Configure potentiometer pin

Optional: turn on NVIC for ADC

Turn on ADC

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Table of Contents

1 Timers

2 Analog Peripherals

3 HAL

4 Shield

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

HALHardware Abstraction Layer

API for peripherals

Handles: PPP HandleTypeDef

Shared and system peripherals: GPIO, SYSTICK, NVIC,PWR, RCC and FLASH

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

HALHardware Abstraction Layer

API for peripherals

Handles: PPP HandleTypeDef

Shared and system peripherals: GPIO, SYSTICK, NVIC,PWR, RCC and FLASH

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

HALHardware Abstraction Layer

API for peripherals

Handles: PPP HandleTypeDef

Shared and system peripherals: GPIO, SYSTICK, NVIC,PWR, RCC and FLASH

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

HAL Examples

HAL_StatusTypeDef HAL_GPIO_Init (GPIO_TypeDef* GPIOx ,

GPIO_InitTypeDef *Init)

{

// GPIO initialization

}

// example of handle

UART_HandleTypeDef uarthandle;

uarthandle.Instance = UART1;

HAL_UART_Init (& uarthandle);

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Table of Contents

1 Timers

2 Analog Peripherals

3 HAL

4 Shield

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Shield

Potentiometer

DAC over SPI

3 Buttons

3 LEDs

4 Captouch buttons

Jack and BNC

ARM Microcontroller Course

TimersAnalog Peripherals

HALShield

Material

You can find all material onhttp://www.scintilla.utwente.nl/docs/cursus

Make sure you download:

The Updated Manual (0520)

The Usermanual of the Nucleo-F411RE

The Reference Manual of the STM32F411RE

Optional:

HAL document

Programming Guide

ARM Microcontroller Course