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:
- STM32 MCU Wiki
- Online Training
- STM32 Cube IDE Introduction Wiki
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"
- helloWorld, which displays
- 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