Skip to content
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

Issue with embassy-stm32/adc f3; stmf303vct #3506

Closed
appel-pie opened this issue Nov 6, 2024 · 1 comment
Closed

Issue with embassy-stm32/adc f3; stmf303vct #3506

appel-pie opened this issue Nov 6, 2024 · 1 comment

Comments

@appel-pie
Copy link

Appears to be an issue with adcal register being stuck high.
R2 sequence as adc attempts to initalise and calibrate: naturally hang at the while read adcal
I will look more into it, apoligies if i have gotten the wrong register.

0x08014d74=1000 0000 0001 0100 1101 0111 0100 0000
0x08014f24=1000 0000 0001 0100 1111 0010 0100 0000 set adcal true
0x9000000=1001 0000 0000 0000 0000 0 000 0000 0000 after set adcal true
0x08014f24=1000 0000 0001 0100 1111 0010 0100 0000 back to this

C programmed with the adc working, the register sequence is read.

0x20000200 = 0010 0000 0000 0000 0000 0010 0000 0000
0x10000000 = 0001 0000 0000 0000 0000 0000 0000 0000 after Hal init
0x40000800 = 0100 0000 0000 0000 0000 1000 0000 0000 before cali
0x50000400 = 0101 0000 0000 0000 0000 0100 0000 0000 after cali/after adc start:
0x00000201 = 0000 0000 0000 0000 0000 0010 0000 0001 after adc poll for conversion
0x20000050 = 0010 0000 0000 0000 0000 0000 0101 0000 after multimode get conversion
0x40006400 = 0100 0000 0000 0000 0110 0100 0000 0000 after Hal Delay(1)

1730716553953
1730716007575
https://github.com/embassy-rs/embassy/blob/main/embassy-stm32/src/adc/f3.rs

@appel-pie
Copy link
Author

My bad, got the registers wrong (put zeros on the wrong end) and i had a clock issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant