hal_tick.h changed for the L432KC target in TARGET/../device/ in order to reassign the system ticker from TIM2 to TIM7, since TIM2 was needed as a 32bit encoder counter.

Dependents:   Nucleo_L432KC_Quadrature_Decoder_with_ADC_and_DAC

Fork of mbed-dev by mbed official

Revision:
150:02e0a0aed4ec
Parent:
149:156823d33999
Child:
153:fa9ff456f731
--- a/targets/TARGET_STM/TARGET_STM32L0/analogin_api.c	Fri Oct 28 11:17:30 2016 +0100
+++ b/targets/TARGET_STM/TARGET_STM32L0/analogin_api.c	Tue Nov 08 17:45:16 2016 +0000
@@ -51,8 +51,9 @@
     MBED_ASSERT(function != (uint32_t)NC);
     obj->channel = STM_PIN_CHANNEL(function);
 
-    // Configure GPIO excepted for internal channels (Temperature, Vref, Vlcd)
-    if ((obj->channel != 16) && (obj->channel != 17) && (obj->channel != 18)) {
+    // Configure GPIO excepted for internal channels (Temperature, Vref, Vbat, ...)
+    // ADC Internal Channels "pins" are described in PinNames.h and must have a value >= 0xF0
+    if (pin < 0xF0) {
         pinmap_pinout(pin, PinMap_ADC);
     }