Giter Site home page Giter Site logo

stm32l452-serial's Introduction

STM32L452 serial example

Developed with Rust Cortex M support library, this code implements the UART interface on the STM32L452 chip. Tested with the Nucleo STM32L452RE-P

Screen /dev/ttyACM0 at 115200 baud rate, see "Hello, world!" appear.

It also blinks the LED using a timer, because of course there should be a blinkenlicht!

Build using cargo build --release --target thumbv7em-none-eabihf using a Nightly rust, works with 2018-09-20.

Notes & tips

  • The Nucleo -p version with SMPS does not have an external HSE crystal. This would not be worth knowing if the default clock source weren't the MSE clock, which is inaccurate, and thus not suitable for driving the USART clock. Example using the MSI clock, with auto-calibration.
  • The write() function in the peripherals lib operates on an internal reset state, not he current value in the target register. Use modify() if you want to base the modification on the current register state
  • If something does not work as expected, but also does not trigger any faults, it's the clock source. It's always the clock source. Use MXCube for figuring out the clock configuration values.
  • The svd command provided by the gdb.py script (check inside for install instructions) is a lifesafer.
  • Use Atollic TrueStudio when in need of a decent GDB GUI

TODO

cleanup

stm32l452-serial's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.