klipper icon indicating copy to clipboard operation
klipper copied to clipboard

Apply race fixes to stm32h7_adc.c

Open KevinOConnor opened this issue 2 years ago • 4 comments

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

KevinOConnor avatar Nov 25 '22 18:11 KevinOConnor

FYI, I don't have the stm32h7 hardware, so I have only "compile tested" this change.

-Kevin

KevinOConnor avatar Nov 25 '22 18:11 KevinOConnor

Just tested this and it works fine.

D4SK avatar Nov 29 '22 20:11 D4SK

I'll test this on my 2 printers here in the next couple days

adelyser avatar Nov 29 '22 21:11 adelyser

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.

mattthebaker avatar Nov 30 '22 06:11 mattthebaker

Thanks. I was also able to test this on an stm32h723. I have merged this PR.

-Kevin

KevinOConnor avatar Dec 13 '22 04:12 KevinOConnor