comparison Discovery/Src/stm32f4xx_hal_msp_hw2.c @ 125:626191e1fed1 FlipDisplay

Change GPIO speed for SPI communication as recommended by STM32 Errata
author Ideenmodellierer
date Sun, 27 Jan 2019 22:21:01 +0100
parents 4b355396557a
children b7689d9e888a
comparison
equal deleted inserted replaced
124:4b355396557a 125:626191e1fed1
296 */ 296 */
297 // GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; 297 // GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
298 GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_7; 298 GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_7;
299 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 299 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
300 GPIO_InitStruct.Pull = GPIO_NOPULL; 300 GPIO_InitStruct.Pull = GPIO_NOPULL;
301 GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recomments FAST for GPIO at 90Mhz */ 301 GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */
302 GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; 302 GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
303 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 303 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
304 GPIO_InitStruct.Pin = GPIO_PIN_4; 304 GPIO_InitStruct.Pin = GPIO_PIN_4;
305 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); 305 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
306 306
391 PF9 ------> SPI5_MOSI 391 PF9 ------> SPI5_MOSI
392 */ 392 */
393 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9; 393 GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9;
394 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 394 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
395 GPIO_InitStruct.Pull = GPIO_NOPULL; 395 GPIO_InitStruct.Pull = GPIO_NOPULL;
396 GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; //GPIO_SPEED_MEDIUM;//GPIO_SPEED_LOW; 396 GPIO_InitStruct.Speed = /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */
397 GPIO_InitStruct.Alternate = GPIO_AF5_SPI5; 397 GPIO_InitStruct.Alternate = GPIO_AF5_SPI5;
398 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct); 398 HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
399 399
400 /* USER CODE BEGIN SPI5_MspInit 1 */ 400 /* USER CODE BEGIN SPI5_MspInit 1 */
401 401