-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adc? #116
Comments
Was |
It seems the |
The To make things slightly more complicated, the modules of the
So saying something like " In any case, since this HAL only re-exports the contents of the PAC, there's not much we can do here to solve your problem. If I were in your situation, I'd ask myself the following questions:
If peripherals that should be available on the target hardware are indeed missing, that's a problem in the PAC, which is defined in the stm32-rs repository. I suggest opening an issue (or pull request) there. |
(Sorry, I wrote this weeks ago, but forgot to click and it got lost on a browser tab.) Thank you for the extended explanation! As you may have guessed, I do not have actual Looking at I have examples building using adc on other device hals, and other examples building on |
I've looked at this more now but will not claim that I really understand it. The Lines 154 to 155 in 0a0d06d
adc support is only activated for very few devices while it should be available on many more.
Regarding reading the internal temperature there is also a problem that there is no (easy) way to access the internal channel used for the MCU temperature sensor, even on the MCUs that have |
Which version of the SVD file are you looking at? The PAC (that this HAL is based on) seems to be based on the files in this directory. As of this writing, the F7 files were updated 2 years ago, so is it possible you were looking at a newer version? The file is also patched and transformed during the PAC building process, so a problem might be introduced there. I am not familiar with this though, so no idea if it's a problem.
That is true, but please note that it's a completely separate problem from what was discussed here earlier. Originally, we were discussing that some ADC functionality was missing from the PAC. Back then, no ADC support existed in this HAL at all. The API was added in July, months after the previous discussion on this issue happened. It seems the contributor who added the ADC API enabled it for the hardware they developed it for, which is a sensible thing to do. If you can confirm that the API works for other hardware too, extending the number of devices it's enabled for makes sense, and would be a welcome contribution.
Making more hardware features available in the API would definitely be a welcome addition.
The |
The I realize I have introduced something slightly different from the earlier discussion but I thought
Apart from the problem that this is a bit beyond my current abilities there is the chicken and egg problem. I might consider getting hardware if I can get examples to build. My current project is to get several different examples building with several different device hals. (CI at https://github.com/pdgilbert/rust-integration-testing/actions) The |
SVD files are often incomplete and full of errors, so it's very plausible that someone patched it, or that ST released a new version, and that those changes haven't made their way into stm32-rs. Once someone does the work of improving the situation in stm32-rs, the improvements will trickle down to this HAL.
Yeah, totally. I wasn't objecting, just providing context in case it wasn't totally clear.
All I'm saying is, there's no grand plan to leave certain features out, or anything like that. Availability of features is driven by contributors who need them, and I just wanted to make it clear that you, or anyone else, are welcome to make improvements that adapt the HAL to your needs. |
In this specific case, the SVDs from tinygo-org/stm32-svd are actually exactly the SVDs from stm32-rs (or older, since there's been a handful of recent stm32f7 updates). So there shouldn't be anything in that SVD that's not in the PAC. For reference, you can always download the latest built SVDs from stm32-rs here too. Currently stm32f7xx-hal uses stm32f7 v0.11.0, but the current version is 0.13 and I'm going to publish 0.14 in a few days. Looking at the Changelog I'm not sure how many ADC improvements for F7 there are since then, though. |
Thanks for the note, Adam!
Oh man, we've really gotten behind. I somehow implicitly assumed we were on the latest version. stm32l0xx-hal has been updated recently, so that probably confused my into thinking we were up-to-date here too 😄 |
Ok, I look forward to testing again when things are up-to-date. Thanks. |
I have also encountered a problem with not being able to use the ADC. I'm using an STM32F723 microcontroller on a development board, and based on the code it seems like I can't use the ADC for this controller, which is very strange because it is supported by the hardware. Are there any ways to get the ADC working? |
Where is
adc
? It is indevice::
in release 0.2.0. On gitdevice::
has disappeared but adc does not seem to be in any of the usual places.The text was updated successfully, but these errors were encountered: