Skip to content

Commit 5e3350c

Browse files
committed
DISCO_F413ZH: Modification needed to build
1 parent af6f9aa commit 5e3350c

File tree

8 files changed

+46
-27
lines changed

8 files changed

+46
-27
lines changed

features/unsupported/USBHost/USBHost/TARGET_STM/TARGET_STM32F4/TARGET_STM32F411xE/TARGET_NUCLEO_F411RE/USBHALHost_STM_TARGET.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
/* 144 pins boards */
2020
#if defined(TARGET_NUCLEO_F429ZI) || defined(TARGET_NUCLEO_F446ZE) || defined(TARGET_NUCLEO_F207ZG) \
21-
|| defined(TARGET_NUCLEO_F767ZI) || defined(TARGET_NUCLEO_F746ZG) || defined(TARGET_NUCLEO_F412ZG)
21+
|| defined(TARGET_NUCLEO_F767ZI) || defined(TARGET_NUCLEO_F746ZG) || defined(TARGET_NUCLEO_F412ZG) \
22+
|| defined(TARGET_DISCO_F413ZH)
2223
#include "USBHALHost_STM_144_64pins.h"
2324
#endif
2425

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/PeripheralNames.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ typedef enum {
2727
} ADCName;
2828

2929
typedef enum {
30-
DAC_1 = (int)DAC1_BASE
30+
DAC_1 = (int)DAC_BASE
3131
} DACName;
3232

