Skip to content

Pin alternate functions incorrect for chips that are not STM32L4x2 #43

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

Closed
FrozenDroid opened this issue Mar 1, 2019 · 6 comments · Fixed by #218
Closed

Pin alternate functions incorrect for chips that are not STM32L4x2 #43

FrozenDroid opened this issue Mar 1, 2019 · 6 comments · Fixed by #218

Comments

@FrozenDroid
Copy link
Contributor

I am trying to use I2C, but it won't work.
While trying to research why it won't work, I think I've found why. I am using the STM32L476VG, and if I'm correct @MabezDev is using the STM32L432KC?
If you compare https://www.st.com/resource/en/datasheet/stm32l476vg.pdf (page 92) and https://www.st.com/resource/en/datasheet/stm32l432kc.pdf (page 55). You will see that on the L476VG, PA9 and PA10 do not have I2C capabilities.

@MabezDev
Copy link
Member

MabezDev commented Mar 8, 2019

You're right as of right now most of the development has been done with the l432 boards. There is a tracking issue #29 for other devices like yours. The plan is to go the same way as the f4 hal an feature gate each chip.

@lucazulian
Copy link
Contributor

I am trying to use I2C and I don't understand why. @FrozenDroid can you explain me the way to fix the problem?

@FrozenDroid
Copy link
Contributor Author

@lucazulian please explain your problem and I can try to help you.

@lucazulian
Copy link
Contributor

I'm trying to connect with a vl53l0x sensor via I2C but using a STM32L432KC board but I've got alway a Nack error on ports gpioa.pa9 and gpioa.pa10. The sensor works on arduino, and I thought the problem was related with this issue.

@FrozenDroid
Copy link
Contributor Author

FrozenDroid commented Sep 15, 2019

No, it's probably not related. This issue is about chips that aren't the STM32L432KC. If you can give me some code, I can maybe help. One thing I found myself wasting time on was the difference between address byte sizes between AVR and ARM. Try shifting the address to the left one place (addr << 1)

@lucazulian
Copy link
Contributor

Yeah, with your suggestion now it works....I can't explain me why. Anyway, thanks for the help

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

Successfully merging a pull request may close this issue.

3 participants