I attached a "boilerplate" project with a blinky led and serial port example.
The serial port uses dma for rx, interrupts for tx.
For some unknown reason, the forum board does not accept tar.gz files so I renamed it to tar.zip.
After downloading the file, rename it back to tar.gz before trying to extract.
This example is made for the STM NUCLEO-L452RE evaluation board (Digikey: 497-17008-ND).
It comes with an STlink programmer on a break-out board connected to the dev board.
It costs only $15 so I strongly recommend to buy it and make sure this boilerplate works before
you start to modify it for your particular project and MCU.
You need the compiler toolchain which comes with the installation of the free System Workbench,
you can download it here (registration required):
https://www.openstm32.orgAfter installation of System Workbench, install the latest updates: in Eclips go to Help -> Check for Updates
Check if the following rules have been added to your /etc/udev/rules.d/ directory: (they are needed for the STlink programmer)
49-stlinkv1.rules
49-stlinkv2-1.rules
49-stlinkv2.rules
49-stlinkv3.rules
Restart your pc to make sure they are active.
Edit the files environment.txt and programmer/program_target.sh and adapt the path so that they point to the correct location.
(replace all instances of "<put your path here>") (it depends on where you have installed System Workbench)
Now you can start!
Usage:
open a terminal and cd to the boilerplate directory
source environment.txt (to add the toolchain bin directory to the PATH variable)
make
./programmer/program_target.sh
now the green led of the devboard will blink
use "make clean" to remove all files generated by the make command
You will need the following documentation:
datasheet: STM32l452RE.pdf
errata: ES0388 STM32L452xx device limitations.pdf
programming, register descriptions, peripherals etc.: RM0394 STM32L43xxx STM32L44xxx STM32L45xxx STM32L46xxx advanced ARM-based 32-bit MCUs.pdf
UM1724 User manual STM32 Nucleo-64 boards
You can download them here:
https://www.st.com and search for STM32l452RE and NUCLEO-L452RE