File tree Expand file tree Collapse file tree 6 files changed +18
-59
lines changed
boards/stm32f746g_discovery Expand file tree Collapse file tree 6 files changed +18
-59
lines changed Original file line number Diff line number Diff line change 50
50
#define CPY_CLK_FLASH_LATENCY (FLASH_LATENCY_6)
51
51
#define CPY_CLK_USB_USES_AUDIOPLL (1)
52
52
53
- // Obtain I2C timing values for F7 and H7 boards from ST CubeMX
54
- #define CPY_I2CFAST_TIMINGR 0x00401959
55
- #define CPY_I2CSTANDARD_TIMINGR 0x00C0EAFF
56
-
57
53
#define BOARD_HSE_SOURCE (RCC_HSE_BYPASS) // ST boards use the STLink clock signal
58
54
#define BOARD_HAS_LOW_SPEED_CRYSTAL (1)
59
55
Original file line number Diff line number Diff line change 33
33
#include "shared-bindings/microcontroller/__init__.h"
34
34
#include "supervisor/shared/translate.h"
35
35
#include "common-hal/microcontroller/Pin.h"
36
- #include "clocks.h"
36
+
37
+ // I2C timing specs for the H7 and F7
38
+ // Configured for maximum possible clock settings for the family
39
+ #if (CPY_STM32F7 )
40
+ #ifndef CPY_I2CFAST_TIMINGR
41
+ #define CPY_I2CFAST_TIMINGR 0x6000030D
42
+ #endif
43
+ #ifndef CPY_I2CSTANDARD_TIMINGR
44
+ #define CPY_I2CSTANDARD_TIMINGR 0x20404768
45
+ #endif
46
+ #elif (CPY_STM32H7 )
47
+ #ifndef CPY_I2CFAST_TIMINGR
48
+ #define CPY_I2CFAST_TIMINGR 0x00B03FDB
49
+ #endif
50
+ #ifndef CPY_I2CSTANDARD_TIMINGR
51
+ #define CPY_I2CSTANDARD_TIMINGR 0x307075B1
52
+ #endif
53
+ #endif
37
54
38
55
// Arrays use 0 based numbering: I2C1 is stored at index 0
39
56
#define MAX_I2C 4
Original file line number Diff line number Diff line change 24
24
* THE SOFTWARE.
25
25
*/
26
26
27
- // F4 Series
28
- #ifdef STM32F401xE
29
- #include "stm32f4/stm32f401xe/clocks.h"
30
- #endif
31
- #ifdef STM32F411xE
32
- #include "stm32f4/stm32f411xe/clocks.h"
33
- #endif
34
- #ifdef STM32F412Zx
35
- #include "stm32f4/stm32f412zx/clocks.h"
36
- #endif
37
- #ifdef STM32F405xx
38
- #include "stm32f4/stm32f405xx/clocks.h"
39
- #endif
40
- #ifdef STM32F407xx
41
- #include "stm32f4/stm32f407xx/clocks.h"
42
- #endif
43
-
44
- // F7 Series
45
- #ifdef STM32F746xx
46
- #include "stm32f7/stm32f746xx/clocks.h"
47
- #endif
48
- #ifdef STM32F767xx
49
- #include "stm32f7/stm32f767xx/clocks.h"
50
- #endif
51
-
52
- // H7 Series
53
- #ifdef STM32H743xx
54
- #include "stm32h7/stm32h743xx/clocks.h"
55
- #endif
56
-
57
27
void stm32_peripherals_clocks_init (void );
Original file line number Diff line number Diff line change 61
61
#ifndef BOARD_HSE_SOURCE
62
62
#define BOARD_HSE_SOURCE (RCC_HSE_ON)
63
63
#endif
64
-
65
- // Obtain I2C timing values for F7 and H7 boards from ST CubeMX
66
- #ifndef CPY_I2CFAST_TIMINGR
67
- #define CPY_I2CFAST_TIMINGR 0x6000030D
68
- #endif
69
- #ifndef CPY_I2CSTANDARD_TIMINGR
70
- #define CPY_I2CSTANDARD_TIMINGR 0x20404768
71
- #endif
Original file line number Diff line number Diff line change 61
61
#ifndef BOARD_HSE_SOURCE
62
62
#define BOARD_HSE_SOURCE (RCC_HSE_ON)
63
63
#endif
64
-
65
- // Obtain I2C timing values for F7 and H7 boards from ST CubeMX
66
- #ifndef CPY_I2CFAST_TIMINGR
67
- #define CPY_I2CFAST_TIMINGR 0x6000030D
68
- #endif
69
- #ifndef CPY_I2CSTANDARD_TIMINGR
70
- #define CPY_I2CSTANDARD_TIMINGR 0x20404768
71
- #endif
Original file line number Diff line number Diff line change 68
68
#ifndef BOARD_HSE_SOURCE
69
69
#define BOARD_HSE_SOURCE (RCC_HSE_ON)
70
70
#endif
71
-
72
- // Obtain I2C timing values for F7 and H7 boards from ST CubeMX
73
- #ifndef CPY_I2CFAST_TIMINGR
74
- #define CPY_I2CFAST_TIMINGR 0x00B03FDB
75
- #endif
76
- #ifndef CPY_I2CSTANDARD_TIMINGR
77
- #define CPY_I2CSTANDARD_TIMINGR 0x307075B1
78
- #endif
You can’t perform that action at this time.
0 commit comments