Commit Graph

88 Commits

Author SHA1 Message Date
Damien George
7b2dc96251 stm32/boards/make-pins.py: Add cmdline options to support use by mboot. 2019-02-14 13:35:39 +11:00
Jolatomme
d1acca3c71 stm32/boards/NUCLEO_L476RG: Add support for RNG, DAC and CAN1.
PLLQ is changed to get CAN working, and I2C1 pins are changed to those
prescribed by the board.
2019-02-14 00:28:28 +11:00
Damien George
1669e049de stm32/boards/STM32F769DISC: Configure for use with mboot by default.
This is a good board to demonstrate the use of Mboot because it only has a
USB HS port exposed so the native ST DFU mode cannot be used.  With Mboot
this port can be used.
2019-02-07 16:28:01 +11:00
Damien George
be1b1835c3 stm32/boards/STM32F769DISC: Support the use of USB HS with external PHY. 2019-02-07 16:26:46 +11:00
Damien George
b367c425e4 stm32/boards/stm32h743_af.csv: Add ADC entries to pin capability table. 2019-02-06 13:34:53 +11:00
Damien George
02682d52ce stm32/boards/make-pins.py: Add basic support for STM32H7 ADC periphs. 2019-02-06 13:34:23 +11:00
Damien George
4bed17e786 stm32/boards/stm32f429_af.csv: Fix typos in UART defs Tx->TX and Rx->RX.
Fixes issue #4445.
2019-01-31 01:02:42 +11:00
Damien George
5146e79490 stm32/boards/NUCLEO_L432KC: Specify L4 OpenOCD config file for this MCU. 2018-12-13 13:45:16 +11:00
Damien George
59f409a787 stm32/boards: Allow OpenOCD stm_flash procedure to accept single FW img.
To support deplop-openocd on target boards that use TEXT0_ADDR only and
have their firmware in a single binary image.
2018-12-13 13:43:10 +11:00
boochow
69b7b8fa12 stm32/boards: Add NUCLEO_L432KC board configuration files. 2018-12-06 13:33:29 +11:00
boochow
1a8baad7ca stm32/boards: Add STM32L432KC chip configuration files.
The pin alternate function information is derived from ST's datasheet
https://www.st.com/resource/en/datasheet/stm32l432kc.pdf
In the datasheet, the line 2 of AF4 includes I2C2 but actually the chip
does not have I2C2 so it is removed.
2018-12-06 13:32:43 +11:00
Damien George
c040961e91 stm32/boards: Add configuration for putting mboot on PYBv1.x. 2018-12-04 23:48:18 +11:00
roland
10bddc5c28 stm32/boards/STM32F429DISC: Enable UART as secondary REPL.
The board(s) feature a VCOM through the ST-LINK, this feature is something
to keep around.
2018-12-01 17:30:48 +11:00
roland
30ed2b3cab stm32/system_stm32: Introduce configuration defines for PLL3 settings.
A board must be able to set the PLL3 values based on the HSE that it uses.
2018-11-01 13:25:47 +11:00
Damien George
d2c5496894 stm32/boards/stm32h743.ld: Fix total flash size, should be 2048k.
Fixes issue #4240.
2018-10-17 15:29:56 +11:00
Andrew Leech
338635ccc6 stm32/main: Add configuration macros for board to set heap start/end.
The macros are MICROPY_HEAP_START and MICROPY_HEAP_END, and if not defined
by a board then the default values will be used (maximum heap from SRAM as
defined by linker symbols).

