aboutsummaryrefslogtreecommitdiff
path: root/ports/stm32/flashbdev.c
AgeCommit message (Collapse)Author
2020-06-30stm32/flash: Update flash_get_sector_info to return -1 on invalid addr.Andrew Leech
So the caller can tell when an invalid address is used and can take appropriate action.
2020-05-15stm32: Add support for F412 MCUs.Thomas Roberts
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2019-11-26stm32/storage: Make pyb.Flash configurable, and support ext block proto.Damien George
The pyb.Flash() class can now be used to construct objects which reference sections of the flash storage, starting at a certain offset and going for a certain length. Such objects also support the extended block protocol. The signature for the constructor is: pyb.Flash(start=-1, len=-1).
2019-07-25stm32/flashbdev: Support internal filesystem on STM32F722/23/32/33.badlyby
2019-07-17stm32: Add initial support for STM32WBxx MCUs.Damien George
This new series of MCUs is similar to the L4 series with an additional Cortex-M0 coprocessor. The firmware for the wireless stack must be managed separately and MicroPython does not currently interface to it. Supported features so far include: RTC, UART, USB, internal flash filesystem.
2019-07-08stm32: Add support for STM32L452 MCUs.Chris Mason
2019-05-02stm32: Add support for F413 MCUs.Chris Mason
Includes: - Support for CAN3. - Support for UART9 and UART10. - stm32f413xg.ld and stm32f413xh.ld linker scripts. - stm32f413_af.csv alternate function mapping. - startup_stm32f413xx.s because F413 has different interrupt vector table. - Memory configuration with: 240K filesystem, 240K heap, 16K stack.
2018-12-06stm32: Add peripheral support for STM32L432.boochow
The L432 does not have: GPIOD, TIM3, SPI2, ADC dual mode operation, 2-banks flash.
2018-11-26stm32/flashbdev: Add missing include for irq.h.Michael Paul Coder
This is required for mboot to build.
2018-09-20stm32: Add support for STM32F765xx MCUs.Andrew Leech
This part is functionally similar to STM32F767xx (they share a datasheet) so support is generally comparable. When adding board support the stm32f767_af.csv and stm32f767.ld should be used.
2018-09-12stm32/flashbdev: Protect flash writes from cache flushing and USB MSC.Damien George
2018-09-12stm32: Change flash IRQ priority from 2 to 6 to prevent preemption.Damien George
The flash-IRQ handler is used to flush the storage cache, ie write outstanding block data from RAM to flash. This is triggered by a timeout, or by a direct call to flush all storage caches. Prior to this commit, a timeout could trigger the cache flushing to occur during the execution of a read/write to external SPI flash storage. In such a case the storage subsystem would break down. SPI storage transfers are already protected against USB IRQs, so by changing the priority of the flash IRQ to that of the USB IRQ (what is done in this commit) the SPI transfers can be protected against any timeouts triggering a cache flush (the cache flush would be postponed until after the transfer finished, but note that in the case of SPI writes the timeout is rescheduled after the transfer finishes). The handling of internal flash sync'ing needs to be changed to directly call flash_bdev_irq_handler() sync may be called with the IRQ priority already raised (eg when called from a USB MSC IRQ handler).
2018-07-19stm32/flashbdev: Fix bug with L4 block cache, dereferencing block size.Peter D. Gray
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-05-18stm32: Add support for STM32L496 MCU.Tobias Badertscher
2018-05-02stm32/flash: Remove unused src parameter from flash_erase().Damien George
2018-03-27stm32/*bdev.c: Eliminate dependency on sys_tick_has_passed.Damien George
Explicitly writing out the implementation of sys_tick_has_passed makes these bdev files independent of systick.c and more reusable as a general component. It also reduces the code size slightly. The irq.h header is added to spibdev.c because it uses declarations in that file (irq.h is usually included implicitly via mphalport.h but not always).
2018-03-10stm32/storage: Introduce MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE cfg.Damien George
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-10stm32/storage: Merge all misc block-dev funcs into a single ioctl func.Damien George
It makes it cleaner, and simpler to support multiple different block devices. It also allows to easily extend a given block device with new ioctl operations.
2018-03-09stm32/flash: Add flash support for H7 MCUs.iabdalkader
2018-02-13stm32: Factor out flash and SPI block-device code to separate files.Damien George
Prior to this patch, storage.c was a combination of code that handled either internal flash or external SPI flash and exposed one of them as a block device for the local storage. It was also exposed to the USB MSC. This patch splits out the flash and SPI code to separate files, which each provide a general block-device interface (at the C level). Then storage.c just picks one of them to use as the local storage medium. The aim of this factoring is to allow to add new block devices in the future and allow for easier configurability.