aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2015-11-02stmhal/can: Fix a bug in filter handling.Henrik Sölver
Reported here: http://forum.micropython.org/viewtopic.php?f=2&t=845
2015-11-01stmhal: Add symbolic #defines for interrupt levels in irq.h.Dave Curtis
2015-10-31stmhal: pyexec.c is common module, move to lib/utils/ .Paul Sokolovsky
2015-10-31all: Add py/mphal.h and use it in all ports.Damien George
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
2015-10-31stmhal: Update PYBv3 and PYBv4 pin defs to include MMA pins, and others.Damien George
2015-10-30stmhal: f7: Fix recent RTC change to build on F7.Dave Hylands
2015-10-30stmhal: Make RTC init skip startup if LTE is already enabled and ready.Peter Hinch
This prevents the loss of RTC time when exiting from standby mode, since the RTC is paused while it is being re-inited and this loses about 120ms. Thanks to @chuckbook for the patch.
2015-10-30stmhal: Add define for UNIQUE_ID address (differs per MCU)Dave Hylands
2015-10-30stmhal: Enable sdcard on STM32F7DISC board.Dave Hylands
2015-10-29stmhal: Make accel AVDD pin configurable via mpconfigboard.h.Damien George
2015-10-29stmhal/moduselect: Use mp_hal_ticks_ms().Paul Sokolovsky
2015-10-29stmhal/pyexec: Use mp_hal_ticks_ms().Paul Sokolovsky
This file is actually port-generic and should be moved out of stmhal/ . Other ports already use it, and thus it should use mp_hal_ticks_ms() right away.
2015-10-27unix, stmhal: Introduce mp_hal_delay_ms(), mp_hal_ticks_ms().Paul Sokolovsky
These MPHAL functions are intended to replace previously used HAL_Delay(), HAL_GetTick() to provide better naming and MPHAL separation (they are fully equivalent otherwise). Also, refactor extmod/modlwip to use them.
2015-10-25stmhal: Fix USB_VCP.recv so that it returns actual amount of bytes read.Damien George
Addresses issue #1529.
2015-10-24stmhal: Typo fix in comment.Paul Sokolovsky
2015-10-24stmhal/ffconf.h: Include py/mpconfig.h.Paul Sokolovsky
mpconfigport.h is a private, partial header not providing correct settings unless included by py/mpconfig.h.
2015-10-24Makefiles: Remove duplicate object files when linking.Paul Sokolovsky
Scenario: module1 depends on some common file from lib/, so specifies it in its SRC_MOD, and the same situation with module2, then common file from lib/ eventually ends up listed twice in $(OBJ), which leads to link errors. Make is equipped to deal with such situation easily, quoting the manual: "The value of $^ omits duplicate prerequisites, while $+ retains them and preserves their order." So, just use $^ consistently in all link targets.
2015-10-20stmhal: Enable "all special methods" configuration option.Damien George
2015-10-20stmhal/rtc: Fix indentation to use spaces rather than tabs.Damien George
2015-10-20stmhal/rtc: Init uses YMD rather than backup register to detect powerup.Peter Hinch
2015-10-19stmhal: Bring Pin class close to new machine module specification.Damien George
Looks like we can use the same Pin class for legacy pyb module and new machine module.
2015-10-20stmhal/uart: If char is not received within timeout, return EAGAIN error.Paul Sokolovsky
Instead of return 0, which means EOF. There's no good way to detect EOF on continuously active bus like UART, and treat timeout as just temporary unvailability of data. .read() method of UART object will return None in this case (instead of 0, which again measn EOF). This is fully compliant with unix port.
2015-10-19stmhal: Implement os.dupterm (was pyb.repl_uart).Damien George
pyb.repl_uart still exists but points to os.dupterm.
2015-10-19stmhal: Add sleep_{ms,us} and ticks_{ms,us,cpu,diff} to time module.Damien George
pyb module still has pyb.delay and pyb.udelay, but these now point to time.sleep_ms and time.sleep_us respectively.
2015-10-19stmhal: Early version of machine module for stmhal.Dave Hylands
2015-10-19all: Make netutils.h available to all ports by default.Paul Sokolovsky
Generally, ports should inherit INC from py.mk, append to it, not overwrite it. TODO: Likely should do the same for other vars too.
2015-10-17stmhal: Make USB serial number actually be unique.Dave Hylands
2015-10-13stmhal: Allow to set bits resolution for DAC; 8 is default, can have 12.Damien George
This patch allows to configure the DAC resolution in the constructor and in the init function, eg: dac = DAC(1, bits=12). The default resolution is 8 bits for backwards compatibility. The bits sets the maximum value accepted by write and write_timed methods, being 2**bits - 1. When using write_timed with 12-bit resolution, the input buffer is treated as an unsigned half-word array, typecode 'H'. See PR #1130 for discussion.
2015-10-12Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.Damien George
2015-10-11stmhal: Enable REPL auto indent; document paste mode in help().Damien George
2015-10-11repl: Add paste mode to friendly REPL, entered via CTRL-E.Damien George
Use CTRL-E to enter paste mode. Prompt starts with "===" and accepts all characters verbatim, echoing them back. Only control characters are CTRL-C which cancels the input and returns to normal REPL, and CTRL-D which ends the input and executes it. The input is executed as though it were a file. The input is not added to the prompt history.
2015-10-11py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.Paul Sokolovsky
2015-10-09stmhal: Fix USB CDC-only mode under Windows.Dave Hylands
This fix adds PIDs 9801 and 9802 to the pybcdc.inf file. When in CDC only mode, it presents itself as a Communcations device rather than as a composite device. Presenting as a composite device with only the CDC interface seems to confuse windows. To test and make sure that the correct pybcdc.inf was being used, I used USBDeview from http://www.nirsoft.net/utils/usb_devices_view.html to uninstall any old pyboard drivers (Use Control-F and search for pyboard). I found running USBDeview as administrator worked best. Installing the driver in CDC+MSC mode first is recommended (since the pybcdc.inf file in on the internal flash drive). Then when you switch modes everything seems to work properly. I used https://github.com/dhylands/upy-examples/blob/master/boot_switch.py to easily switch the pyboard between the various USB modes for testing.
2015-10-08stmhal: Fix RTC.wakeup so it correctly calculates WUT for large periods.Damien George
Thanks to Peter Hinch. Addresses issue #1488.
2015-10-06stmhal: In RTC.wakeup, fix setting of wucksel to get correct period.Damien George
Thanks to Peter Hinch. See issue #1490.
2015-10-02py: Allocate parse nodes in chunks to reduce fragmentation and RAM use.Damien George
With this patch parse nodes are allocated sequentially in chunks. This reduces fragmentation of the heap and prevents waste at the end of individually allocated parse nodes. Saves roughly 20% of RAM during parse stage.
2015-09-15py/objslice: Make slice attributes (start/stop/step) readable.Tom Soulanille
Configurable with MICROPY_PY_BUILTINS_SLICE_ATTRS. Disabled by default.
2015-09-15stmhal: Use polling, not DMA, for 1 byte SPI transfers.Damien George
There is an issue sending 1 byte on the SPI bus using DMA, but it only occurs when the transmit is done for the first time after initialising the SPI and DMA peripherals. All other cases (sending 2 or more bytes, doing send_recv, doing recv first) work okay. We sidestep this issue by using polling (not DMA) for all 1 byte transfers. This is fine because a 1 byte transfer can't be interrupted and doesn't need the benefits of DMA (and using polling for this case is more efficient). Resolves #1456.
2015-09-12stmhal: Add "opt" arg to pyb.main, to set mp_optimise_value.Tom Soulanille
Use this to set the global optimisation value when executing the main script (and all scripts it imports).
2015-09-03stmhal: add option to query for the current usb modeTony Abboud
Fetch the current usb mode and return a string representation when pyb.usb_mode() is called with no args. The possible string values are interned as qstr's. None will be returned if an incorrect mode is set.
2015-08-29stmhal: Add support for STM32F411 Discovery Board (STM32F411E-DISCO).Bob Clough
2015-08-17stmhal: Fixed some typos in stm32f411_af.csv.tobbad
2015-08-15stmhal: Enable I & D caches for M7Dave Hylands
2015-08-13py: Add stream_tell method, and use for unix and stmhal file tell.blmorris
2015-08-07stmhal: Use CMSIS_MCU definition from mpconfigboard.mkDave Hylands
This needs to land afte #1407 lands, since #1407 is where the CMSIS_MCU was defined.
2015-08-07stamhal: Add definitions for MCU_SERIES_F4 and MCU_SERIES_F7Dave Hylands
2015-08-07stmhal: Generate modstm constants per buildDave Hylands
This causes unnecessary constants to no longer be generated. Some constants (like UART_BRR) are different between the F4 and F7
2015-08-07stmhal/cmsis: Replace non-ascii apostrophe with ascii apostrophe.Damien George
2015-08-05stmhal: Fix hardfault when configured as a SPI slaveDave Hylands
2015-08-05stmhal: Enable SPI support for F7 MCUs.Dave Hylands