In this repository I will upload a few demo examples of how to code STM32 MCU without using HAL. We will use only the peripheral driver provided by STMicroelectronics but in the first example we have showed how to write one by yourself using technical documentation.
- STM32F103C8T6 - ARM®Cortex®-M3 32-bit RISC core based MCU. Used only in the first demo of writing peripheral drivers.
- STM32F722ZET6 - ARM® Cortex®-M7 32-bit RISC core based MCU. Used in all demos apart from the frist one. We will use it in NUCLEO-DEVELOPMENT Board.
This repository was created only for educational purposes. At the end of the course I will consider doing a real-life example of Embedded Device and uploading it's code here. Our goal is to write Bare Metal Code using C and the technical documentation provided by STMicroelectronics. We will not use the provided HAL but we will use the provided peripheral driver for registers of the device.
- LED Toggle - Writing own Peripheral Driver - In this project we have written a code for toggling built-in LED. We created structs that represents GPIO and RCC registers structure.
- GPIO Output - In this project we are setting GPIO ports and pins as output pins using the provided GPIO struct from STM32CubeF7 Development package.
- GPIO Input and Output - In this project we are using GPIO ports and pins as input and output. We are doing a simple toggle LED with a button.
- USART-RX-TX - In this project we are configuring USART-RX-TX data transmission. Our device will work as a receiver and transmitter and will send data to a terminal inside our computer using Serial/TCP Terminal. We will also toggle the built-in LED using commands from the computer terminal.
- ADC - In this project we are configuring ADC Module. This allows us to read analog values from sensors measuring surrounding world parameters - Temperature, Pressure, Humidity, etc. We are configuring single channel in Single Conversion and Continious Conversion Mode. You can also add Multiple Channels easily to the written code.
- SysTick Timer - In this project we are using the Cortex-Mx built-in System Tick Timer. We are showing how to create a simple but very useful delay function.
- Timers - In this project we are developing driver for using Timer module in different modes - General-Purpose Mode, Input Capture Mode and Output Compare Mode. We show their usage for measuring time and creating interrupts, for toggling output and for measuring the frequency of input signal.
- Interrupts - In this project we are enabling interrupt programming model for different peripheral drivers we have already written. We are enabling EXTI handlers for GPIOs, UART, ADC, SysTick and TIM interrupts.
- DMA - In this project we are enabling DMA data transfer from the internal memory to the USART3 peripheral. We are using USART-TX in order to send data using our USB connection but this time we have enabled DMA for the transfer in order to speed-up the process.
- I2C - In this project we are developing driver for I2C module. We are configuring the connection to a slave and writing methods for burst read and burst write, according to the reference manual.
- SPI - In this project we are developing driver for SPI module. We are configuring the SPI module for full-duplex connection with hardware slave management. We are implementing methods for transmitting and receiving n bits of data.