Comments (12)
Ping @chris-durand 😉
from modm.
Well starting now. I'm going to at least do the stm32.
from modm.
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.
Ever make any progress on this? I'm about to start implementing it if not.
from modm.
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.
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.
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.
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.
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.
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.
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.
Let me know if you have any issues with the API as is.
Clean and simple, I like it!
from modm.
Related Issues (20)
- Placement of data section in wrong memory for STM32H7 HOT 1
- Segmentation fault when building documentation files HOT 3
- Heap not implemented. HOT 6
- Most UART drivers don't implement the full `modm::Uart` interface
- External interrupt causes immediate reset on Arduino Mega 2560 HOT 1
- STM32H7 Flash Support? HOT 5
- vscode json generation HOT 2
- CI docs all job is broken
- Docs Page, Search Function is Intermittent? HOT 6
- OpenOCD cannot configure TPIU/SWO on STM32H7 HOT 5
- Error when trying to compile example on M1 mac HOT 2
- Using SPI on Linux/Darwin target HOT 3
- CMake usage in recommended project structure HOT 3
- lbuild fails when relative paths are on different Windows drives HOT 1
- Fibers not implemented on ARM64
- CI Failling in a apprently nor related point HOT 2
- Documentation / example for "safely" accessible flash HOT 2
- [STM32G4] flash dual bank ignored during erase HOT 2
- ifdef Doxygen guard in SPI_Master - why???
- Linker issues with newlib version 4.4.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modm.