summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/uart.c
diff options
context:
space:
mode:
authorTobias Badertscher <badi@baerospace.ch>2016-07-19 11:35:33 +0200
committerDamien George <damien.p.george@gmail.com>2016-08-11 13:01:57 +1000
commitaf9889f99a325adb725c61476bd580b11593ca50 (patch)
treec0bb6dc7aac1ee0707a29fddaafff052e429253f /esp8266/uart.c
parentdfb8144037b5d61a55397871801d560f21a232dd (diff)
downloadmicropython-af9889f99a325adb725c61476bd580b11593ca50.tar.gz
micropython-af9889f99a325adb725c61476bd580b11593ca50.zip
stmhal/adc.c: Get ADC working on STM32L4 MCUs.
Fixing Issue #2243. Main problems were: - HAL_ADC_GetState(adcHandle) may return other bits set (not only HAL_ADC_STATE_EOC_REG) when called - so I AND-ed it out as proposed by mattbrejza in Issue #2243. - ADC Pin has to be configured as GPIO_MODE_ANALOG_ADC_CONTROL not only GPIO_MODE_ANALOG. - Resolved ADC resolution L4 specific (Use L4 define ADC_RESOLUTION_12B). - Changed setting of Init.EOCSelection toADC_EOC_SINGLE_CONV for L4. - Added call to ADC_MultiModeTypeDef as this is done on a STM32Cube generated project too. - Clean up: Configuration of ADC is done only in ONE function not the same is done in two functions. Test is done on PA5 pin of STM32L4Discovery-Kit which is connected to the DOWN button. Thanks to mattbrejza for discovering the bug.
Diffstat (limited to 'esp8266/uart.c')
0 files changed, 0 insertions, 0 deletions