https://github.com/nielsouvrard/mcu_32
STM32 quick start
https://github.com/nielsouvrard/mcu_32
Last synced: 11 days ago
JSON representation
STM32 quick start
- Host: GitHub
- URL: https://github.com/nielsouvrard/mcu_32
- Owner: NielsOuvrard
- Created: 2025-01-31T00:21:33.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-12T19:27:38.000Z (2 months ago)
- Last Synced: 2025-03-31T06:16:13.411Z (about 2 months ago)
- Language: C
- Homepage:
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# STM32 quick start
This is a quick start to discover the STM32 microcontroller family.
It is based on the STM32CubeIDE, a free IDE from STMicroelectronics.We use a STM32F103C8T6, a 32-bit ARM Cortex-M3 microcontroller.
- STMicroelectronics
- ARM Cortex-M3 32-bit architecture
- Low-power processor
- Speed up to 72MHz
- Low cost
- Flash memory: 64 Kbytes
- SRAM memory: 20 Kbytes
- Wide range of peripheralsPeripherals:
- GPIO
- ADC
- SPI
- I2C
- CAN
- UART
- Timer
- USB
- DMAThe principals types of instructions available in the Cortex-M3:
- Moving data: Taking data from one place in memory and storing it in another.
Example: 'MOV R0, R1' moves the contents of register R1 into register R0.- Performing arithmetic: Adding, subtracting, multiplying, or dividing numbers.
Example: 'ADD R0, R1, R2' adds the contents of registers R1 and R2 and stores the result in register R0.- Making decisions: Comparing values to see if one is greater than the other, and then changing the flow of the program based on that comparison.
Example: 'CMP R0, R1' compares the contents of registers R0 and R1.So, the Cortex-M3 has numerous instructions that can be used to perform a wide variety of tasks.
Most of them aren't used directly by the programmer, but are generated by the compiler when you write code in a high-level language like C.
It's important to understand the basics of the assembly language to understand how the processor works and how to write efficient code.