summaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2017-09-06ports: Make new ports/ sub-directory and move all ports there.Damien George
This is to keep the top-level directory clean, to make it clear what is core and what is a port, and to allow the repository to grow with new ports in a sustainable way.
2017-09-05stmhal/timer: Remove unnecessary include of USB header files.Damien George
2017-09-04stmhal: Fix clock initialisation of L4 MCUs.Tobias Badertscher
There are 2 changes: - remove early initialisation of LSE and replaced it by LSEDRIVE config (there is no reason to call HAL_RCC_OscConfig twice). - add initialisation of the variables PLLSAI1Source and PLLSAI1M as they are needed in Cube HAL 1.8.1.
2017-08-30all: Convert remaining "mp_uint_t n_args" to "size_t n_args".Damien George
This is to have consistency across the whole repository.
2017-08-29stmhal: Update to new STM Cube HAL library.Damien George
This upgrades the HAL to the versions: - F4 V1.16.0 - F7 V1.7.0 - L4 V1.8.1 The main changes were in the SD card driver. The vendor changed the SD read/write functions to accept block number intead of byte address, so there is no longer any need for a custom patch for this in stm32lib. The CardType values also changed, so pyb.SDCard().info() will return different values for the 3rd element of the tuple, but this function was never documented.
2017-08-29stmhal/Makefile: Automatically fetch stm32lib submodule if needed.Damien George
2017-08-29stmhal: Remove cmsis and hal files, they are now a submodule.Damien George
2017-08-29stmhal/Makefile: Use lib/stm32lib instead of local cmsis and hal files.Damien George
2017-08-29drivers/memory/spiflash: Change from hard-coded soft SPI to generic SPI.Damien George
The SPI flash driver now supports using an arbitrary SPI object to communicate with the flash chip, and in particular can use a hardware SPI peripheral.
2017-08-24stmhal/boards/pllvalues.py: Make script work with both Python 2 and 3.Damien George
2017-08-24stmhal/Makefile: Use GEN_PINS_HDR var instead of writing it explicitly.Damien George
2017-08-24stmhal/modmachine: For F7 MCU, save power by reducing internal volt reg.Damien George
2017-08-24stmhal: Compute PLL freq table during build instead of at run time.Damien George
Allows for simpler, smaller and faster code at run time when selecting the boards frequency, and allows more customisation opportunities for the PLL values depending on the target MCU.
2017-08-23stmhal/modmachine: Improve support for sleep/deepsleep on F7 MCUs.Damien George
Changes for F7 are: - machine.reset_cause() now reports DEEPSLEEP_RESET correctly; - machine.sleep() is further optimised to reduce power consumption; - machine.deepsleep() is now implemented and working.
2017-08-23stmhal/modmachine: Make machine.bootloader() work when MPU is enabled.Damien George
2017-08-21all: Make static dicts use mp_rom_map_elem_t type and MP_ROM_xxx macros.Damien George
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-08-11all: Make use of $(TOP) variable in Makefiles, instead of "..".Damien George
$(TOP) is defined in py/mkenv.mk and should be used to refer to the top level of this repository.
2017-08-02py,extmod,stmhal: Use "static inline" for funcs that should be inline.Damien George
"STATIC inline" can expand to "inline" if STATIC is defined to nothing, and this case can lead to link errors.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-19all: Remove trailing spaces, per coding conventions.Damien George
2017-07-19stmhal: Clean up USB CDC/MSC files and remove commented-out code.Damien George
2017-07-18all: Unify header guard usage.Alexander Steffen
The code conventions suggest using header guards, but do not define how those should look like and instead point to existing files. However, not all existing files follow the same scheme, sometimes omitting header guards altogether, sometimes using non-standard names, making it easy to accidentally pick a "wrong" example. This commit ensures that all header files of the MicroPython project (that were not simply copied from somewhere else) follow the same pattern, that was already present in the majority of files, especially in the py folder. The rules are as follows. Naming convention: * start with the words MICROPY_INCLUDED * contain the full path to the file * replace special characters with _ In addition, there are no empty lines before #ifndef, between #ifndef and one empty line before #endif. #endif is followed by a comment containing the name of the guard macro. py/grammar.h cannot use header guards by design, since it has to be included multiple times in a single C file. Several other files also do not need header guards as they are only used internally and guaranteed to be included only once: * MICROPY_MPHALPORT_H * mpconfigboard.h * mpconfigport.h * mpthreadport.h * pin_defs_*.h * qstrdefs*.h
2017-07-14stmhal/servo: Don't compile servo code when it's not enabled.Damien George
2017-07-14stmhal/pin_named_pins: Remove unreachable print function.Damien George
There are never any instances of these objects so there is no need to have a print function.
2017-07-14stmhal/servo: Make pyb.Servo(n) map to Pin('Xn') on all MCUs.Damien George
Prior to this patch Servo numbers 1, 2, 3, 4 mapped to pins X3, X4, X1, X2 on PYBLITE which doesn't match the standard PYB mapping. This patch fixes the mapping.
2017-07-12stmhal: Reduce size of ESPRUINO_PICO build so it fits in flash.Damien George
The default frozen modules are no longer included (but users can still specify their own via FROZEN_MPY_DIR), complex numbers are disabled and so are the native, viper and asm_thumb emitters. Users needing these features can tune the build to disable other things.
2017-07-04stmhal/boards/NUCLEO_F429ZI: Change USB config from HS to FS peripheral.Damien George
This dev board only has a single USB connector, connected to the FS peripheral.
2017-07-03stmhal: Clean up some header includes.Damien George
2017-07-03stmhal/boards: Add configuration files for NUCLEO_F429ZI.Alberto Petrucci
2017-06-28stmhal/mpconfigport.h: Allow MICROPY_PY_THREAD to be overridden.Damien George
2017-06-28stmhal/Makefile: Add CFLAGS_EXTRA to CFLAGS so cmdline can add options.Damien George
2017-06-28stmhal/Makefile: Rename FLOAT_IMPL to MICROPY_FLOAT_IMPL to match C nameDamien George
The name used in py/mpconfig.h is MICROPY_FLOAT_IMPL so rename this Makefile variable to mirror that.
2017-06-28stmhal/Makefile: Use hardware double-prec FP for MCUs that support it.Damien George
2017-06-28stmhal/boards: Enable double-prec FP on F76x boards.Damien George
2017-06-28stmhal: Add possibility to build with double-precision floating point.Damien George
By default the firmware is built with single-precision floating point. To build a particular board using double precision instead, put the following line in the mpconfigboard.mk file: FLOAT_IMPL = double
2017-06-27stmhal/sdcard: Allow a board to customise the SDIO pins.Benjamin Weps
2017-06-26stmhal/boards/stm32f405.ld: Increase FLASH_TEXT to end of 1MiB flash.Damien George
And and FLASH_FS, and use "K" values instead of hex numbers for lengths. The increase of FLASH_TEXT is to allow more frozen bytecode for a particular user's project. It's not used for anything else.
2017-06-22stmhal/modules: Provide sym-link to onewire.py driver.Damien George
2017-06-22stmhal: Make available the _onewire module, for low-level bus control.Damien George
2017-06-22stmhal: Add "quiet timing" enter/exit functions.Damien George
They disable all interrupts except for SysTick and are useful for doing certain low-level timing operations.
2017-06-15stmhal: Move pybstdio.c to lib/utils/sys_stdio_mphal.c for common use.Damien George
It provides sys.stdin, sys.stdout, sys.stderr for bare-metal targets based on mp_hal functions.
2017-06-15stmhal: Add .value() method to Switch object, to mirror Pin and Signal.Damien George
2017-06-15stmhal: Add initial implementation of Pin.irq() method.Damien George
This method follows the new HW API and allows to set a hard or soft IRQ callback when a Pin has a level change. It still remains to make this method return a IRQ object.
2017-06-15stmhal: Make error messages more consistent across peripherals.Damien George
2017-06-15all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.Damien George
2017-06-14stmhal/mpconfigport.h: Remove config of PY_THREAD_GIL to use default.Damien George
The default for the GIL is to enable it if threading is enabled, and this is the recommended way to use threading with the stmhal port.
2017-06-08stmhal/usbdev: For MSC implement SCSI SYNCHRONIZE_CACHE command.Damien George
Currently just a dummy command that returns "success", but it's needed for some O/S's to correctly talk with the SCSI layer.
2017-06-07stmhal/usb: Make state for USB device private to top-level USB driver.Damien George
2017-06-07stmhal/usb: Use local USB handler variable in Start-of-Frame handler.Sylvain Pelissier