Commit Graph

10 Commits

Author SHA1 Message Date
Dave Hylands
061eb6fa6b stmahl: Fix usbd_conf.c for devices which don't have USB_HS at all.
The STMCube examples define both USE_USB_HS and USE_USB_HS_IN_FS when they
use the HS in FS mode.

The STM32F401 doesn't have a USB_HS at all, so the USB_OTG_HS instance
doesn't even exist.
2015-11-26 16:17:26 +00:00
Tobias Badertscher
8844d031e4 stmhal: Add support for the STM32F429I-DISCO kit by STMicro. 2015-11-25 23:53:26 +00:00
Damien George
36bd10779c stmhal: In SysTick IRQ handler, make uwTick variable non-volatile.
uwTick can only change in the SysTick IRQ so this IRQ function does not
need to take special care with this variable.  It's important to make
this IRQ function as efficient as possible.
2015-11-24 16:23:54 +00:00
Damien George
e99e6c883d stmhal: Move flash storage idle tick handler from TIM3 to SysTick.
Using SysTick to do the counting and dispatch of the flash storage idle
handler is more efficient than requiring a dedicated hardware timer.
No new counter is needed, just the existing uwTick variable.  The
processing is not actually done in the SysTick IRQ, it is deferred to
the flash IRQ (which runs at lower priority).
2015-11-24 16:18:07 +00:00
Damien George
22bd23114a stmhal: On SysTick IRQ, only process one DMA channel at a time.
This can be generalised if/when more processing is needed by SysTick.

Thanks to @chuckbook for the idea.
2015-11-24 15:44:16 +00:00
Dave Hylands
b677f03407 stmhal: Turn off DMA clocks when idle for 100 msec
Turning on each DMA block increases the current consumption
by about 8 mA. This code adds an idle timer for each DMA
block and turns off the clocks when no streams are in use
for 128 msec. Having a small timeout allows for improved
performance when back-to-back transfers are being performed.

The 128 msec is basically a guess.
2015-11-24 09:37:25 +00:00
Dave Hylands
41b688e25f stmhal: Print more information at HardFault time. 2015-11-07 13:59:00 +00:00
Damien George
731f359292 all: Add py/mphal.h and use it in all ports.
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-31 19:14:30 +03:00
Damien George
6e552e15fa stmhal: Add debug capability to print out info about a hard fault.
Capability is #if'd off by default.

Thanks to Dave Hylands for the patch.
2015-08-03 00:14:51 +01:00
Dave Hylands
7e7fb0b7a3 stmhal: Renamed startup/system/_it.[ch] file to generic names. 2015-07-30 00:38:29 +01:00