summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal
Commit message (Collapse)AuthorAge
...
* all: Move BYTES_PER_WORD definition from ports to py/mpconfig.hDamien George2017-04-01
| | | | | It can still be overwritten by a port in mpconfigport.h but for almost all cases one can use the provided default.
* all: Use full path name when including mp-readline/timeutils/netutils.Damien George2017-03-31
| | | | | | | This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed.
* stmhal/i2c: Clean the cache so that I2C DMA works on F7 MCUs.Damien George2017-03-31
|
* stmhal: Move L4/F7 I2C timing constants from mpconfigboard.h to i2c.c.Damien George2017-03-31
| | | | | | | | Such constants are MCU specific so shouldn't be specified in the board config file (else it leads to too much duplication of code). This patch also adds I2C timing values for the F767/F769 for 100k, 400k and 1MHz I2C bus frequencies.
* stmhal/dma: Don't include SDMMC2 struct if SDMMC2 is not available.Damien George2017-03-30
| | | | Not all F7 MCUs have SDMMC2.
* stmhal/boards: Remove F769 alt function table, it's same as for F767.Damien George2017-03-30
|
* stmhal/boards/STM32F769DISC: Fix user switch pin, and document stlink.Damien George2017-03-30
|
* stmhal/boards/STM32F769DISC: Get SD card working by using SDMMC2.Damien George2017-03-30
|
* stmhal/boards: Update F76x alternate function table to add SDMMC2.Damien George2017-03-30
|
* stmhal/sdcard: Add support for SDMMC2 on F7 MCUs.Damien George2017-03-30
| | | | | | By default the SDIO (F4) or SDMMC1 (L4, F7) is used as the SD card peripheral, but if a board config defines MICROPY_HW_SDMMC2_CK and other pins then the SD card driver will use SDMMC2.
* stmhal: Support SDMMC alternate functions in pin generation.Damien George2017-03-30
|
* stmhal/spi: Increase SPI transfer timeout, proportional to num bytes.Damien George2017-03-29
| | | | | | | With the existing timeout of 100ms the transfer would end prematurely if the baudrate was low and the number of bytes to send was high. This patch fixes the problem by making the timeout proportional to the number of bytes that are being transferred.
* stmhal: Update for changes to mp_obj_str_get_data.Damien George2017-03-29
|
* stmhal: Update to use size_t for tuple/list accessors.Damien George2017-03-29
|
* stmhal/dma: Fix reinitialisation of DMA on F7 MCUs, following F4.Damien George2017-03-28
|
* stmhal/hal: For F7 MCUs, expose DMA_CalcBaseAndBitshift function.Damien George2017-03-28
| | | | | It's needed by the DMA driver to do an efficient reinitialisation. This patch follows what is done in the F4 HAL.
* stmhal/spi: Clean and/or invalidate D-cache before SPI DMA transfers.Damien George2017-03-28
| | | | | On MCUs with a cache (eg F7) this must be done or else the SPI data that is transferred is incorrect.
* stmhal/board: Fix existing and add more pin defs for NUCLEO_F767ZI.Damien George2017-03-28
|
* stmhal/boards: Fix alt-func config for PA5 of STM32F767.Damien George2017-03-28
|
* py/modbuiltins: For round() builtin use nearbyint instead of round.Damien George2017-03-24
| | | | | | | | | | | | | | The C nearbyint function has exactly the semantics that Python's round() requires, whereas C's round() requires extra steps to handle rounding of numbers half way between integers. So using nearbyint reduces code size and potentially eliminates any source of errors in the handling of half-way numbers. Also, bare-metal implementations of nearbyint can be more efficient than round, so further code size is saved (and efficiency improved). nearbyint is provided in the C99 standard so it should be available on all supported platforms.
* all/Makefile: Remove -ansi from GCC flags, its ignored anyway.Krzysztof Blazewicz2017-03-23
| | | | | | The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
* stmhal/systick: Make mp_hal_delay_ms release the GIL when sleeping.Damien George2017-03-22
|
* stmhal/pybthread: Allow interrupts to work during lock/unlock of mutex.Damien George2017-03-22
| | | | | When locking/unlocking a mutex we only need to protect against a thread switch, not general interrupts.
* stmhal/irq: Shift IRQ priorities of TIM and EXTINT to be above PENDSV.Damien George2017-03-22
| | | | | This way, Timer and ExtInt callbacks can interrupt the low-priority pendsv handler (for example thread switching).
* stmhal/pendsv: Disable interrupts during a thread switch.Damien George2017-03-20
| | | | | | | | We can actually handle interrupts during a thread switch (because we always have a valid stack), but only if those interrupts don't access any of the thread state (because the state may not correspond to the stack pointer). So to be on the safe side we disable interrupts during the very short period of the thread state+stack switch.
* stmhal: Enable micropython.schedule().Damien George2017-03-20
| | | | | | ExtInt, Timer and CAN IRQ callbacks are made to work with the scheduler. They are still hard IRQs by default, but one can now call micropython.schedule within the hard IRQ to schedule a soft callback.
* extmod/vfs_fat: Remove obsolete and unused str/len members.Damien George2017-03-10
|
* stmhal/main: Allocate flash's VFS struct on the heap to trace root ptrs.Damien George2017-03-10
|
* stmhal/mphalport: Get ticks_cpu() working on F7 MCUs.Damien George2017-03-10
|
* stmhal/modnwcc3k: Add include for mp_hal_delay_ms.Damien George2017-03-02
|
* stmhal/modpyb: Use utime ticks ms/us functions instead of custom ones.Damien George2017-03-02
|
* stmhal: Rename sys_tick ticks/delay functions to corresp. mp_hal ones.Damien George2017-03-02
| | | | | | | | | | | | The renames are: HAL_Delay -> mp_hal_delay_ms sys_tick_udelay -> mp_hal_delay_us sys_tick_get_microseconds -> mp_hal_ticks_us And mp_hal_ticks_ms is added to provide the full set of timing functions. Also, a separate HAL_Delay function is added which differs slightly from mp_hal_delay_ms and is intended for use only by the ST HAL functions.
* stmhal: Use mp_hal_delay_ms instead of HAL_Delay.Damien George2017-03-02
|
* stmhal/main: Remove unnecessary header includes.Damien George2017-02-17
|
* py: Add iter_buf to getiter type method.Damien George2017-02-16
| | | | | | | | | | | | | | | Allows to iterate over the following without allocating on the heap: - tuple - list - string, bytes - bytearray, array - dict (not dict.keys, dict.values, dict.items) - set, frozenset Allows to call the following without heap memory: - all, any, min, max, sum TODO: still need to allocate stack memory in bytecode for iter_buf.
* stmhal: Use generic interrupt char code.Damien George2017-02-15
|
* stmhal: Implement a proper thread scheduler.Damien George2017-02-15
| | | | | | This patch changes the threading implementation from simple round-robin with busy waits on mutexs, to proper scheduling whereby threads that are waiting on a mutex are only scheduled when the mutex becomes available.
* stmhal/boards: For STM32F411DISC, change I2C pin according to datasheet.Johannes Wågen2017-02-13
| | | | The pin had to be changed to get the I2C sensors on board to work.
* stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default.Damien George2017-02-08
| | | | | | | | | | The aapcs-linux ABI is not required, instead the default aapcs ABI is enough. And using the default ABI means that the provided libgcc will now link with the firmware without warnings about variable vs fixed enums. Although the binary size increases by about 1k, RAM usage is slightly decreased. And libgcc may prove useful in the future for things like long-long division.
* stmhal: Add ability to skip booting from SD card via /flash/SKIPSD file.Damien George2017-02-07
|
* stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.Damien George2017-02-06
|
* stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.Damien George2017-02-06
| | | | | | | | | This new function controls what happens on a hard-fault: - debugging disabled: board will do a reset - debugging enabled: board will print registers and stack and flash LEDs The default is disabled, ie to do a reset. This is different to previous behaviour which flashed the LEDs and waited indefinitely.
* stmhal: On HardFault, print stack pointer and do a stack dump.Damien George2017-02-06
|
* stmhal/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George2017-02-03
|
* stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.Damien George2017-01-31
|
* stmhal/main: Use _estack value to initialise stack extents.Damien George2017-01-31
|
* stmhal: Initial implementation of multithreading, currently disabled.Damien George2017-01-31
| | | | | | | | | | | | | | | This patch brings the _thread module to stmhal/pyboard. There is a very simple round-robin thread scheduler, which is disabled if there is only one thread (for efficiency when threading is not used). The scheduler currently switches threads at a rate of 250Hz using the systick timer and the pend-SV interrupt. The GIL is disabled so one must be careful to use lock objects to prevent concurrent access of objects. The threading is disabled by default, one can enabled it with the config option MICROPY_PY_THREAD to test it out.
* stmhal/pendsv: Fill in comments about what the stack contains.Damien George2017-01-31
|
* stmhal/main: Guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD.Damien George2017-01-31
|
* stmhal/modmachine: Add machine.Signal type.Damien George2017-01-31
|