Adding STM32_F429 + S2_LP (WiSUN) as a new MTB target

pull/10326/head
Ashok Rao 2019-04-01 07:31:01 +01:00 committed by Martin Kojtal
parent aa4803f9d6
commit f3f2cedbbf
5 changed files with 21 additions and 6 deletions

View File

@ -1,4 +1,5 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* SPDX-License-Identifier: BSD-3-Clause
******************************************************************************* *******************************************************************************
* Copyright (c) 2016, STMicroelectronics * Copyright (c) 2016, STMicroelectronics
* All rights reserved. * All rights reserved.
@ -57,6 +58,7 @@ typedef enum {
UART_8 = (int)UART8_BASE UART_8 = (int)UART8_BASE
} UARTName; } UARTName;
#define SPI_COUNT 6
typedef enum { typedef enum {
SPI_1 = (int)SPI1_BASE, SPI_1 = (int)SPI1_BASE,
SPI_2 = (int)SPI2_BASE, SPI_2 = (int)SPI2_BASE,

View File

@ -1,4 +1,5 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* SPDX-License-Identifier: BSD-3-Clause
******************************************************************************* *******************************************************************************
* Copyright (c) 2018, STMicroelectronics * Copyright (c) 2018, STMicroelectronics
* All rights reserved. * All rights reserved.

View File

@ -1,4 +1,5 @@
/* mbed Microcontroller Library /* mbed Microcontroller Library
* SPDX-License-Identifier: BSD-3-Clause
******************************************************************************* *******************************************************************************
* Copyright (c) 2018, STMicroelectronics * Copyright (c) 2018, STMicroelectronics
* All rights reserved. * All rights reserved.

View File

@ -30,7 +30,7 @@
**/ **/
#include "stm32f4xx.h" #include "stm32f4xx.h"
#include "nvic_addr.h"
#include "mbed_error.h" #include "mbed_error.h"
// clock source is selected with CLOCK_SOURCE in json config // clock source is selected with CLOCK_SOURCE in json config
@ -56,6 +56,10 @@ uint8_t SetSysClock_PLL_HSI(void);
*/ */
void SystemInit(void) void SystemInit(void)
{ {
/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */
#endif
/* Reset the RCC clock configuration to the default reset state ------------*/ /* Reset the RCC clock configuration to the default reset state ------------*/
/* Set HSION bit */ /* Set HSION bit */
RCC->CR |= (uint32_t)0x00000001; RCC->CR |= (uint32_t)0x00000001;
@ -79,6 +83,13 @@ void SystemInit(void)
SystemInit_ExtMemCtl(); SystemInit_ExtMemCtl();
#endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */
/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
#endif
} }
/** /**

View File

@ -2834,8 +2834,8 @@
"core": "Cortex-M4F", "core": "Cortex-M4F",
"config": { "config": {
"clock_source": { "clock_source": {
"help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL | USE_PLL_HSI", "help": "Mask value : USE_PLL_HSE_EXTC | USE_PLL_HSE_XTAL (8MHz) | USE_PLL_HSI",
"value": "USE_PLL_HSE_EXTC|USE_PLL_HSI|USE_PLL_HSE_XTAL", "value": "USE_PLL_HSE_XTAL",
"macro_name": "CLOCK_SOURCE" "macro_name": "CLOCK_SOURCE"
}, },
"clock_source_usb": { "clock_source_usb": {
@ -2846,10 +2846,10 @@
}, },
"extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI"], "extra_labels_add": ["STM32F4", "STM32F429", "STM32F429ZI", "STM32F429xx", "STM32F429xI"],
"macros_add": ["USB_STM_HAL"], "macros_add": ["USB_STM_HAL"],
"device_has_add": ["ANALOGOUT", "CAN", "SERIAL_ASYNCH", "SERIAL_FC", "TRNG", "FLASH"], "device_has_add": ["ANALOGOUT", "CAN", "SERIAL_ASYNCH", "TRNG", "FLASH", "MPU"],
"detect_code": ["0467"], "detect_code": ["0467"],
"release_versions": ["5"], "release_versions": ["5"],
"device_name": "STM32F429VI", "device_name": "STM32F429ZI",
"bootloader_supported": true "bootloader_supported": true
}, },
"NUCLEO_F439ZI": { "NUCLEO_F439ZI": {