Git Product home page Git Product logo

msp432p401r-hal's Introduction

msp432p401r-hal crates.io

Hardware Abstraction Layer for MSP432P401R microcontroller

Currently under development:

  • Watchdog
  • GPIO
  • Clock
  • PCM
  • Flash Control
  • TimerA
  • Timer32
  • PWM (TimerA)
  • Port MAP
  • ADC
  • DMA
  • RTC
  • SPI - EUSCI
  • I²C - EUSCI
  • UART - EUSCI
  • Cap. Touch IO
  • CRC32
  • AES256
  • Shared Reference (REF A)
  • Comparator
  • LCD Control
  • FPU
  • Random Seed
  • Reset Controller
  • System Controller
  • Power Supply System
  • Cortex M4 Periph

Running the examples

Make sure you have OpenOCD and GNU ARM Embedded toolchain installed and up-to-date

$ brew install openocd --HEAD

Setup Rust nightly and add the ARM build platform target:

$ rustup default nightly
$ rustup target add thumbv7em-none-eabihf

Clone and compile the project:

$ git clone https://github.com/msp432-rust/msp432p401r-hal.git
$ cd msp432p401r-hal
$ example=hello_world
$ cargo build --example $example

Open a OpenOCD server and leave it open in a terminal:

$ openocd

On a separate terminal, open the GDB client:

$ arm-none-eabi-gdb -q target/thumbv7em-none-eabihf/debug/examples/$example
$ (gdb) target extended-remote :3333
$ (gdb) load
$ (gdb) monitor arm semihosting enable
$ (gdb) continue

msp432p401r-hal's People

Contributors

caiotavares avatar joseclaudiosjr avatar prabhpreet avatar reitermarkus avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

msp432p401r-hal's Issues

Clock SMCLK Prescaler is incorrect

Hello,

Thanks for this crate. I am using a MSP432P401R and I encountered an issue with this crate.

The SMCLK prescalar for SMCLK is converted to u32, which is incorrect. For example, SMPrescaler::DIVS_0 as u32 is evaluated as 0, which actually indicates no scaling, i.e. a division of 1.

I'd be happy to contribute a PR. Can you please merge the hotfix PR #22 so I can fix this? My changes are based on the hotfix.

Thanks

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.