Permalink
Commits on Mar 16, 2017
  1. readme: try and clarify m0/m3/m4

    karlp committed Mar 16, 2017
    Not just m3, and add some newer parts while we're here.
Commits on Feb 28, 2017
Commits on Feb 17, 2017
  1. stm32l0: add exti to makefile

    SevenW committed with karlp Feb 16, 2017
    Tested with a Lora radio application that used three GPIO lines to send
    different interrupts from the radio module to the L052. Tested with a
    Jeenode Zero Rev1
Commits on Feb 15, 2017
  1. stm32: timer: fix TIM_CCMR2 definitions

    dinglixing committed with karlp Feb 13, 2017
    CC3S and CC4S channel names were badly copy/pasted from CCMR1
Commits on Jan 27, 2017
  1. cm3/sync.h: Add DECLS to allow use with c++

    karlp committed Jan 27, 2017
    Reported by vvirag on IRC. Diagnosed and fixed by zyp on IRC
Commits on Jan 10, 2017
  1. stm32:desig: Add DFU compatible serial generation

    dhylands committed with karlp Nov 27, 2016
    Reviewed-by: Karl Palsson <karlp@tweak.net.au>
    Modified to provide better doxygen and consistent api names.
  2. stm32f4: USB support for newer OTG cores

    davids5 committed with karlp Aug 9, 2016
    Support for the  conflicting bit definitions for vbus sensing on core id
    version 0x2000+
    
    Reviewed-by: Karl Palsson <karlp@tweak.net.au>
Commits on Dec 27, 2016
Commits on Dec 20, 2016
  1. stm32:ethernet: drop outdated broken include file.

    karlp committed Dec 20, 2016
    Use  #include <libopencm3/ethernet/mac.h> instead of
    stm32/ethernet.h
    
    MAC peripherals are not stm32 specific, and are more like USB.
    
    Fixes #729
Commits on Dec 19, 2016
  1. eeprom: drop support from linker scripts.

    karlp committed Dec 2, 2016
    While the NOLOAD variant sometimes worked with some toolchains, the
    version in the generator scripts could never work, as neither the
    startup code, nor gdb know how to load those sections properly.
    
    Originally added in: eb18cc1
    
    The original scripts allowed you to place variables in eeprom space for
    reading only.  However, the last toolchain that generated working code
    with this linker script was the gcc-arm-none-eabi-4_9-2014q4 release.
    Subsequent releases treat the directives differently, and can lose track
    of where variables are.  One known symptom is constants getting bad
    addresses, so for instance, "printf("asdfad")" will end up passing the
    wrong address of the string constant into the eventual _write() call.
    
    This commit removes the problematic directives until a more fully
    correct system can be found that more properly follows the linker
    script rules.
  2. stm32l1: flash: avoid duplicate calls to unlock_pecr

    karlp committed Dec 16, 2016
    Attempts to helpfully unlock PECR when required in unlock_progmem and
    unlock_option_bytes actually cause a bus error due to repeated unlocks,
    as per ref manual and tedious experience.  The better tested eeprom helper
    routines unlock/lock in chunks, but that's not applicable for flash
    writing.
    
    Fixes: cf5fb00
Commits on Dec 17, 2016
  1. cm3: SCB on M0/M0+ has SHCSR and DFSR regs too

    HenningJW committed with karlp Dec 13, 2016
    SHCSR and DFSR are only implement on ARMv6 if the "Debug extension" is
    implemented, but that's pretty much everywhere, so allow access to the
    defines.
    
    Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Commits on Dec 8, 2016
Commits on Dec 1, 2016
  1. makefile: make it easier to disable targets.

    karlp committed Dec 1, 2016
    Sometimes you're working on a subset of targets, and want to do full
    clean/builds, but don't need to clean and rebuild families you're not
    working with.  This is a pure syntactic change that makes it easier to
    simply comment out lines for targets, instead of having to mangle line
    continuations.
Commits on Nov 29, 2016
  1. stm32: rcc: Rationalize MCO definitions

    karlp committed Nov 29, 2016
    Some parts used HSICLK, some used HSI.  Most used NOCLK, f3 used
    DISABLED.  Try and move all to the shorter, simpler forms, instead of
    having mixed defines for different targets for the same thing.  Just
    because the bits themselves are different doesn't mean we should make it
    more difficult for users to port code.
  2. stm32l4: rcc: Fix MCO Prescaler shift

    karlp committed Nov 29, 2016
    Transcription error from ref manual I presume.
  3. stm32l1: rcc: use mask/shift consistently for MCO

    karlp committed Nov 29, 2016
    MCOPRE prescaler definitions used a _SHIFT and a preshiftd definition.
    The rest of the file uses separate _MASK and _SHIFT definitions.
    
    Fix whitespace on the definitions while we're here.
