Giter VIP home page Giter VIP logo

embassy-experiments's Introduction

Embassy Experiments

This repo contains example programs for the STM32F3 Discovery board - which uses the STM32F303VC MCU - utilizing the Embassy embedded Rust framework.

Prerequisites

To run these programs, you'll need a nightly rust toolchain for the thumbv7em-none-eabihf target:

rustup install nightly
rustup target add thumbv7em-none-eabihf

In addition, cargo run will try to flash the discovery board using probe-rs, so you'll need that as well. Alternatively, you can only cargo build the programs and flash them via other means, or adapt the runner option in .cargo/config.toml.

Also, you will naturally need an STM32F3 Discovery board.

Usage

Several programs are contained in src/bin/. For example, to run the hello.rs program, execute this command:

cargo run --release --bin hello

The programs are based on and inspired by Embassy's stm32f3 and stm32f4 examples.

These programs work:

  • hello: prints "Hello World!" to the debugging interface, that's it. See this example
  • blinky: blinks the eight LEDs of the discovery board at different frequencies, by multiplexing eight independent tasks. See this example
  • button: waits for button presses and releases using interrupts and controls an LED accordingly. See this example
  • pwm: controls an LED's brightness by varying its duty cycle. See this example
  • channel: uses a Channel to communicate between two async tasks. If the receiver interval is larger than the sender interval, this will demonstrate backpressure.
  • signal: uses a Signal to communicate between two async tasks. If the receiver interval is larger than the sender interval, this will demonstrate overwriting without backpressure.

These don't:

  • adc: should read a voltage from one of the ADC capable pins periodically. However, the program hangs at Adc::new(). See this example
  • uart: when TX and RX (PE0, PE1) are connected, should echo the UART output. However, no data is received and printed (I have not yet explicitly tested if the data is sent correctly). See this example

embassy-experiments's People

Contributors

sillyfreak avatar

Stargazers

 avatar

Watchers

 avatar  avatar

embassy-experiments's Issues

Have updates to working bits and fixes to adc - if interested, I can issue a pull request here or...

Greetings,

I found embassy-experiments to be a great place for me to advance my (embassy) rust on STM32F3Discovery experience. I cloned your repo, updated the previously working code and then debugged the adc demo (I'll do the serial port next). In the process, I've identified a couple of Embassy bugs that I intend to bring to their attention (assuming they haven't already been identified...). So... I desire to make my code public and I can either issue a pull request against your repo (so you get full originator presentation) or just make my repo public.

Do you have a preference?

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.