aboutsummaryrefslogtreecommitdiff
path: root/stmhal/systick.c
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-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-03-22stmhal/systick: Make mp_hal_delay_ms release the GIL when sleeping.Damien George
2017-03-20stmhal: Enable micropython.schedule().Damien George
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.
2017-03-02stmhal: Rename sys_tick ticks/delay functions to corresp. mp_hal ones.Damien George
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.
2017-02-15stmhal: Implement a proper thread scheduler.Damien George
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.
2015-07-30stmhal: Replace #include "stm32f4xx_hal.h" with #include STM32_HAL_H.Dave Hylands
2015-01-01stmhal: Prefix includes with py/; remove need for -I../py.Damien George
2014-11-30stmhal: Make pyb.[u]delay use systick with IRQs, busy loop otherwise.Damien George
pyb.delay and pyb.udelay now use systick if IRQs are enabled, otherwise they use a busy loop. Thus they work correctly when IRQs are disabled. The busy loop is computed from the current CPU frequency, so works no matter the CPU frequency.
2014-08-25stmhal: Improve efficiency of SysTick IRQ and HAL_Delay.Damien George
SysTick IRQ now increases millisecond counter directly (ie without calling HAL_IncTick). Provide our own version of HAL_Delay that does a wfi while waiting. This more than halves power consumption when running a loop containing a pyb.delay call. It used to be like this, but new version of HAL library regressed this feature.
2014-08-25stmhal: Use MP_OBJ_NEW_SMALL_INT directly in pyb.micros/millis.Damien George
Also some whitespace cleanup.
2014-08-25Add support for pyb.micros() by using the systick timer.Dave Hylands
I also removed trailing spaces from modpyb.c which affected a couple of lines technically not part of this patch. Tested using: https://github.com/dhylands/upy-examples/blob/master/micros_test.py which eventually fails due to wraparound issues (I could fix the test to compensate but didn't bother)
2014-06-28stmhal: Include mpconfig.h before all other includes.Paul Sokolovsky
It defines types used by all other headers. Fixes #691.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-03-13stmhal - More systick cleanup. Fix HAL_DelayDave Hylands
2014-03-13Cleanup systick for stmhalDave Hylands
2014-03-12REPl working on UART6 with STMHALDave Hylands