-
Notifications
You must be signed in to change notification settings - Fork 66
STM32F030C8 pinmap is missinf PF6 and PF7 as I2C pins #31
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
Comments
From datasheet: https://www.st.com/resource/en/datasheet/stm32f030c8.pdf The genpinmap script used to generate PeripheralPins.c parse xml from STM32CubeMX.
But not AF linked to this in GPIO xml file, that's why they are not present. When no AF is found the pin is ignored. So there is an issue with those pins definition, If yes, the best way is to mention that it was added manually in the variant. |
Some pin does not have AF defined, PinMap use GPIO_AF_NONE to identify them. See stm32duino/Arduino_Tools#31 Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#31 Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#31 Signed-off-by: Frederic.Pillon <[email protected]>
Some pin does not have AF defined, PinMap use GPIO_AF_NONE to identify them. See stm32duino/Arduino_Tools#31 Signed-off-by: Frederic.Pillon <[email protected]>
Some pin does not have AF defined, PinMap use GPIO_AF_NONE to identify them. See stm32duino/Arduino_Tools#31 Signed-off-by: Frederic.Pillon <[email protected]>
@ghent360 |
Thank you for the diligent work. |
welcome |
Some pin does not have AF defined, PinMap use GPIO_AF_NONE to identify them. See stm32duino/Arduino_Tools#31 Signed-off-by: Frederic.Pillon <[email protected]>
Hi,
The generated pinmap for the STM32F030C8 chip has only PB pins as available for I2C. In the STM32CubeMX software I can select pins 35 and 36 (PF6 and PF7) as SCL and SDA for the I2C2 module.
The generated code for the GPIO init is:
__HAL_RCC_GPIOF_CLK_ENABLE();
/**I2C2 GPIO Configuration
PF6 ------> I2C2_SCL
PF7 ------> I2C2_SDA
*/
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
It is a bit odd, because there is no GPIO_InitStruct.Alternate. There is also no mention for PF6 and PF7 in the datasheet :-(.
The text was updated successfully, but these errors were encountered: