mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/system_clock.c
- Revision:
- 188:bcfe06ba3d64
- Parent:
- 187:0387e8f68319
--- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/system_clock.c Thu Sep 06 13:40:20 2018 +0100 +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/system_clock.c Thu Nov 08 11:46:34 2018 +0000 @@ -31,7 +31,7 @@ #include "stm32f4xx.h" #include "mbed_error.h" - +#include "nvic_addr.h" /*!< Uncomment the following line if you need to relocate your vector Table in Internal SRAM. */ @@ -94,9 +94,20 @@ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ + SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* 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); }