As part of this commit the SDRAM initialisation is moved to much earlier in
main() to potentially make it available to other peripherals and avoid
re-initialisation on soft-reboot.  On boards with SDRAM enabled the heap
has been set to use that.
2018-10-05 17:30:18 +10:00
Damien George
4df1943948 stm32/boards/NUCLEO_F091RC: Enable USART3-8 with default pins. 2018-09-21 14:04:33 +10:00
Damien George
a5b583adfd stm32/boards/STM32F769DISC: Add optional support for external SDRAM. 2018-09-20 11:42:03 +10:00
Damien George
47550ef2cd stm32: For MCUs that have PLLSAI allow to set SYSCLK at 2MHz increments.
MCUs that have a PLLSAI can use it to generate a 48MHz clock for USB, SDIO
and RNG peripherals.  In such cases the SYSCLK is not restricted to values
that allow the system PLL to generate 48MHz, but can be any frequency.
This patch allows such configurability for F7 MCUs, allowing the SYSCLK to
be set in 2MHz increments via machine.freq().  PLLSAI will only be enabled
if needed, and consumes about 1mA extra.  This fine grained control of
frequency is useful to get accurate SPI baudrates, for example.
2018-09-11 16:42:57 +10:00
roland
67ee4e2401 stm32/boards/STM32L476DISC: Enable external RTC xtal to get RTC working. 2018-09-11 15:23:19 +10:00
forester3
02fbb0a455 stm32/boards/STM32F7DISC: Enable onboard SDRAM.
The default SYSCLK frequency is reduced to 192MHz because SDRAM requires it
to be 200MHz or less.
2018-08-14 16:04:10 +10:00
forester3
502c410214 stm32/boards/STM32F429DISC: Add burst len and autorefresh to SDRAM cfg.
To align with recent changes to sdram.c.
2018-08-14 16:03:13 +10:00
Andrew Leech
434975defa stm32/boards/STM32F429DISC: Enable onboard SDRAM. 2018-07-23 23:16:32 +10:00
Andrew Leech
4343c9330e stm32: Add method for statically configuring pin alternate function.
Works with pins declared normally in mpconfigboard.h, eg. (pin_XX), as well
as (pyb_pin_XX).

Provides new mp_hal_pin_config_alt_static(pin_obj, mode, pull, fn_type)
function declared in pin_static_af.h to allow configuring pin alternate
functions by name at compile time.
2018-07-20 14:03:21 +10:00
Peter D. Gray
a8736e5c36 stm32/flashbdev: Fix bug with L4 block cache, dereferencing block size.
The code was dereferencing 0x800 and loading a value from there, trying to
use a literal value (not address) defined in the linker script
(_ram_fs_cache_block_size) which was 0x800.
2018-07-19 12:15:34 +10:00
Damien George
a2ac7e4fc9 stm32/boards: Add .ld and af.csv files for STM32F722.
These files can also be used for F723, F732 and F733 MCUs.
2018-06-22 15:39:10 +10:00
Damien George
561ae9a91b stm32/boards/NUCLEO_F091RC: Fix TICK_INT_PRIORITY so it is highest prio.
Fixes issue #3880.
2018-06-20 12:24:18 +10:00
rolandvs
ca2b1d6b36 stm32/boards/NUCLEO_F091RC: Add Arduino-named pins and rename CPU pins.
To match pin labels on other NUCLEO 64 boards.
2018-06-18 13:06:27 +10:00
rolandvs
0d3de68669 stm32/boards/stm32f091_af.csv: Split labels that are multiple funcs. 2018-06-18 13:05:24 +10:00
Damien George
335d26b27d stm32/boards/STM32L476DISC: Update SPI flash config for cache change. 2018-06-14 16:52:56 +10:00
rolandvs
958fa74521 stm32/boards: Ensure USB OTG power is off for NUCLEO_F767ZI.
And update the GPIO init for NUCLEO_H743ZI to consistently use the mphal
functions.
2018-05-30 09:51:19 +10:00
rolandvs
50bc34d4a4 stm32/boards: Split combined alt-func labels and fix some other errors.
Pins with multiple alt-funcs for the same peripheral (eg USART_CTS_NSS)
need to be split into individual alt-funcs for make-pins.py to work
correctly.

