Mercurial > public > ostc4
changeset 124:4b355396557a FlipDisplay
Change GPIO speed for SPI communication as recommended by STM32 Errata
author | Ideenmodellierer |
---|---|
date | Sun, 27 Jan 2019 22:17:16 +0100 |
parents | a984d87a1ec0 |
children | 626191e1fed1 |
files | Discovery/Src/stm32f4xx_hal_msp_hw2.c Small_CPU/Src/spi.c |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/stm32f4xx_hal_msp_hw2.c Sun Jan 27 22:01:07 2019 +0100 +++ b/Discovery/Src/stm32f4xx_hal_msp_hw2.c Sun Jan 27 22:17:16 2019 +0100 @@ -298,7 +298,7 @@ GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_MEDIUM;//GPIO_SPEED_LOW; + GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recomments FAST for GPIO at 90Mhz */ GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_4; @@ -393,7 +393,7 @@ GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_MEDIUM;//GPIO_SPEED_LOW; + GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; //GPIO_SPEED_MEDIUM;//GPIO_SPEED_LOW; GPIO_InitStruct.Alternate = GPIO_AF5_SPI5; HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
--- a/Small_CPU/Src/spi.c Sun Jan 27 22:01:07 2019 +0100 +++ b/Small_CPU/Src/spi.c Sun Jan 27 22:17:16 2019 +0100 @@ -157,7 +157,7 @@ // GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; - GPIO_InitStruct.Speed = GPIO_SPEED_MEDIUM; + GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */ GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);