Commit Graph

43 Commits

Author SHA1 Message Date
Alexander Steffen 55f33240f3 all: Use the name MicroPython consistently in comments
There were several different spellings of MicroPython present in comments,
when there should be only one.
2017-07-31 18:35:40 +10:00
Damien George e997bb6328 stmhal/hal: For F7 MCUs, expose DMA_CalcBaseAndBitshift function.
It's needed by the DMA driver to do an efficient reinitialisation.  This
patch follows what is done in the F4 HAL.
2017-03-28 12:56:18 +11:00
Damien George d9c839742f stmhal/hal: Update HALCOMMITS due to change in f7 hal files. 2016-12-07 17:36:42 +11:00
Rami Ali 44cb2ff7ab stmhal: Port of f4 hal commit 1d7fb82 to updated f7 hal. 2016-12-07 17:31:07 +11:00
Rami Ali 821863751f stmhal: Port of f4 hal commit 09de030 to updated f7 hal. 2016-12-07 17:31:05 +11:00
Rami Ali e1c6ed634f stmhal: Port of f4 hal commit c568a2b to updated f7 hal. 2016-12-07 17:30:44 +11:00
Rami Ali b9741cd8f8 stmhal/hal: Update ST32CubeF7 HAL files to V1.1.2.
These files originate from the STM32Cube_FW_F7_V1.5.0 software package
from ST.  Newlines are unixified and trailing whitespace is removed.
2016-12-07 17:28:33 +11:00
Krzysztof Blazewicz 5e9057210a stmhal: Update HALCOMMITS due to change to hal. 2016-11-16 14:05:37 +01:00
Damien George 87f18c08c9 stmhal: Update HALCOMMITS due to change to hal. 2016-11-16 23:43:02 +11:00
Krzysztof Blazewicz 13400e1375 stmhal/hal: do not include <stdio.h> in HAL headers
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-16 12:43:27 +01:00
Krzysztof Blazewicz 63ca7a211a stmhal/dma: precalculate register base and bitshift on handle init
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-16 12:43:27 +01:00
Krzysztof Blazewicz 6a8f6c119c stmhal/hal/sd: reapply HAL commit 09de030 for f4 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz e2b4822189 stmhal/hal/rcc: reapply HAL commit c568a2b for f4 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz 4f7c5fa647 stmhal/hal: reapply HAL commit 9db719b for f4 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz c79ff9930a stmhal/hal/sd: reapply HAL commit 1d7fb82 for f4 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz a9fb88e1dc stmhal/hal/i2c: reapply HAL commit ea040a4 for f4 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz e8b435d1f8 stmhal: apply STM32CubeF4 v1.13.1 patch - upgrade HAL driver to v1.5.2 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz c1fa33b493 stmhal: upgrade to STM32CubeF4 v1.13.0 - HAL v1.5.1 2016-11-16 12:43:27 +01:00
Krzysztof Blazewicz 1f69b16d3f stmhal: Remove STM32CubeF2 HAL files, they are unused/unsupported. 2016-09-22 12:11:01 +10:00
dpslwk 14b7c3e59c stmhal: Update HALCOMMITS due to change to hal 2016-06-29 14:28:49 +01:00
dpslwk daa279a3a1 stmhal: Port of f4 hal commit 1d7fb82 to l4 hal 2016-06-29 14:27:55 +01:00
Damien George e943a407f2 stmhal: Update HALCOMMITS due to change to hal. 2016-04-16 22:00:49 +01:00
Tobias Badertscher d4c3349957 stmhal: L4: Adapt UART HAL to avoid 64-bit integer division.
64-bit integer division brings a dependency on library functions. It is
avoided here by dividing fck and baud by a common divisior.  The error
is the better (1/(2*0x300)) as with 64 bit division (1/(0x300)).
2016-04-16 21:54:19 +01:00
Tobias Badertscher f4942db044 stmhal: L4: Add basic STM32L4xx HAL files.
These files come from STM32Cube_FW_L4_V1.3.0, with Windows line endings
converted to unix.  Only basic HAL files are added.  In addition the QSPI
support is included to support later external QSPI flash as mass storage.
2016-04-16 21:51:40 +01:00
Damien George db573082b5 stmhal: Update HALCOMMITS due to change to hal. 2016-01-30 00:05:46 +00:00
Damien George ea040a4f9a stmhal: In HAL I2C driver, move DMA setup to after sending I2C address.
Previous to this patch the DMA was setup and then the I2C address sent.
If the I2C address sending failed (eg no I2C device on the bus) then the
DMA was left in an inconsistent state.

