DISCO_F413ZH : set default Wifi module SPI state to inactive

pull/8383/head
jeromecoutant 2018-10-11 18:01:24 +02:00
parent c43a3f4dfb
commit 922cc2b8a7
1 changed files with 11 additions and 0 deletions

View File

@ -97,6 +97,17 @@ void SystemInit(void)
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
#endif
/* In DISCO_F413ZH board, Arduino connector and Wifi embeded module are sharing the same SPI pins */
/* We need to set the default SPI SS pin for the Wifi module to the inactive state i.e. 1 */
/* See board User Manual: WIFI_SPI_CS = PG_11*/
__HAL_RCC_GPIOG_CLK_ENABLE();
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FAST;
GPIO_InitStruct.Pin = GPIO_PIN_11;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
HAL_GPIO_WritePin(GPIOG, GPIO_PIN_11, GPIO_PIN_SET);
}