Can I program or flash a microcontroller using UART? I previously thought UART is only for communication purposes.
closed as too broad by Chris Stratton, Dmitry Grigoryev, Lior Bilia, laptop2d, diverger Aug 24 '18 at 0:52
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
A few micro's have a uart bootloader rom from the factory. mid range STM8's for example.
Others can have a bootloader programmed into flash. Arduinos come with Optiboot put into the flash by the pcb assembler (not Atmel).
To have a bootloader requires in-system self-programmability. It helps if it can execute code from ram, but this is not needed (PIC). Some micros (e.g AVR) have code protect arrangements specifically to protect a bootloader area of flash.
It might be useful for people to note micros that have a factory bootloader in the comments below as it is a useful feature manufacturers sometimes hide on page 570
Many microcontrollers can be programmed over UART, provided that the microcontroller in question has a suitable bootloader. Google "uart bootloader" and you'll see many examples.