aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2016-11-16stmhal: Update HALCOMMITS due to change to hal.Damien George
2016-11-16stmhal/make-stmconst.py: Add support for files with invalid utf8 bytes.Damien George
2016-11-16stmhal/mphalport.h: use single GPIOx->BSRR registerKrzysztof Blazewicz
2016-11-16stmhal/hal: do not include <stdio.h> in HAL headersKrzysztof Blazewicz
stdio.h was included in all HAL files only to provide definition of NULL symbol "stdio.h" includes "types.h" which contains some conflicting definitions with "drivers/cc3000/inc/socket.h"
2016-11-16stmhal/i2c: provide custom IRQ handlersKrzysztof Blazewicz
Use custom handlers providing minimal required functionality because those provided by ST increase code size by almost 2 KiB.
2016-11-16stmhal/can: clear FIFO flags in IRQ handlerKrzysztof Blazewicz
HAL Driver before v1.4.2 had a bug which caused clearing all pending flags in MSR, TSR, RF0R and RF1R instead of only the requested one. This is why micropython got away without explicitly clearing flags in IRQ handler.
2016-11-16stmhal/dma: mark DMA sate as READY even if HAL_DMA_Init is skippedKrzysztof Blazewicz
Current version of HAL drivers checks if `hdma->State == HAL_DMA_STATE_READY` before executing some functions.
2016-11-16stmhal/dma: precalculate register base and bitshift on handle initKrzysztof Blazewicz
Current version of HAL drivers optimize IRQ handler by using precalculated DMA register address and stream bitshift instead of calculating it on every interrupt. Since we skip call to `HAL_DMA_Init` on reused DMA, fields StreamBaseAddress and StreamIndex of DMA handle are not initialized and thus leads to SegFault in `DMA_IRQHandler`. HAL_DMA_Init is a big routine and we do not need to call it on each use of DMA (ex.: series of I2C operations) and DMA_CalcBaseAndBitshift is really small and releasing it increases code size by only 8 bytes.
2016-11-16stmhal/i2c: handle I2C IRQsKrzysztof Blazewicz
This is required by HAL Driver for error handling since v1.5.0
2016-11-16stmhal/make-stmconst.py: fix regex's to work with current CMSISKrzysztof Blazewicz
CMSIS v2.5.0 removed all uint32_t casts and uses only Misra Cast (U)
2016-11-16stmhal/boards: configure all F4 boards to work with new HALKrzysztof Blazewicz
changes include: * use single GPIO.BSRR instead of BSRRH and BSRRL * change HSE_STARTUP_TIMEOUT to 100 ms * define LSE_STARTUP_TIMEOUT to 5 s
2016-11-16stmhal/hal/sd: reapply HAL commit 09de030 for f4Krzysztof Blazewicz
2016-11-16stmhal/hal/rcc: reapply HAL commit c568a2b for f4Krzysztof Blazewicz
2016-11-16stmhal/hal: reapply HAL commit 9db719b for f4Krzysztof Blazewicz
2016-11-16stmhal/hal/sd: reapply HAL commit 1d7fb82 for f4Krzysztof Blazewicz
2016-11-16stmhal/hal/i2c: reapply HAL commit ea040a4 for f4Krzysztof Blazewicz
2016-11-16stmhal: apply STM32CubeF4 v1.13.1 patch - upgrade HAL driver to v1.5.2Krzysztof Blazewicz
2016-11-16stmhal: upgrade to STM32CubeF4 v1.13.0 - HAL v1.5.1Krzysztof Blazewicz
2016-11-16stmhal: upgrade to STM32CubeF4 v1.13.0 - CMSIS/Device 2.5.1Krzysztof Blazewicz
2016-11-16py/lexer: Provide generic mp_lexer_new_from_file based on mp_reader.Damien George
If a port defines MICROPY_READER_POSIX or MICROPY_READER_FATFS then lexer.c now provides an implementation of mp_lexer_new_from_file using the mp_reader_new_file function.
2016-11-16py: Factor out persistent-code reader into separate files.Damien George
Implementations of persistent-code reader are provided for POSIX systems and systems using FatFS. Macros to use these are MICROPY_READER_POSIX and MICROPY_READER_FATFS respectively. If an alternative implementation is needed then a port can define the function mp_reader_new_file.
2016-11-14all: Remove readall() method, which is equivalent to read() w/o args.Paul Sokolovsky
Its addition was due to an early exploration on how to add CPython-like stream interface. It's clear that it's not needed and just takes up bytes in all ports.
2016-11-11stmhal: Rename mp_hal_pin_set_af to _config_alt, to simplify alt config.Damien George
This way the caller doesn't need to initialise a big GPIO_InitTypeDef struct, and HAL_GPIO_Init is no longer called.
2016-11-11stmhal/i2c: Reset the I2C peripheral if there was an error on the bus.Damien George
If an I2C send/recv fails then the peripheral is now checked to see if it's in a "stuck" state waiting for the stop bit, and if so then it is reset so that the next I2C transaction can proceed. This patch also de-inits the I2C peripheral in the init() method, before init'ing it again.
2016-11-11stmhal/i2c: Add option to I2C to enable/disable use of DMA transfers.Damien George
New keyword option in constructor and init() method is "dma=<bool>". DMA is now disabled by default for I2C transfers because it currently does not handle I2C bus errors very well (eg if slave device doesn't ACK or NACK correctly during a transfer).
2016-11-11stmhal/dma: De-init the DMA peripheral properly before initialising.Damien George
The DMA state is always HAL_DMA_STATE_RESET because of the memset clearing all the data, so prior to this patch HAL_DMA_DeInit was never called. Now it is always called to make sure the DMA is properly reset.
2016-11-08py: Move frozen bytecode Makefile rules from ports to common mk files.Damien George
Now, to use frozen bytecode all a port needs to do is define FROZEN_MPY_DIR to the directory containing the .py files to freeze, and define MICROPY_MODULE_FROZEN_MPY and MICROPY_QSTR_EXTRA_POOL.
2016-11-07stmhal: enable SD power save (disable CLK on idle)Ryan Shaw
2016-11-03drivers: Add "from micropython import const" when const is used.Damien George
Following best-practice use of the const feature, to make it compatible with Python.
2016-11-03lib/libm: Move Thumb-specific sqrtf function to separate file.Damien George
This allows it to be used only when the hardware supports VFP instructions, preventing compile errors.
2016-10-29stmhal/modutime: Consistently convert to MP_ROM_QSTR/MP_ROM_PTR.Paul Sokolovsky
2016-10-29extmod/utime_mphal: Implement ticks_add(), add to all maintained ports.Paul Sokolovsky
2016-10-21py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.Damien George
In order to have more fine-grained control over how builtin functions are constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific, with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now match the MP_DEFINE_CONST_FUN_OBJ macros.
2016-10-21stmhal/Makefile: Use standard rules for frozen module generation.Paul Sokolovsky
As defined in py/py.mk.
2016-10-18stmhal/led: Refactor LED to use mp_hal_pin_output() init function.Damien George
As part of this patch the MICROPY_HW_LED_OTYPE setting is removed because it is now unused (all boards anyway had this as OUTPUT_PP).
2016-10-18stmhal: Refactor pin usage to use mp_hal_pin API.Damien George
2016-10-18stmhal/modutime: Refactor to use extmod's version of ticks_cpu.Damien George
2016-10-17stmhal: Enable str.center(), str.[r]partition() and builtin compile().Damien George
Also adds "machine" to the list of modules that the parser can search for constants.
2016-10-17stmhal: Implement machine.soft_reset().Damien George
2016-10-16esp8266, stmhal, unix: MAKE_FROZEN is consistently defined in mkenv.mk.Paul Sokolovsky
2016-10-14stmhal/modutime: Refactor to use extmod/utime_mphal.c.Paul Sokolovsky
This includes making sure that utime_mphal's sleep_ms() and sleep_us() don't sleep on negative arguments.
2016-10-14stmhal/pybstdio: Use size_t instead of mp_uint_t.Damien George
2016-10-07stmhal: Use mp_raise_OSError helper function.Damien George
2016-10-06stmhal: Enable machine.time_pulse_us() function.Damien George
2016-10-06stmhal: Disable network and usocket for ESPRUINO_PICODave Hylands
2016-10-05stmhal/moduos: Implement total-number-of-blocks field in statvfs.Damien George
2016-10-05stmhal/mphalport: Change pin obj type to const pointer, to avoid casts.Damien George
2016-10-05stmhal: Fix ESPRUINO_PICO by adding ld scripts with correct flash size.Dave Hylands
2016-10-04stmhal/usb: Use real packet size (not maximum) in HID receive.Pavol Rusnak
2016-10-04stmhal/usb: Use correct ClassData structure for HID receive.Pavol Rusnak