summaryrefslogtreecommitdiff
path: root/ports/stm32
AgeCommit message (Collapse)Author
2019-10-13remove ports/stm32Dan Halbert
2018-07-11WIP: after merge; before testingDan Halbert
2018-06-22stm32/boards: Add .ld and af.csv files for STM32F722.Damien George
These files can also be used for F723, F732 and F733 MCUs.
2018-06-22stm32/mboot: Add support for erase/read/write of external SPI flash.Damien George
This patch adds support to mboot for programming external SPI flash. It allows SPI flash to be programmed via a USB DFU utility in the same way that internal MCU flash is programmed.
2018-06-22stm32/qspi: Don't require data reads and writes to be a multiple of 4.Damien George
Prior to this patch the QSPI driver assumed that the length of all data reads and writes was a multiple of 4. This patch allows any length. Reads are optimised for speed by using 32-bit transfers when possible, but writes always use a byte transfer because they only use a single data IO line and are relatively slow.
2018-06-20stm32/boards/NUCLEO_F091RC: Fix TICK_INT_PRIORITY so it is highest prio.Damien George
Fixes issue #3880.
2018-06-19stm32/mboot: Define constants for reset mode cycling and timeout.Damien George
And fix timeout value so that it does actually finish with reset_mode=1.
2018-06-18stm32/spi: Fix SPI driver so it can send/recv more than 65535 bytes.Damien George
The DMA peripheral is limited to transferring 65535 elements at a time so in order to send more than that the SPI driver must split the transfers up. The user must be aware of this limit if they are relying on precise timing of the entire SPI transfer, because there might be a small delay between the split transfers. Fixes issue #3851, and thanks to @kwagyeman for the original fix.
2018-06-18stm32/can: Use MP_OBJ_ARRAY_TYPECODE_FLAG_RW where appropriate.Damien George
2018-06-18stm32/boards/NUCLEO_F091RC: Add Arduino-named pins and rename CPU pins.rolandvs
To match pin labels on other NUCLEO 64 boards.
2018-06-18stm32/boards/stm32f091_af.csv: Split labels that are multiple funcs.rolandvs
2018-06-18stm32/mboot: Adjust user-reset-mode timeout so it ends with mode=1.Damien George
If the user button is held down indefinitely (eg unintenionally, or because the GPIO signal of the user button is connected to some external device) then it makes sense to end the reset mode cycle with the default mode of 1, which executes code as normal.
2018-06-15stm32/i2cslave: Fix ordering of event callbacks in slave IRQ handler.Damien George
It's possible (at least on F4 MCU's) to have RXNE and STOPF set at the same time during a call to the slave IRQ handler. In such cases RXNE should be handled before STOPF so that all bytes are processed before i2c_slave_process_rx_end() is called.
2018-06-15stm32/i2c: Fix num_acks calculation in i2c_write for F0 and F7 MCU's.Damien George
Due to buffering of outgoing bytes on the I2C bus, detection of a NACK using the ISR_NACKF flag needs to account for the case where ISR_NACKF corresponds to the previous-to-previous byte.
2018-06-15stm32/timer: Support TIM1 on F0 MCUs.Damien George
2018-06-14drivers/memory/spiflash: Rename functions to indicate they use cache.Damien George
This patch renames the existing SPI flash API functions to reflect the fact that the go through the cache: mp_spiflash_flush -> mp_spiflash_cache_flush mp_spiflash_read -> mp_spiflash_cached_read mp_spiflash_write -> mp_spiflash_cached_write
2018-06-14stm32/boards/STM32L476DISC: Update SPI flash config for cache change.Damien George
2018-06-12stm32/Makefile: Rebuild all qstrs when any board configuration changes.Damien George
2018-06-12ports: Enable IOBase on unix, stm32, esp8266 and esp32.Damien George
It's a core feature, in particular required for user-streams with uasyncio.
2018-06-12ports: Call gc_sweep_all() when doing a soft reset.Damien George
This calls finalisers of things like files and sockets to cleanly close them.
2018-06-08stm32/mboot: Increase USB rx_buf and DFU buf sizes to full 2048 bytes.Damien George
The DFU USB config descriptor returns 0x0800=2048 for the supported transfer size, and this applies to both TX (IN) and RX (OUT). So increase the rx_buf to support this size without having a buffer overflow on received data. With this patch mboot in USB DFU mode now works with dfu-util.
2018-06-08stm32/mpconfigport.h: Enable DELATTR_SETATTR and BUILTINS_NOTIMPLEMENTEDDamien George
MICROPY_PY_DELATTR_SETATTR can now be enabled without a performance hit for classes that don't use this feature. MICROPY_PY_BUILTINS_NOTIMPLEMENTED is a minor addition that improves compatibility with CPython.
2018-06-08ports: Enable descriptors on stm32, esp8266, esp32 ports.Damien George
They are now efficient (in runtime performance) and provide a useful feature that's hard to obtain without them enabled. See issue #3644 and PR #3826 for background.
2018-06-06extmod/vfs_fat: Rename FileIO/TextIO types to mp_type_vfs_fat_XXX.Damien George
So they don't clash with other VFS implementations.
2018-06-03stm32/modnetwork: Fix arg indexing in generic ifconfig method.Damien George
2018-06-01stm32: Add network driver for Wiznet5k using MACRAW mode and lwIP.Damien George
The Wiznet5k series of chips support a MACRAW mode which allows the host to send and receive Ethernet frames directly. This can be hooked into the lwIP stack to provide a full "socket" implementation using this Wiznet Ethernet device. This patch adds support for this feature. To enable the feature one must add the following to mpconfigboard.mk, or mpconfigport.mk: MICROPY_PY_WIZNET5K = 5500 and the following to mpconfigboard.h, or mpconfigport.h: #define MICROPY_PY_LWIP (1) After wiring up the module (X5=CS, X4=RST), usage on a pyboard is: import time, network nic = network.WIZNET5K(pyb.SPI(1), pyb.Pin.board.X5, pyb.Pin.board.X4) nic.active(1) while not nic.isconnected(): time.sleep_ms(50) # needed to poll the NIC print(nic.ifconfig()) Then use the socket module as usual. Compared to using the built-in TCP/IP stack on the Wiznet module, some performance is lost in MACRAW mode: with a lot of memory allocated to lwIP buffers, lwIP gives Around 750,000 bytes/sec max TCP download, compared with 1M/sec when using the TCP/IP stack on the Wiznet module.
2018-06-01stm32/modnetwork: Provide generic implementation of ifconfig method.Damien George
All it needs is a lwIP netif to function.
2018-06-01stm32/modnetwork: Change base entry of NIC object from type to base.Damien George
mod_network_nic_type_t doesn't need to be an actual uPy type, it just needs to be an object.
2018-06-01stm32/modnetwork: Don't take netif's down when network is deinited.Damien George
It should be up to the NIC itself to decide if the network interface is removed upon soft reset. Some NICs can keep the interface up over a soft reset, which improves usability of the network.
2018-05-30stm32/flash: Increase H7 flash size to full 2MiB.Damien George
2018-05-30stm32/boards: Ensure USB OTG power is off for NUCLEO_F767ZI.rolandvs
And update the GPIO init for NUCLEO_H743ZI to consistently use the mphal functions.
2018-05-29stm32/boards: Split combined alt-func labels and fix some other errors.rolandvs
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-28stm32/README: Update to include STM32F0 in list of supported MCUs.Damien George
2018-05-28stm32/boards: Add NUCLEO_F091RC board configuration files.Damien George
2018-05-28stm32/boards: Add alt-func CSV list and linker script for STM32F091.Damien George
2018-05-28stm32: Add support for STM32F0 MCUs.Damien George
2018-05-28stm32/boards: Add startup_stm32f0.s for STM32F0 MCUs.Damien George
Sourced from STM32Cube_FW_F0_V1.9.0.
2018-05-28stm32: Allow a board to disable MICROPY_VFS_FAT.Damien George
2018-05-28stm32/timer: Make timer_get_source_freq more efficient by using regs.Damien George
Use direct register access to get the APB clock divider. This reduces code size and makes the code more efficient.
2018-05-28stm32: Add support for Cortex-M0 CPUs.Damien George
2018-05-28stm32: Allow to have no storage support if there are no block devices.Damien George
If no block devices are defined by a board then storage support will be disabled. This means there is no filesystem provided by either the internal flash or external SPI flash. But the VFS system can still be enabled and filesystems provided on external devices like an SD card.
2018-05-28stm32/usb: Guard USB device code with #if for whether USB is enabled.Damien George
With this change, all the USB source code can now be passed through the compiler even if the MCU does not have a USB peripheral.
2018-05-24stm32: Add new component, the mboot bootloader.Damien George
Mboot is a custom bootloader for STM32 MCUs. It can provide a USB DFU interface on either the FS or HS peripherals, as well as a custom I2C bootloader interface.
2018-05-24stm32: Add low-level hardware I2C slave driver.Damien George
2018-05-24stm32: Remove unneeded HTML release notes from usbdev and usbhost dirs.Damien George
These files provide no additional information, all the version and license information is captured in the relevant files in these subdirectories. Thanks to @JoeSc for the original patch.
2018-05-22ports: Enable MICROPY_PY_BUILTINS_ROUND_INT on selected ports.Damien George
2018-05-22stm32/main: Use consistent indenting of macro #if's.Damien George
2018-05-22stm32/rng: Use Yasmarang for rng_get() if MCU doesn't have HW RNG.Damien George
2018-05-21stm32: Integrate lwIP as implementation of usocket module.Damien George
This patch allows to use lwIP as the implementation of the usocket module, instead of the existing socket-multiplexer that delegates the entire TCP/IP layer to the NIC itself. This is disabled by default, and enabled by defining MICROPY_PY_LWIP to 1. When enabled, the lwIP TCP/IP stack will be included in the build with default settings for memory usage and performance (see lwip_inc/lwipopts.h). It is then up to a particular NIC to register itself with lwIP using the standard lwIP netif API.
2018-05-21stm32/rtc: Don't try to set SubSeconds value on RTC.Damien George
The hardware doesn't allow it, instead the value is reset to 255 upon setting the other calendar/time values.