File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
peripherals/stm32f4/stm32f401xe Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -25,5 +25,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
25
25
{ MP_ROM_QSTR (MP_QSTR_A10 ), MP_ROM_PTR (& pin_PA10 ) },
26
26
{ MP_ROM_QSTR (MP_QSTR_B9 ), MP_ROM_PTR (& pin_PB09 ) },
27
27
{ MP_ROM_QSTR (MP_QSTR_B8 ), MP_ROM_PTR (& pin_PB08 ) },
28
+
29
+ { MP_ROM_QSTR (MP_QSTR_BTN ), MP_ROM_PTR (& pin_PC13 ) },
30
+ { MP_ROM_QSTR (MP_QSTR_LED1 ), MP_ROM_PTR (& pin_PB02 ) },
31
+ { MP_ROM_QSTR (MP_QSTR_LED2 ), MP_ROM_PTR (& pin_PB12 ) },
28
32
};
29
33
MP_DEFINE_CONST_DICT (board_module_globals , board_module_globals_table );
Original file line number Diff line number Diff line change 25
25
* THE SOFTWARE.
26
26
*/
27
27
#include "stm32f4xx_hal.h"
28
+ #include "py/mpconfig.h"
28
29
29
30
void stm32f4_peripherals_clocks_init (void ) {
30
31
//System clock init
@@ -44,7 +45,7 @@ void stm32f4_peripherals_clocks_init(void) {
44
45
RCC_OscInitStruct .HSEState = RCC_HSE_ON ;
45
46
RCC_OscInitStruct .PLL .PLLState = RCC_PLL_ON ;
46
47
RCC_OscInitStruct .PLL .PLLSource = RCC_PLLSOURCE_HSE ;
47
- RCC_OscInitStruct .PLL .PLLM = 12 ;
48
+ RCC_OscInitStruct .PLL .PLLM = BOARD_OSC_DIV ;
48
49
RCC_OscInitStruct .PLL .PLLN = 336 ;
49
50
RCC_OscInitStruct .PLL .PLLP = RCC_PLLP_DIV4 ;
50
51
RCC_OscInitStruct .PLL .PLLQ = 7 ;
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ void stm32f4_peripherals_gpio_init(void) {
38
38
__HAL_RCC_GPIOH_CLK_ENABLE ();
39
39
40
40
//Never reset pins
41
- never_reset_pin_number (2 ,13 ); //PC13 anti tamp
42
41
never_reset_pin_number (2 ,14 ); //PC14 OSC32_IN
43
42
never_reset_pin_number (2 ,15 ); //PC15 OSC32_OUT
44
43
never_reset_pin_number (0 ,13 ); //PA13 SWDIO
You can’t perform that action at this time.
0 commit comments