This patch moves the DMA setup to after a successful sending of the I2C
address(es).

See issue #1765.
2016-01-30 00:02:21 +00:00
Damien George 4434e43fa1 stmhal: Add HALCOMMITS file with list of commits that touch the hal.
This file should be kept up to date with list of hal commits.
2015-08-03 00:55:36 +01:00
Dave Hylands 7a55c1a884 stmhal: Port of f4 hal commit 1d7fb82 to f7 hal 2015-08-03 00:49:36 +01:00
Dave Hylands 28e51c9eb1 stmhal: Port of f4 hal commit 09de030 to f7 hal 2015-08-03 00:49:36 +01:00
Dave Hylands af9d885f8c stmhal: Port of f4 hal commit c568a2b to f7 hal 2015-08-03 00:49:35 +01:00
Damien George f243851ccd stmhal: Expose uwTick in f7 hal. 2015-07-30 00:38:25 +01:00
Dave Hylands 7c934ae501 stmhal: Add hal and cmsis files from STM32Cube_FW_F7_V1.1.0.
All files were converted to linux line endings.
All trailing whitespace was removed using:
for f in f7/inc/* f7/src/*; do sed --in-place 's/[[:space:]]\+$//' $f; done
All non-ascii chars in comments were replaced with ascii equivalents or
removed.
2015-07-30 00:38:18 +01:00
Damien George 99a21dc05d stmhal: Add stm32fxxx_hal_i2s_ex.c to hal/f2 (dummy) and hal/f4. 2015-07-21 23:49:19 +01:00
Wojtek Siudzinski 0621eca05e stmhal: Add STM32CubeF2 version 1.1.0, in hal/f2 directory.
Only those files which are needed by the stmhal port are added.

Also includes a dummy file (stm32f2xx_hal_pcd_ex.c) to keep the build
system the same for f4 and f2 MCU series.
2015-07-20 12:32:09 +01:00
Damien George e4d43401eb stmhal: Move HAL Cube files to f4/ subdir, keeping only those we use.
This is in preparation for supporting other MCU series, such as
STM32F2xx.  Directory structure for the HAL is now hal/f4/{inc,src},
where "f4" will in the future be different for other series.

HAL source/header files that are not use are removed to reduce the size
of the code.
2015-07-20 12:30:18 +01:00
Damien George c568a2b443 stmhal: Adjust computation of SYSCLK to retain precision. 2014-10-04 01:54:02 +01:00
Damien George 1d7fb82f0a stmhal: Change 64-bit arithmetic to 32-bit for SD card block addressing.
By measuring SD card addresses in blocks and not bytes, one can get away
with using 32-bit numbers.

This patch also uses proper atomic lock/unlock around SD card
read/write, adds SD.info() function, and gives error code for failed
read/writes.
2014-09-15 23:49:57 +01:00
Felix Domke 09de030651 stmhal/hal/src/stm32f4xx_hal_sd.c: fix SDHC card capacity 2014-09-15 22:34:07 +01:00
Damien George 34e43c7ee9 stmhal: Improve efficiency of SysTick IRQ and HAL_Delay.
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-25 18:12:44 +01:00
Damien George 3ef911345c stmhal: Update STM32Cube F4 HAL driver to V1.3.0.
This patch updates ST's HAL to the latest version, V1.3.0, dated 19 June
2014.  Files were copied verbatim from the ST package.  Only change was
to suppress compiler warning of unused variables in 4 places.

A lot of the changes from ST are cosmetic: comments and white space.
Some small code changes here and there, and addition of F411 header.

Main code change is how SysTick interrupt is set: it now has a
configuration variable to set the priority, so we no longer need to work
around this (originall in system_stm32f4xx.c).
2014-08-06 22:33:31 +01:00
Damien George d689430e79 stmhal: Add SPI class.
Also some updates to compile with latest changes to core py.
2014-04-20 00:16:30 +01:00
Dave Hylands 9db719bb57 stmhal - More systick cleanup. Fix HAL_Delay 2014-03-13 16:17:01 -07:00
Dave Hylands dd38d90724 Initial checkin with STM HAL
This compiles and links, but hasn't been tested on a board
yet and even if it was run, it doesn't currently do anything.
2014-03-11 23:55:41 -07:00