This patch changes the following:
- Split `..._CTS_NSS` into `..._CTS/..._NSS`
- Split `..._RTS_DE` into `..._RTS/..._DE`
- Split `JTDO_SWO` into `JTDO/TRACESWO` for consistency
- Fixed `TRACECK` to `TRACECLK` for consistency
2018-05-29 21:37:49 +10:00
Damien George
e681372017 stm32/boards: Add NUCLEO_F091RC board configuration files. 2018-05-28 21:49:49 +10:00
Damien George
1163400039 stm32/boards: Add alt-func CSV list and linker script for STM32F091. 2018-05-28 21:49:49 +10:00
Damien George
4a7d157a5b stm32/boards: Add startup_stm32f0.s for STM32F0 MCUs.
Sourced from STM32Cube_FW_F0_V1.9.0.
2018-05-28 21:49:49 +10:00
Tobias Badertscher
769e37b646 stm32/boards: Add config files for new board, STM32L496GDISC. 2018-05-18 22:39:49 +10:00
Tobias Badertscher
4005c63571 stm32/boards: Add board ld and af.csv files for STM32L496 MCU. 2018-05-18 22:39:44 +10:00
Tobias Badertscher
708cdb6276 stm32: Add support for STM32L496 MCU. 2018-05-18 22:37:30 +10:00
Ryan Shaw
b9ff46f1ed stm32: Enable UART7/8 on F4 series that have these peripherals. 2018-05-16 11:55:07 +10:00
Damien George
68f4cba3d2 stm32/boards: Update pins.csv to include USB pins where needed. 2018-05-01 17:38:51 +10:00
iabdalkader
28c9824c51 stm32/boards/NUCLEO_H743ZI: Enable ADC peripheral. 2018-05-01 15:39:03 +10:00
Damien George
c0dd9be606 stm32/boards/NUCLEO_H743ZI: Use priority 0 for SysTick IRQ.
This follows how all other boards are configured.
2018-04-27 15:16:45 +10:00
iabdalkader
d870a4e835 stm32/boards/NUCLEO_H743ZI: Enable RNG for this board. 2018-04-23 16:43:16 +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
0041396f05 stm32/pin: In pin AF object, remove union of periph ptr types.
The individual union members (like SPI, I2C) are never used, only the
generic "reg" entry is.  And the union names can clash with macro
definitions in the HAL so better to remove them.
2018-04-11 16:14:58 +10:00
iabdalkader
e1e49adb86 stm32/boards/NUCLEO_H743ZI: Enable DAC peripheral. 2018-04-10 14:21:26 +10:00
Damien George
7e28212352 stm32/boards/STM32L476DISC: Update to not take the address of pin objs. 2018-03-28 16:29:55 +11:00
Damien George
2dca693c24 stm32: Change pin_X and pyb_pin_X identifiers to be pointers to objects.
Rather than pin objects themselves.  The actual object is now pin_X_obj and
defines are provided so that pin_X is &pin_X_obj.  This makes it so that
code that uses pin objects doesn't need to know if they are literals or
objects (that need pointers taken) or something else.  They are just
entities that can be passed to the map_hal_pin_xxx functions.  This mirrors
how the core handles constant objects (eg mp_const_none which is
&mp_const_none_obj) and allows for the possibility of different
implementations of the pin layer.

For example, prior to this patch there was the following:

    extern const pin_obj_t pin_A0;
    #define pyb_pin_X1 pin_A0
    ...
    mp_hal_pin_high(&pin_A0);

and now there is:

    extern const pin_obj_t pin_A0_obj;
    #define pin_A0 (&pin_A0_obj)
    #define pyb_pin_X1 pin_A0
    ...
    mp_hal_pin_high(pin_A0);

This patch should have minimal effect on board configuration files.  The
only change that may be needed is if a board has .c files that configure
pins.
2018-03-28 16:29:50 +11:00
iabdalkader
cf1d6df05a stm32/boards/NUCLEO_H743ZI: Enable SD card support. 2018-03-28 13:25:00 +11:00
Damien George
1efe6a0316 stm32/boards/NUCLEO_H743ZI: Update to build with new linker management. 2018-03-28 13:20:48 +11:00