Commit Graph

10 Commits

Author SHA1 Message Date
Damien George
3d5d76fb73 stm32/main: Allow a board to configure the label of the flash FS.
To change the default label a board should define:

    #define MICROPY_HW_FLASH_FS_LABEL "label"
2018-04-11 16:52:22 +10:00
Damien George
cf9fc7346d stm32: Allow a board to configure the HSE in bypass mode.
To use HSE bypass mode the board should define:

    #define MICROPY_HW_CLK_USE_BYPASS (1)

If this is not defined, or is defined to 0, then HSE oscillator mode is
used.
2018-04-11 16:46:47 +10:00
Damien George
a7ebac2eae stm32/can: Allow CAN pins to be configured per board.
This patch allows a given board to configure which pins are used for the
CAN peripherals, in a similar way to all the other bus peripherals (I2C,
UART, SPI).  To enable CAN on a board the mpconfigboard.h file should
define (for example):

    #define MICROPY_HW_CAN1_TX (pin_B9)
    #define MICROPY_HW_CAN1_RX (pin_B8)
    #define MICROPY_HW_CAN2_TX (pin_B13)
    #define MICROPY_HW_CAN2_RX (pin_B12)

And the board config file should no longer define MICROPY_HW_ENABLE_CAN.
2018-04-11 16:35:24 +10:00
Damien George
b833f170c3 stm32/main: Only update reset_mode if board doesn't use a bootloader.
If the board is configured to use a bootloader then that bootloader will
pass through the reset_mode.
2018-03-29 16:16:58 +11:00
Damien George
626d6c9756 stm32/storage: Introduce MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE cfg.
This config variable controls whether to support storage on the internal
flash of the MCU.  It is enabled by default and should be explicitly
disabled by boards that don't want internal flash storage.
2018-03-10 00:59:43 +11:00
iabdalkader
61d463ad07 stm32/mpconfigboard_common: Add STM32H7 common configuration. 2018-03-09 15:12:44 +11:00
Damien George
989fc16162 stm32: Move MCU-specific cfg from mphalport.h to mpconfigboard_common.h.
It's cleaner to have all the MCU-specific configuration in one location,
not least to help with adding support for a new MCU series.
2018-02-23 16:54:07 +11:00
Damien George
60b0982bb2 stm32: Add board config option to enable/disable the ADC.
The new option is MICROPY_HW_ENABLE_ADC and is enabled by default.
2018-02-22 14:22:45 +11:00
Damien George
5c320bd0b0 stm32: Introduce MICROPY_HW_ENABLE_USB and clean up USB config.
This patch allows to completely compile-out support for USB, and no-USB is
now the default.  If a board wants to enable USB it should define:

    #define MICROPY_HW_ENABLE_USB (1)

And then one or more of the following to select the USB PHY:

    #define MICROPY_HW_USB_FS (1)
    #define MICROPY_HW_USB_HS (1)
    #define MICROPY_HW_USB_HS_IN_FS (1)
2018-02-13 18:51:08 +11:00
Damien George
2d5bab46be stm32: Add mpconfigboard_common.h with common/default board settings.
This file mirrors py/mpconfig.h but for board-level config options.  It
provides a default configuration, to be overridden by a specific
mpconfigboard.h file, as well as setting up certain macros to automatically
configure a board.
2018-02-09 18:40:13 +11:00