stm32-rs / stm32l4xx-hal

A Hardware abstraction layer for the stm32l432xx series chips written in rust.
157 stars 104 forks source link

Configure GPIOx_ASCR register for STM32L47x/STM32L48x #309

Open jspngh opened 2 years ago

jspngh commented 2 years ago

I've spent some time figuring out why the ADC does not work on my STM32L476 board. Turns out it is because of this little remark in the reference manual: image

Right now I added it directly in the into_analog function, but maybe it should be placed in a separate function?

jspngh commented 2 years ago

Seems like for stm32l4x5 the ascr register will only be available in stm32-rs v0.15.0 Maybe this PR can be delayed until that is released.

MathiasKoch commented 2 years ago

Seems like for stm32l4x5 the ascr register will only be available in stm32-rs v0.15.0 Maybe this PR can be delayed until that is released.

I did the PR that fixed this in stm32-rs and the yet-to-be-released is the reason i have not opened this PR before :+1:

But thank you very much for you contribution! I think we should keep taps on when stm32-rs v0.15.0 is released, and let this PR be dorment until.

MathiasKoch commented 2 years ago

stm32-rs v0.15.0 released: https://github.com/stm32-rs/stm32-rs/releases/tag/v0.15.0 :tada:

jspngh commented 2 years ago

Some small things needed to be done to update to the new stm32-rs release. Updating the PAC should probably be done in a separate PR, but I wanted to let the CI run already to check if there are issues.

jspngh commented 2 years ago

Unsurprisingly, updating to the new stm32-rs release for all devices will be more involved than simply fixing the issues for a single device. I don't know if anyone is already working on this?