klipper
klipper copied to clipboard
Apply race fixes to stm32h7_adc.c
Improve handling of race conditions with hardware updates. This is the same changes applied to stm32f0_adc.c in commit 88325b6c.
This is an alternate implementation of PR #5911 .
@adelyser , @mattthebaker , @D4SK - fyi.
-Kevin
FYI, I don't have the stm32h7 hardware, so I have only "compile tested" this change.
-Kevin
Just tested this and it works fine.
I'll test this on my 2 printers here in the next couple days
Looks good to me other than the inline comment, and the f0 version worked effectively on the l4 previously.
When I read "allowed" in the data sheet I get the impression that logic might block setting of the bit, but its hard to say.
Thanks. I was also able to test this on an stm32h723. I have merged this PR.
-Kevin