Code Monkey home page Code Monkey logo

stm32f411-rs-i2s-pac-pcm5102's Introduction

stm32f411-rs-i2s-pac-pcm5102

This rust project is an example of i2s usage on a stm32f411 chip. It use this protocol to output a sawtooth on a pcm5102 module. Warning! Reduce the volume, the sawtooth is fullscale so it's very loud!

At time of this project, there is no Hardware Abstraction Layer for i2s. Instead, the main source directly access to the hadware using pac module, this is why it contains many unsafe sections.

This project is for a nucleo-f411re but should be easily adaptable for any stm32f4xx using a 8Mhz external oscillator. To Adapt it, you need:

  • Change ram an flash in memory.x according to your device.
  • In Cargo.toml, under dependencies.stm32f4xx-hal replace the stm32f411 feature according to your chip (See here for available chips).
  • In Embed.toml, under default.general, replace chip value by your chip (cargo embed --list-chip to get the list of possible value).

Connecting devices

pcm5102 stm32f4xx
VIN 3V3
GND GND
LCK PB12
DIN PB15
BCK PB13
SCK PC6
FLT 3V3 or GND
DEMP GND
XSMP 3V3
FMT GND
A3V3 3V3
AGND GND

Build, load, and run

This require cargo embed, you can install it with cargo install cargo-embed. Just run cargo embed to build, load, and run the firmware.

License

This project is licensed under terms of both MIT and Apache licenses. See LICENSE-APACHE.txt and LICENSE-MIT.txt.

stm32f411-rs-i2s-pac-pcm5102's People

Contributors

yruamalairba avatar

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.