Giter Club home page Giter Club logo

Comments (12)

rleh avatar rleh commented on May 27, 2024 2

Ping @chris-durand 😉

from modm.

W-M-D avatar W-M-D commented on May 27, 2024 2

Well starting now. I'm going to at least do the stm32.

from modm.

gueldenstone avatar gueldenstone commented on May 27, 2024 1

Oh, I'm sorry anyway thank you for the fast answer! I will look into it and share it if I come up with something :)

from modm.

W-M-D avatar W-M-D commented on May 27, 2024

Ever make any progress on this? I'm about to start implementing it if not.

from modm.

gueldenstone avatar gueldenstone commented on May 27, 2024

Hi, I'm a new modm user and I would like to try it on a project using a DAC I see some Code for the mcp4922 in the repository but no way to use it currently @W-M-D is that what you're working on?

from modm.

salkinium avatar salkinium commented on May 27, 2024

This issue is about the STM32 integrated DAC unfortunately.

The MCP4922 was part of xpcc.io but I didn't port it to modm, due to running out of motivation and not having the hardware to test it.
If you want to port it, you can have a look at the DRV832x driver, which uses the non-blocking, multiple-access API: https://github.com/modm-io/modm/blob/develop/src/modm/driver/motor/drv832x_spi_impl.hpp#L125-L176

from modm.

mcbridejc avatar mcbridejc commented on May 27, 2024

I wrote a simple synchronous driver for the STM32 DAC. I'm using it on the STM32F413, but I haven't done any looking into how similar/dissimilar the DAC is on other parts/families.

It's here: develop...mcbridejc:stm32-dac

from modm.

salkinium avatar salkinium commented on May 27, 2024

Great! Do you want to merge it regardless? lbuild lets you enable the driver only for the F413, so that you don't need to deepdive into other devices. But this way your work won't be lost, and other's can expand it at a later time.

from modm.

mcbridejc avatar mcbridejc commented on May 27, 2024

I'd be happy to! Then I can get my project off of my fork and back on the main modm repo.

I'll take a pass at getting the doc comments up to par. Let me know if you have any issues with the API as is.

At what point do you recommend enabling for other parts? I suspect it will work on many or even all F4s; perhaps other families. I can look over some datasheets to see if I can find any differences, but I'm not about to do an exhaustive search of all parts. Do you prefer to enable drivers only for parts that are tested to work, or if its "expected" to work everywhere do you enable for everything and risk possible exceptions being found later?

The ST HAL drivers don't have any variations at least, so I expect the DAC is the same for all F4 parts anyway: https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dac.c#L223

from modm.

salkinium avatar salkinium commented on May 27, 2024

Do you prefer to enable drivers only for parts that are tested to work, or if its "expected" to work everywhere do you enable for everything and risk possible exceptions being found later?

We usually enable a driver for an entire family, since they only very rarely differ. The CI may complain about missing defines sometimes, if it does not, the risk is very small.

I expect the DAC is the same for all F4 parts anyway

Yeah, me too. You may also additionally check this comparison tool, which shows it's the same DAC across the entire F4: https://agg.io/u/stm32/stm32f/stm32f4/DAC_0x40007400.html
There also this, but not good for comparisons: https://stm32-rs.github.io/stm32-rs/STM32F410.html#DAC

from modm.

salkinium avatar salkinium commented on May 27, 2024

It looks like F0, F1 (partially), F2, F3 (partially), F4, F7 share this DAC implementation. You can simply opportunistically enable it for all and then check the CI what families "survive" without any changes. Then you can decide whether to fix it, or simply disable that family, perhaps with a comment for someone else to fix later. There's nothing bad about delegating this, that was a large motivation for lbuild.

from modm.

salkinium avatar salkinium commented on May 27, 2024

Let me know if you have any issues with the API as is.

Clean and simple, I like it!

from modm.

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.