GithubHelp home page GithubHelp logo

Comments (1)

mattico avatar mattico commented on June 16, 2024

I was just going to open an issue about this. I have a similar use-case, where I have an ADC which has a dual-SPI-like interface connected to an STM32 SPI in Receive-only-slave mode, plus some unusual DMA configuration.

Previously I was using stm32-rs/stm32h7xx-hal which has fairly comprehensive support for peripheral configuration, but still maybe 10% of my peripherals had some configuration which wasn't supported natively in the HAL. When this situation came up I had a few choices:

  1. Use the HAL peripheral, but after the HAL configures it change a few values in the registers directly.
  2. Copy the HAL peripheral implementation into my project and modify it to work as necessary.
  3. Add support for the feature I needed to upstream, usually after having tested the changes by doing option 1 or 2.

Adding upstream support was preferred but was often way more work, as I'd need to come up with an expansive new general interface for the feature and implement it for all of the supported microcontrollers - not just a specific hack for my specific microcontroller. Often it's not practical for an upstream HAL to support the full breadth of a peripheral's possible configurations, as the implementation and interface would be massive and complex.

Options 1 and 2 would often break when updating the HAL since they relied so much on HAL internals, but they were still very useful and convenient compared to having to create a whole new peripheral from scratch based on just the PAC. embassy-stm32 sealing away its internals makes life more difficult for me.

from embassy.

Related Issues (20)

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.