STM32CUBEMX doesn't show GPIO Pull-up/Pull-down option for I2C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-29 12:01 AM
Hello,
I'm trying to imitate an I2C solution. I'm using STM32F100RB.
When selecting I2C ->
In the example, they have these GPIO settings for I2C pins:
Note the GPIO Pull-up/Pull-down option:
Here is mine:
The CUBE version is identical.
The I2C configuration is identical.
What could be the reason?
Thanks!
- Labels:
-
GPIO-EXTI
-
I2C
-
STM32CubeMX
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-29 04:16 AM
Hello @ISeed , It's reported internally for further check .
Best Regards,
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-29 04:59 AM
@ISeed could you please send me the ioc exemple ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-29 10:36 AM
yes, of course. How do I send it to you?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 12:18 AM
@ISeed select this Icon then upload the ioc exemple file.
Regards,
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 02:34 AM
In any case, beyond the tools, nothing prevents you moving forward by programming the GPIO->PUPD registers directly.
2 lines of code, how long would it take to make it happen?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 02:56 AM
Hi,
Do you have an example of this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 02:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 03:19 AM
This is your ioc file , could you please share the "example" ioc file where did you find GPIO Pull-up/Pull-down option ?
Thanks!
Khouloud.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-05-30 04:40 AM
open stm32l4xx_hal_gpio.c and dig in:
/* Activate the Pull-up or Pull down resistor for the current IO */
temp = GPIOx->PUPDR;
temp &= ~(GPIO_PUPDR_PUPD0 << (position * 2));
temp |= ((GPIO_Init->Pull) << (position * 2));
GPIOx->PUPDR = temp;
Want a pullup on PB3?
GPIOB->PUDR &= ~(0x03<<(3*2));
GPIOB->PUDR |= (0x01<<(3*2));
Want a pulldown on PB3?
GPIOB->PUDR &= ~(0x03<<(3*2));
GPIOB->PUDR |= (0x02<<(3*2));
Done, reading the ref man, 3 minutes, coding 2 minutes.