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

gpio: Enable all GPIO for all targets #66

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

dbrgn
Copy link
Contributor

@dbrgn dbrgn commented Jan 6, 2020

For some reason, GPIOC and GPIOD were disabled for the stm32l0x1, but these GPIO banks are present in the PAC (and in the datasheet).

@dbrgn
Copy link
Contributor Author

dbrgn commented Jan 6, 2020

Seems I broke something on the stm32l0x2. I'll check it out tomorrow.

@jonas-schievink
Copy link
Contributor

It looks like even GPIOE and GPIOH are present on the bigger L0x1 chips, so maybe all the #[cfg]s regarding that should be removed?

@dbrgn
Copy link
Contributor Author

dbrgn commented Jan 7, 2020

Ah, you're right, I missed that!

dbrgn added 2 commits January 7, 2020 21:02
According to the reference manuals for the 0x1¹, 0x2² and 0x3³ series,
the GPIO A/B/C/D/E as well as H[0:1][9:10] are available on all devices
(given a class 5 device).

¹ Reference manual RM0377
² Reference manual RM0376
³ Reference manual RM0367
@dbrgn dbrgn force-pushed the stm32l0x1-enable-gpiocd branch from 6d5f51a to 9dfb6c5 Compare January 7, 2020 20:35
@dbrgn dbrgn changed the title gpio: Enable GPIOC and GPIOD for stm32l0x1 gpio: Enable all GPIO for all targets Jan 7, 2020
@dbrgn
Copy link
Contributor Author

dbrgn commented Jan 7, 2020

Seems I broke something on the stm32l0x2. I'll check it out tomorrow.

It wasn't in my code, but I fixed it anyways.

It looks like even GPIOE and GPIOH are present on the bigger L0x1 chips

Verified against the reference manuals and fixed.

Do you plan to limit the availability of GPIO pins depending on the package in the future?

@hannobraun
Copy link
Contributor

Do you plan to limit the availability of GPIO pins depending on the package in the future?

I can't speak to anyone's plans, but I'd like to note there's precedent for going full bananas with packages: https://github.com/stm32-rs/stm32l0xx-hal/blob/68eeba6cd8c71a22b365d15dfe4ae9c4bb62888a/src/adc.rs#L223-#L299

@jonas-schievink
Copy link
Contributor

It looks like even GPIOE and GPIOH are present on the bigger L0x1 chips, so maybe all the #[cfg]s regarding that should be removed?

This is technically true, but I think there is no released L0x1 chip that actually has those ports, so maybe it doesn't make sense to expose them?

@dbrgn
Copy link
Contributor Author

dbrgn commented Jan 9, 2020

This is technically true, but I think there is no released L0x1 chip that actually has those ports, so maybe it doesn't make sense to expose them?

Hm? There's the STM32L071V8 with an LQFP100 package.

image

@jonas-schievink
Copy link
Contributor

Oh, never mind then. I was confused by ST's product selector.

@arkorobotics
Copy link
Member

Good catch! Thanks for fixing the serial dma async bug as well. Not sure how that one slipped through the cracks.

@arkorobotics arkorobotics merged commit 814059b into stm32-rs:master Jan 10, 2020
@dbrgn dbrgn deleted the stm32l0x1-enable-gpiocd branch January 10, 2020 16:57
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 this pull request may close these issues.

4 participants