Commits on Nov 21, 2016
  1. usb: dwc_otg: fix missing includes

    karlp committed Nov 21, 2016
    Went awol merging something :(
    (Yes, dwc_otg is theoretically shared with efm and co, but at present
    it's still pretty much the stm32 version)
    
    Fixes: 422d708
  2. usb: dwc_otg: enable clocks automatically.

    karlp committed Oct 4, 2016
    ST usbfs-v1, v2, EFM32 USB, lm4f usb all automatically enable the clock
    in their _init routine.  Do the same for the dwc_otg drivers to be
    consistent.
Commits on Nov 5, 2016
Commits on Oct 1, 2016
  1. usb: st_usbfs_v2: allow unaligned buffers for st_usbfs_copy_from_pm()

    fenugrec committed with karlp Apr 16, 2016
    The previous implementation of copy_from_pm assumed the destination buffer
    was aligned on a 16-bit boundary. On M0/M0+ cores (stm32F0*, stm32L0*)
    this causes a hard fault.
    This implementation is from Kuldeep Dhaka's tree; it does a 16-bit copy
    only if the destination buffer is aligned, otherwise a bytewise copy.
    
    Fixes GH issues #401, #461
  2. tests: gadget0: test for unaligned buffer read/writes.

    fenugrec committed with karlp Apr 15, 2016
    This currently fails on stm32F072, which is expected but not normal.
    See GH issues #401 , #461
  3. usb: Simplify TOG_SET_REG_BIT_MSK_AND_SET

    urjaman committed with karlp Jul 31, 2016
    A xor B with B=0 is A, thus this should be correct and faster.
Commits on Sep 13, 2016
  1. stm32: adc-v2: fix typo in doxygen link

    karlp committed Sep 13, 2016
    Missed in rename post review.
Commits on Sep 12, 2016
  1. stm32f1: drop leftover ethernet files

    karlp committed Sep 9, 2016
    The f107 ethernet peripheral is the same as in f4, and was pulled out
    into lib/ethernet/mac_stm32fxx7.c in 52758bb
    
    This drops the duplicate code.
    Fixes Github issue #694
  2. stm32f1: adc: standardize temperature sensor API

    karlp committed Sep 11, 2016
    The TSVREFE bit is defined to only be present on ADC1, so drop the
    pointless adc argument.  This has the added benefit of making the
    API consistent with all other STM32 adc parts.
  3. stm32f1: adc: remove confusing "adc_on" function

    karlp committed Sep 10, 2016
    This is _similar_ to adc_power_on, the common name, but has been marked
    deprecated since 2012.
  4. stm32f1: adc: use common api for calibration routines

    karlp committed Sep 10, 2016
    Use same names as adv-v2 peripheral uses. F1 is the only v1 peripheral
    adc that has calibration modes at all.
    
    Old:
    	adc_calibration(ADC1);  // blocking call
    
    New (blocking):
    	adc_calibrate(ADC1);
    
    New (asynch):
    	adc_calibrate_async(ADC1);
    	// do stuff
    	adc_is_calibrating(ADC1);  // false when calibration finished
    
    Old routines are preserved but marked deprecated for now.
  5. stm32: adc-v2: extract common calibration code

    karlp committed Sep 9, 2016
    Extract the calibration code from the f0, and share it with the other
    adc-v2 peripheral users (f0,l0,f3,l4)
    
    Uses the same naming set of is/async naming conventions requested by the
    RTOS guys instead of having blocking only calls.
    
    Old code:
    	adc_calibrate_start(ADC);
    	adc_calibrate_wait_finish(ADC);
    
    New code (blocking):
    	adc_calibrate(ADC);
    
    New code (asynch):
    	adc_calibrate_async(ADC);
    	// do stuff
    	adc_is_calibrating(ADC);  // will be false when it's finished.
    
    Old code for f0 is still available, but marked deprecated.
Commits on Sep 9, 2016
  1. stm32: adc-v2: don't try and disable adc powered off

    karlp committed Sep 9, 2016
    As per ref manual, you're not allowed to attempt to disable the ADC if
    it's not presently enabled.
    
    Fixes github issue #654