comparison Small_CPU/Src/spi.c @ 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 6347a86caa18
children 6ae8ba5683d6
comparison
equal deleted inserted replaced
123:a984d87a1ec0 124:4b355396557a
155 155
156 GPIO_InitStruct.Pin = GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7; 156 GPIO_InitStruct.Pin = GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7;
157 // GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; 157 // GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7;
158 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 158 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
159 GPIO_InitStruct.Pull = GPIO_PULLUP; 159 GPIO_InitStruct.Pull = GPIO_PULLUP;
160 GPIO_InitStruct.Speed = GPIO_SPEED_MEDIUM; 160 GPIO_InitStruct.Speed = GPIO_SPEED_FAST; /* Decision is based on errata which recommends FAST for GPIO at 90Mhz */
161 GPIO_InitStruct.Alternate = GPIO_AF5_SPI1; 161 GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
162 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 162 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
163 163
164 //##-3- Configure the DMA streams ########################################## 164 //##-3- Configure the DMA streams ##########################################
165 // Configure the DMA handler for Transmission process 165 // Configure the DMA handler for Transmission process