Mercurial > public > ostc4
changeset 327:abec171c2c4b I2C_Improvment
Deactivated internal pullups and I2C interrupt callback
Internal GPIO should be configurated to no pull to avoid interferance with external electronic. The interrupt functionality is no longer in used and the callbacks are empty => uncommented enables
author | ideenmodellierer |
---|---|
date | Wed, 17 Jul 2019 22:41:31 +0200 |
parents | 2559a3f0f1f2 |
children | 4fe5400567e7 |
files | Small_CPU/Src/stm32f4xx_hal_msp_v3.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Small_CPU/Src/stm32f4xx_hal_msp_v3.c Mon Jul 01 14:18:39 2019 +0000 +++ b/Small_CPU/Src/stm32f4xx_hal_msp_v3.c Wed Jul 17 22:41:31 2019 +0200 @@ -110,7 +110,7 @@ /* I2C TX GPIO pin configuration */ GPIO_InitStruct.Pin = I2Cx_SCL_PIN; GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; - GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FAST; GPIO_InitStruct.Alternate = I2Cx_SCL_AF; @@ -124,10 +124,14 @@ /*##-3- Configure the NVIC for I2C #########################################*/ /* NVIC for I2C1 */ + + /* The callbacks are not used => no need to activate the interrupts */ + /* HAL_NVIC_SetPriority(I2Cx_ER_IRQn, 1, 2); HAL_NVIC_EnableIRQ(I2Cx_ER_IRQn); HAL_NVIC_SetPriority(I2Cx_EV_IRQn, 1, 3); HAL_NVIC_EnableIRQ(I2Cx_EV_IRQn); +*/ } /**