MCU: различия между версиями
Материал из fidoman.ru
Sergey (обсуждение | вклад) (→STM8) |
Sergey (обсуждение | вклад) (→UART) |
||
Строка 31: | Строка 31: | ||
== UART == | == UART == | ||
− | word length: UART_CR1.M | + | - word length: UART_CR1.M |
− | stop bits: UART_CR3 | + | - stop bits: UART_CR3 |
− | baud rate: UART_BRR2 then UART_BRR1 | + | - baud rate: UART_BRR2 then UART_BRR1 |
− | en transmitter: UART_CR2.TEN | + | - en transmitter: UART_CR2.TEN |
− | send data: UART_DR and wait until TC goes 1 | + | - send data: UART_DR and wait until TC goes 1 |
+ | |||
+ | TXE: set at end of transmission (and if TIEN then int is generated) |
Версия 14:50, 4 ноября 2021
cam
ESP32-CAM OV2460
links
Lightweight C compilers http://fun4diy.com/
STM8
compilers comparation http://www.colecovision.eu/stm8/compilers.shtml
startup
- Power requirements: 3.3-5V
- Reset circuit (100nF cap)
- Select clock source (ext.crystal/HSI)
- Choose halt modes for
- flash
- HSI, HSE
- use timer or AWU for wake-up if no ext.ints
- calibrate LSI osc.
- configure GPIO
- use watchdog
AWU
- on int disable AWU (or new int will be generated instantly)
- before re-enable re-load counter
UART
- word length: UART_CR1.M - stop bits: UART_CR3 - baud rate: UART_BRR2 then UART_BRR1 - en transmitter: UART_CR2.TEN - send data: UART_DR and wait until TC goes 1
TXE: set at end of transmission (and if TIEN then int is generated)