This example is based on the STM32f072B ST low level API. The peripheral initialization uses LL unitary service functions for optimization purposes (performance and size). In this repository, you will find an example in periharels/modules below
- st-ll-1
- I2C, TIM, GPIO(DHT11), UART examples.
- st-ll-2
- PWM, GPIO-EXTI, I2C examples.
- st-ll-3
- UART-HALF-DUPLEX example
- Periharels
-
✓ 1- I2C (SSD1306 Screen)
-
✓ 2- TIM (To obtain 1us timer)
- The timebase frequency is calculated as follows:
- timebase frequency = TIM6 counter clock /((PSC + 1)(ARR + 1)(RCR + 1))
- timebase frequency = 48 000 000 / ( (47 + 1) * (65535 + 1) (0 + 1) )
- timebase frequency = 15.258 = ~15 hz
-
✓ 3- GPIO (To write and read gpio pin value for DHT11)
- Using Single pin (PB2) in two different mode (Input- Output)
-
- Modules
- ✓ SSD1306 Screen 128x32
- PB10 -> SCLK
- PB11 -> SDA
- PB10 -> SCLK
- ✓ DHT11 Temperature and humidity sensor
- PB2 -> DHT11 In
- ✓ SSD1306 Screen 128x32
This example is one-board UART half-duplex(single-wire) communication using ST LL and HAL API on stm32f072-disco
- PC4 - UART3
- PA9 - UART1
- 38400 B