vanDeventer / as2

This repository is made up of different branches that reflect the use of different peripherals on a STM32L476RG microcontroller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning about Microcontrollers in Automotive Systems (E0009E)

This repository is made up of different branches that reflect the use of different peripherals on a STM32L476RG microcontroller

You can find additional material and information at:

Branch order

To make the most of this repository, the student might want to study each branch (mostly main.c) in the following order:

  • GPIO
    • blinky, which flash an LED
    • dualBlinky. which flashes two LEDs out of synch
    • blueBotton, which uses the blue button to turn on the onboard green LED
    • blockingLED, where a flashing LED blocks the turning on or off of a second LED
    • nonblockingLED, or the use of External Interrupts for real time response
  • UART
    • helloWorld, which displays Automotive Systems 2 on the hosting computer with Putty
    • blockingEcho, which waits and returns what is sent (or typed)
    • nonBlockingEcho, which uses an Internal Interrupt to inform that a new character has been received on UART
    • buttonMemu, which simulates the gear selection of an automatic car using a button.
    • keyMenu lets you select the desired gear by typing it on the keyboard and pressing "Enter"
  • ADC
    • adc transform the analog signal from A0 to a 12 bit number
  • I2C
    • tmp102 reads the temperature of a TMP102 sensor over the I2C bus
    • imuI2cXaccel obtains the accelerometer value from an IMU in the X direction
    • i2Cslave
    • i2cLcd displays "Automotive Systems 2" on the qwiic 128x32 OLED display
  • SPI
    • imuSpiXaccel obtains the accelerometer value from an IMU in the X direction
    • SPIslave
  • Timer/Counters
    • breathingLED the green LED gets brighter and dimmer cyclicly
    • pwmServo controls the position of an RC steering servo
    • inputCapture measures the time between events (rising edges)
    • rpm555
  • RTC
    • rtc demonstrate the use of the chip's real time clock
  • CAN
    • CANloopback teaches how to transmit frames and filter incoming messages
    • CANvel display in a terminal window the vehicle speed (over the diagnostic port)
  • Error handling
  • Real Time Operating System (RTOS)
    • rtos has two threads that toggle the board's LED at different rates

About

This repository is made up of different branches that reflect the use of different peripherals on a STM32L476RG microcontroller


Languages

Language:C 99.6%Language:Assembly 0.2%Language:Makefile 0.2%Language:C++ 0.0%