3333
typedef enum {
@@ -79,7 +79,8 @@ typedef enum {
7979

8080
typedef enum {
8181
CAN_1 = (int)CAN1_BASE,
82-
CAN_2 = (int)CAN2_BASE
82+
CAN_2 = (int)CAN2_BASE,
83+
CAN_3 = (int)CAN3_BASE
8384
} CANName;
8485

8586
#ifdef __cplusplus

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/PeripheralPins.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,17 @@ const PinMap PinMap_I2C_SDA[] = {
8888
};
8989

9090
const PinMap PinMap_I2C_SCL[] = {
91-
{PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Pin not available on any connector
92-
{PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO D4
93-
{PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO D9
94-
{PB_10, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_FMPI2C1)}, // ADRUINO D15
95-
{PB_10_ALT0, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // ARDUINO D15
96-
{PB_15, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
97-
{PC_6, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
98-
{PD_12, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
99-
{PD_14, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
100-
{PF_1, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Pin not available on any connector
101-
{PF_14, FMP_I, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
91+
{PA_8, I2C_3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // Pin not available on any connector
92+
{PB_6, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO D4
93+
{PB_8, I2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // ARDUINO D9
94+
{PB_10, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_FMPI2C1)}, // ADRUINO D15
95+
{PB_10_ALT0, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // ARDUINO D15
96+
{PB_15, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
97+
{PC_6, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
98+
{PD_12, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
99+
{PD_14, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
100+
{PF_1, I2C_2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // Pin not available on any connector
101+
{PF_14, FMPI2C_1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, // Pin not available on any connector
102102
{NC, NC, 0}
103103
};
104104

@@ -248,7 +248,7 @@ const PinMap PinMap_UART_RX[] = {
248248
{PE_7, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // Pin not available on any connector
249249
{PF_6, UART_7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART7)}, // ARDUINO D0
250250
{PF_8, UART_8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, // Pin not available on any connector
251-
{PG_0, UART_9 STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, // Pin not available on any connector
251+
{PG_0, UART_9, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART9)}, // Pin not available on any connector
252252
{PG_9, UART_6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // Pin not available on any connector
253253
{PG_11, UART_10, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART10)}, // Pin not available on any connector
254254
{NC, NC, 0}

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/TARGET_DISCO_F413ZH/PinNames.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ typedef enum {
7070
PB_4 = 0x14,
7171
PB_4_ALT0 = PA_4|ALT0,
7272
PB_5 = 0x15,
73-
PB_5_ATL0 = PB_5|ALT0,
73+
PB_5_ALT0 = PB_5|ALT0,
7474
PB_6 = 0x16,
75+
PB_6_ALT0 = PB_6|ALT0,
7576
PB_7 = 0x17,
7677
PB_8 = 0x18,
77-
PB_8_ATL0 = PB_8|ALT0,
78+
PB_8_ALT0 = PB_8|ALT0,
7879
PB_9 = 0x19,
7980
PB_9_ALT0 = PB_9|ALT0,
8081
PB_10 = 0x1A,
82+
PB_10_ALT0 = PB_10|ALT0,
8183
PB_11 = 0x1B,
8284
PB_12 = 0x1C,
8385
PB_12_ALT0 = PB_12|ALT0,

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device/stm32f413xx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
#define __MPU_PRESENT 1U /*!< STM32F4XX provides an MPU */
6868
#define __NVIC_PRIO_BITS 4U /*!< STM32F4XX uses 4 Bits for the Priority Levels */
6969
#define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */
70+
#ifndef __FPU_PRESENT
7071
#define __FPU_PRESENT 1U /*!< FPU present */
72+
#endif
7173

7274
/**
7375
* @}

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device/stm32f4xx.h

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
******************************************************************************
33
* @file stm32f4xx.h
44
* @author MCD Application Team
5-
* @version V2.5.0
6-
* @date 22-April-2016
5+
* @version V2.6.1
6+
* @date 14-February-2017
77
* @brief CMSIS STM32F4xx Device Peripheral Access Layer Header File.
88
*
99
* The file is the unique include file that the application programmer
1010
* is using in the C source code, usually in main.c. This file contains:
1111
* - Configuration section that allows to select:
1212
* - The STM32F4xx device used in the target application
13-
* - To use or not the peripheral's drivers in application code(i.e.
14-
* code will be based on direct access to peripheral's registers
13+
* - To use or not the peripherals drivers in application code(i.e.
14+
* code will be based on direct access to peripherals registers
1515
* rather than drivers API), this option is controlled by
1616
* "#define USE_HAL_DRIVER"
1717
*
1818
******************************************************************************
1919
* @attention
2020
*
21-
* <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
21+
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
2222
*
2323
* Redistribution and use in source and binary forms, with or without modification,
2424
* are permitted provided that the following conditions are met:
@@ -79,7 +79,7 @@
7979
!defined (STM32F401xC) && !defined (STM32F401xE) && !defined (STM32F410Tx) && !defined (STM32F410Cx) && \
8080
!defined (STM32F410Rx) && !defined (STM32F411xE) && !defined (STM32F446xx) && !defined (STM32F469xx) && \
8181
!defined (STM32F479xx) && !defined (STM32F412Cx) && !defined (STM32F412Rx) && !defined (STM32F412Vx) && \
82-
!defined (STM32F412Zx)
82+
!defined (STM32F412Zx) && !defined (STM32F413xx) && !defined (STM32F423xx)
8383
/* #define STM32F405xx */ /*!< STM32F405RG, STM32F405VG and STM32F405ZG Devices */
8484
/* #define STM32F415xx */ /*!< STM32F415RG, STM32F415VG and STM32F415ZG Devices */
8585
/* #define STM32F407xx */ /*!< STM32F407VG, STM32F407VE, STM32F407ZG, STM32F407ZE, STM32F407IG and STM32F407IE Devices */
@@ -103,9 +103,12 @@
103103
/* #define STM32F479xx */ /*!< STM32F479AI, STM32F479II, STM32F479BI, STM32F479NI, STM32F479AG, STM32F479IG, STM32F479BG
104104
and STM32F479NG Devices */
105105
/* #define STM32F412Cx */ /*!< STM32F412CEU and STM32F412CGU Devices */
106-
#define STM32F412Zx /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
106+
/* #define STM32F412Zx */ /*!< STM32F412ZET, STM32F412ZGT, STM32F412ZEJ and STM32F412ZGJ Devices */
107107
/* #define STM32F412Vx */ /*!< STM32F412VET, STM32F412VGT, STM32F412VEH and STM32F412VGH Devices */
108108
/* #define STM32F412Rx */ /*!< STM32F412RET, STM32F412RGT, STM32F412REY and STM32F412RGY Devices */
109+
#define STM32F413xx /*!< STM32F413CH, STM32F413MH, STM32F413RH, STM32F413VH, STM32F413ZH, STM32F413CG, STM32F413MG,
110+
STM32F413RG, STM32F413VG and STM32F413ZG Devices */
111+
/* #define STM32F423xx */ /*!< STM32F423CH, STM32F423RH, STM32F423VH and STM32F423ZH Devices */
109112
#endif
110113

111114
/* Tip: To avoid modifying this file each time you need to switch between these
@@ -121,11 +124,11 @@
121124
#endif /* USE_HAL_DRIVER */
122125

123126
/**
124-
* @brief CMSIS version number V2.5.0
127+
* @brief CMSIS version number V2.6.1
125128
*/
126129
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
127-
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x05U) /*!< [23:16] sub1 version */
128-
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x00U) /*!< [15:8] sub2 version */
130+
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x06U) /*!< [23:16] sub1 version */
131+
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x01U) /*!< [15:8] sub2 version */
129132
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
130133
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
131134
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
@@ -182,6 +185,10 @@
182185
#include "stm32f412rx.h"
183186
#elif defined(STM32F412Vx)
184187
#include "stm32f412vx.h"
188+
#elif defined(STM32F413xx)
189+
#include "stm32f413xx.h"
190+
#elif defined(STM32F423xx)
191+
#include "stm32f423xx.h"
185192
#else
186193
#error "Please select first the target STM32F4xx device used in your application (in stm32f4xx.h file)"
187194
#endif

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/device/system_stm32f4xx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ extern const uint8_t APBPrescTable[8]; /*!< APB prescalers table values */
104104

105105
extern void SystemInit(void);
106106
extern void SystemCoreClockUpdate(void);
107+
extern void SetSysClock(void);
107108
/**
108109
* @}
109110
*/

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F413xH/objects.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ struct trng_s {
5555
RNG_HandleTypeDef handle;
5656
};
5757

58+
struct dac_s {
59+
DACName dac;
60+
uint8_t channel;
61+
};
62+
5863
#include "common_objects.h"
5964

6065
#ifdef __cplusplus

0 commit comments

Comments
 (0)