summaryrefslogtreecommitdiff
path: root/ports/stm32/adc.c
AgeCommit message (Collapse)Author
2019-10-13remove ports/stm32Dan Halbert
2018-05-28stm32: Add support for STM32F0 MCUs.Damien George
2018-05-18stm32: Add support for STM32L496 MCU.Tobias Badertscher
2018-05-04stm32: Don't use %lu or %lx for formatting, use just %u or %x.Damien George
On this 32-bit arch there's no need to use the long version of the format specifier. It's only there to appease the compiler which checks the type of the args passed to printf. Removing the "l" saves a bit of code space.
2018-05-02stm32/adc: Use mp_hal_pin_config() instead of HAL_GPIO_Init().Damien George
This makes ADCAll work correctly on L4 MCUs.
2018-05-01stm32/adc: Add support for H7 MCU series.iabdalkader
ADC3 is used because the H7's internal ADC channels are connected to ADC3 and the uPy driver doesn't support more than one ADC. Only 12-bit resolution is supported because 12 is hard-coded and 14/16 bits are not recommended on some ADC3 pins (see errata). Values from internal ADC channels are known to give wrong values at present.
2018-04-11stm32/adc: Factor common ADC init code into adcx_init_periph().Damien George
The only configuration that changes with this patch is that on L4 MCUs the clock prescaler changed from ADC_CLOCK_ASYNC_DIV2 to ADC_CLOCK_ASYNC_DIV1 for the ADCAll object. This should be ok.
2018-04-11stm32/adc: Fix config of EOC selection and Ext-Trig for ADC periph.Damien George
A value of DISABLE for EOCSelection is invalid. This would have been interpreted instead as ADC_EOC_SEQ_CONV, but really it should be ADC_EOC_SINGLE_CONV for the uses in this code. So this has been fixed. ExternalTrigConv should be ADC_SOFTWARE_START because all ADC conversions are started by software. This is now fixed.
2018-04-11stm32/adc: Factor code to optimise adc_read_channel and adc_read.Damien George
Saves 200 bytes of code space.
2018-04-11stm32/adc: Optimise read_timed_multi() by caching buffer pointers.Damien George
2018-04-11stm32/adc: Add read_timed_multi() static method, with docs and tests.Peter Hinch
2018-04-11stm32/adc: Fix verification of ADC channel 16 for F411 MCUs.Damien George
2018-03-27stm32: Consolidate include of genhdr/pins.h to single location in pin.h.Damien George
genhdr/pins.h is an internal header file that defines all of the pin objects and it's cleaner to have pin.h include it (where the struct's for these objects are defined) rather than an explicit include by every user.
2018-03-17stm32: Use STM32xx macros instead of MCU_SERIES_xx to select MCU type.Damien George
The CMSIS files for the STM32 range provide macros to distinguish between the different MCU series: STM32F4, STM32F7, STM32H7, STM32L4, etc. Prefer to use these instead of custom ones.
2018-02-22stm32: Add board config option to enable/disable the ADC.Damien George
The new option is MICROPY_HW_ENABLE_ADC and is enabled by default.
2018-02-13stm32: Update HAL macro and constant names to use newer versions.Damien George
Newer versions of the HAL use names which are cleaner and more self-consistent amongst the HAL itself. This patch switches to use those names in most places so it is easier to update the HAL in the future.
2018-02-01stm32: Improve support for STM32F722, F723, F732, F733 MCUs.Damien George
2017-10-04all: Remove inclusion of internal py header files.Damien George
Header files that are considered internal to the py core and should not normally be included directly are: py/nlr.h - internal nlr configuration and declarations py/bc0.h - contains bytecode macro definitions py/runtime0.h - contains basic runtime enums Instead, the top-level header files to include are one of: py/obj.h - includes runtime0.h and defines everything to use the mp_obj_t type py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h, and defines everything to use the general runtime support functions Additional, specific headers (eg py/objlist.h) can be included if needed.
2017-09-10stm32/boards: Add new board B_L475E_IOT01A based on STM32L475.Tobias Badertscher
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.