Skip to content

Bianca-ME/C-project-0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C project 0 (ongoing)

My first C project for an STM32F407 DISCOVERY board with a 32-bit Arm Cortex-M4 processor. Main functionality: turning on a LED.

Overview

The focus is on the file main.c which contains the practice I did during an embedded systems course for complete beginners (in C). The commits are thought as stages of the progress, so with each commit there is a small improvement or change of how the board works.

Stages of the project

  1. Hard-coded memory addresses and manipulating registers using bitwise operations and masks (no bit shifting). link to commit

    Registers used:

    • RCC_AHB1ENR for clock enable
    • GPIOx_MODER for mode
    • GPIOx_ODR for data output
  2. Implementation of bit shifting. link to commit

  3. Implementation of loop and delays to toggle LED. link to commit

  4. LED toggle based on input reading. The input read checks if there is current or not. link to commit

    Register added:

    • GPIOx_IDR for input

IDE used:

STM32CubeIDE

About

My first C project for an STM32F407 DISCOVERY board.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors